class DColorMap lets you map image data to rgb data.
More...
class DColorMap lets you map image data to rgb data.
| def dectris.albula.DColorMap.legend |
( |
|
width, |
|
|
|
height, |
|
|
|
foreground, |
|
|
|
background, |
|
|
|
logForeground, |
|
|
|
colorTable, |
|
|
|
format = "RGBA" |
|
) |
| |
|
static |
Create legend containing of a color bar and its labelling.
The color varies in the vertical direction of the color bar.
- Parameters
-
| width | Integer. Width of the color bar |
| height | Integer. Height of the color bar |
| foreground | Float |
| background | Float |
| logForeground | Float |
| colorTable | DColorTable |
| format | String. The coding is 0xFFRRGGBB (0xRRGGBBFF) for "ARGB" ("RGBA") |
- Returns
- Tuple of DImage containing the color bar and dict mapping vertical positions to intensities.
| def dectris.albula.DColorMap.rgb |
( |
|
img, |
|
|
|
foreground, |
|
|
|
background, |
|
|
|
logForeground, |
|
|
|
colorTable, |
|
|
|
format = "RGBA", |
|
|
|
mask = None, |
|
|
|
viewport = None, |
|
|
|
cutoff = 0, |
|
|
|
highlightDefective = False, |
|
|
|
highlightSaturated = False |
|
) |
| |
|
static |
Map img to rgb.
Depending on the format parameter the color samples are coded in integers. Using the linear and logarithmic color paths of the given colorTable intensities between background and foreground are linearly mapped along the linear path. If colorTable has a logarithmic path intensities between foreground and logForeground a logarithmically mapped along the logarithmic path.
- Parameters
-
| img | DImage |
| foreground | Float value |
| background | Float value |
| logForeground | Float value |
| colorTable | DColorTable |
| format | String. The coding is 0xFFRRGGBB (0xRRGGBBFF) for "ARGB" ("RGBA") |
| mask | DImage that defines the defective ( ) and gap pixels ( ). |
| viewport | DRect. If given only the region defined by viewport is mapped |
| cutoff | Integer. If cutoff is given and highlightSaturated is True, intensities above cutoff are highlighted by a color depending on colorTable. |
| highlightDefective | Bool. If mask is given and hightlightDefective is True, defective pixels are highlighted by a color depending on colorTable. |
| highlightSaturated | Bool. If cutoff is given and highlightSaturated is True, intensities above cutoff are highlighted by a color depending on colorTable. |
- Returns
- DImage that contains the rgb data.