[vtkusers] Non-continuous lookup function

Ron Inbar ron at mediguide.co.il
Tue Jul 31 12:09:59 EDT 2001


Hi all,

In my application, I want to paint all the cells whose scalar value falls
within a specified range in one color, and the rest of the cells in another
color.  
The reasonable way to do this, in my opinion, is to set up a lookup table of
3 entries, corresponding to values below the minimum, within the range, and
above the maximum, in this order, and then have the vtkLookupTable object
map the scalar values as described above.  But vtkLookupTable doesn't behave
this way.  If I set the scalar range to be [a,b] then the value a will
always be mapped to entry 0 and the value b to entry 2, but intermediate
values close to the ends of the range will also be mapped to these entries.
I want a+epsilon and b-epsilon to be always mapped to entry 1, no matter how
small epsilon is.
Can I use vtkLookupTable or a subclass thereof to achieve the behavior I
need?

Thanks in advance,

Ron Inbar



...
---






More information about the vtkusers mailing list