colourmap
Description
Convert a mono image to an RGB false colour image for better visibility. If the "insetinto" input has an image AND there is a valid ROI in the mono image, the image will be inset into the RGB of the insetinto image. NOTE: if you change the "insetinto" image's RGB mapping you may need to "run all" to see the the change reflected.
Ignores DQ and uncertainty
The colour map widget has the following behaviour:
- click and drag to move a colour point
- doubleclick to delete an existing colour point
- doubleclick to add a new colour point
- right click to edit an existing colour point
Node parameters:
- gradient: utils.Gradient object containing the colour map used
- colour: (r,g,b) [0:1] colour of text and border for in-image legend
- legendrect: (x,y,w,h) rectangle for in-image legend
- vertical: true if vertical legend
- fontscale: size of font
- thickness: border thickness
- legendPos: string describing position:
- 'In image', 'Top margin', 'Bottom margin', 'Left margin', 'Right margin', 'None' These are also defined as constants LEFT_MARGIN... IN_IMAGE (and None)
Connections
Inputs
| Index | Name | Type | Desc |
|---|---|---|---|
| 0 | mono | img | (none) |
| 1 | background | img | (none) |
Outputs
| Index | Name | Type | Desc |
|---|---|---|---|
| 0 | (none) | img | (none) |
Parameters
| colourmap | gradient: list | (ordered) | x: float (default 0.0) | x |
| colour | colour (ordered) | r: int or float (default 0.0) | The red component 0-1 | |
| g: int or float (default 0.0) | The green component 0-1 | |||
| b: int or float (default 0.0) | The blue component 0-1 | |||
| preset: string (topo, grey, viridis, magma, plasma, inferno, cividis, mako, turbo, rocket) (default None) | preset | |||
| colour | legend colour (ordered) | r: int or float (default 1.0) | The red component 0-1 | |
| g: int or float (default 1.0) | The green component 0-1 | |||
| b: int or float (default 0.0) | The blue component 0-1 | |||
| legendrect | legend rectangle if in image (ordered) | x: integer (default 0) | The x coordinate of the top left corner | |
| y: integer (default 0) | The y coordinate of the top left corner | |||
| w: integer (default 100) | The width of the rectangle | |||
| h: integer (default 20) | The height of the rectangle | |||
| vertical: boolean (default False) | is legend vertical? | |||
| fontscale: float (default 10.0) | size of legend font | |||
| thickness: float (default 1.0) | thickness of legend border | |||
| legendPos: string (Left margin, Right margin, Top margin, Bottom margin, In image, None) (default 'In image') | legend location | |||
| normbackground: boolean (default False) | normalise background | |||
| sigfigs: integer (default 6) | significant figures |
Automatically generated by generate_autodocs.py
Date: 2025-10-24T15:30:01.755150