[vtkusers] color mapping

Frédéric Speisser speisser at kappaeng.com
Mon Dec 3 11:31:56 EST 2012


Hi all,


I'm using /vtkLookupTable::SetTableRange/ to remap colors of a LUT to a 
custom range of a given scalar values.

This works great but per default and as explained in API documentation :
/Scalar values less than minimum range value are clamped to minimum 
range value. Scalar values greater than maximum range value are clamped 
to maximum range value.
/So values out of range are displayed in minimum range value color (for 
those under custom range) and in maximum range value color (for those 
over custom range).
I would like to display out-of-range values in a custom color, so that 
for example all values under and over custom range are displayed in black.
I began to write a class /MyVtkLookupTable/ which inherits from 
/vtkLookupTable /and i tried to override /GetColor(double v, double 
rgb[3])/ and /MapValue(double v)/ to be able to override color displayed 
but it seems not to work.
Is it possible to do that by overriding vtk classes ? If yes, which 
method/classes should I override ?

Any clues are wellcome, thank you,



Frédéric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121203/a86b11f2/attachment.htm>


More information about the vtkusers mailing list