[vtkusers] Re: vtkThreshold

furlanis at ele.uri.edu furlanis at ele.uri.edu
Thu Jul 10 10:04:25 EDT 2003


***************************************

-----Original Message-----
From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org]On Behalf Of
Michael Bonner
Sent: Thursday, July 10, 2003 12:13 AM
To: vtkusers at vtk.org
Subject: [vtkusers] vtkThreshold



VTK users:

I have been using a vtkThreshold filter to remove cells based upon their
cell data Scalars. When I do this the color mapping changes, more
specifically, if I remove cells <  a value the cells with values = value
are now blue, I would like the cells that were not removed to maintain the
color mapping before the filter was used, is this possible/simple?

Thanks for your time,
Mike Bonner

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



--__--__--


*******************************************************

here's what i think is going on. when you pass the data through the filter, and
then therough the mapper, since the cells are gone, the scalar values for the
cells are also gone. so when the mapper maps, it only knows the range of scalar
values that the filter has passed into it. here's my suggestion:

pass the mapper, the original scalar range, so it can maintain the colors:
(TCL)
eval mapper SetScalarRange [[[original data] GetScalars] GetScalarRange]

grab the range from the data before you pass it through the filter. that should
maintain the desireable range.



More information about the vtkusers mailing list