This function is used to fill 3 LUTs with one of several pseudo-color schemes.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI MED_display_color_create( const AT_MODE scheme, const LONG param1, const LONG param2, const LONG param3, LPAT_PIXEL lpRLUT, LPAT_PIXEL lpGLUT, LPAT_PIXEL lpBLUT); |
Arguments:
scheme | Set to the pre-defined color scheme that you would like to use to pseudo-color an image. These AT_MODE color schemes are defined in MedAPI.h and begin with DCM_PSEUDOCOLOR_SCHEME_ . See below for details. |
param1 | Set to a LONG value if the color scheme requires it. See below. |
param2 | Set to a LONG value if the color scheme requires it. See below. |
param3 | Set to a LONG value if the color scheme requires it. See below. |
lpRLUT | Pass this argument an array of 256 bytes. It returns the Red LUT that will be used to pseudo-color an image when MED_display_color_set() is called. |
lpGLUT | Pass this argument an array of 256 bytes. It returns the Green LUT that will be used to pseudo-color an image when MED_display_color_set() is called. |
lpBLUT | Pass this argument an array of 256 bytes. It returns the Blue LUT that will be used to pseudo-color an image when MED_display_color_set() is called. |
Return Value:
Returns the number of ImageGear errors that occurred during the function call.
Supported Raster Image Formats:
This function does not process image pixels.
Example:
Copy Code | |
---|---|
HIGEAR hIGear; { AT_PIXEL RLUT[256]; AT_PIXEL GLUT[256]; AT_PIXEL BLUT[256]; MED_display_color_create(DCM_PSEUDOCOLOR_SCHEME_6, 0, 0, 0, RLUT, GLUT, BLUT); MED_display_color_set(hIGear, RLUT, GLUT, BLUT); repaint_image_and_error_check(hWnd); } |
Remarks:
The scheme parameter selects which ImageGear pre-defined pseudo-color method to use. Some of the schemes may require parameters that are passed into param1, param2, and param3. Other schemes do not use these parameters and any value passed in are ignored. See below.
lpRLUT, lpGLUT, and lpBLUT must be passed an array of 256 bytes, each. When this function returns, these 3 tables will be filled with values that can be used to pseudo-color an 8-16 bit grayscale image.
This function does not apply the color to an image. It only fills these 3 LUTs. To apply these tables to an image you need to follow this function call with a call to MED_display_color_set().
Currently, these are the available preset ImageGear pseudo-color schemes:
DCM_PSEUDOCOLOR_SCHEME_OFF | Reset to grayscale - does not use param1, param2, param3 |
DCM_PSEUDOCOLOR_SCHEME_1 | Oil Film - does not use param1, param2, param3 |
DCM_PSEUDOCOLOR_SCHEME_2 | Dark Blue to Bright Red - does not use param1, param2, param3 |
DCM_PSEUDOCOLOR_SCHEME_3 | Green to Red - does not use param1, param2, param3 |
DCM_PSEUDOCOLOR_SCHEME_4 | Red, Green, Blue - does not use param1, param2, param3 |
DCM_PSEUDOCOLOR_SCHEME_5 | Thermal - does not use param1, param2, param3 |
DCM_PSEUDOCOLOR_SCHEME_6 | Bright Rainbow - does not use param1, param2, param3 |