[vtkusers] color mapping

Johannes Strecha j.strecha at gmail.com
Mon Dec 3 12:12:05 EST 2012


Hello,

I can't give you a direct answer, but I think what you want can be done
with the vtkClipDataSet filter (5.8). See the reference for details. I
assume that adjusting the lookup table would work faster, though.

When trying to realize a "filled contour plot" by adjusting the lookup
table (to a series of steps) I experienced that some interpolation was
performed nonetheless and I ended up with blurred filled contours. Maybe
this would also happen in your case.

Kind regards,
Johannes Strecha.


On Mon, Dec 3, 2012 at 5:31 PM, Frédéric Speisser <speisser at kappaeng.com>wrote:

>  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
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121203/a5ef2951/attachment.htm>


More information about the vtkusers mailing list