Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

programatically changing the CCWIMAQViewer color

Does anyone know how to change the color palette for the CCWIMAQViewer object??

I can attach grayscale images fine, but if i try to attach a binary image i don't get anything unless i right click on the viewer and manually change it to a binary palette. Isn't there a way to change the viewer's palette type in code? I'm using Microsoft Visual C++.
0 Kudos
Message 1 of 3
(3,225 Views)
The CWIMAQViewer has an object called palette. This has a property called type. Type is one of the following predefined palettes:

cwimaqPaletteBinary�Binary palette. Contains 16 cycles of 16 different colors. This periodic palette is appropriate for the display of binary and labeled images.

cwimaqPaletteGradient�Gradient palette. A gradation from red to white with a prominent range of light blue in the upper value range.

cwimaqPaletteGrayScale�Grayscale palette. A gradual gray level variation from black to white.

cwimaqPaletteRainbow�Rainbow palette. A gradation from blue to red with a prominent range of greens in the middle value range.

cwimaqPaletteTemperature
�Temperature palette. A gradation of brown.

cwimaqPaletteUserDefined�A user-defined palette.
0 Kudos
Message 2 of 3
(3,225 Views)
where are these predefined palettes defined? When I try to compile, this line,

m_cViewer.GetPalette().SetType(cwimaqPaletteBinary);

gives me this error:
error C2065: 'cwimaqPaletteBinary' : undeclared identifier
0 Kudos
Message 3 of 3
(3,225 Views)