[vtkusers] vtkThreshold

R K Shyamprakash ramakrishna.prakash at quest-global.com
Wed Jul 9 23:51:03 EDT 2003

looks like the scalar values of the cells changes once you pass the data
through vtkThreshold. following might work. code is in java.

say "scalarValue" is the scalar values of the cells that were not removed.

vtkPolyData data = vtkthreshold.GetOutput();
vtkDataArray dataArray = data.GetCellData().GetScalars();
for(int i=0;i<data.GetNumberOfCells();i++){

ask me if I am not clear


-----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:
Follow this link to subscribe/unsubscribe:

More information about the vtkusers mailing list