[vtkusers] [VTK] clip on cell scalar data?
Chris Myers
myers at tc.cornell.edu
Tue Jun 13 09:32:55 EDT 2000
I am trying to clip some VTKPolyData (with VTKClipPolyData) on the
dataset's scalar data, rather than with an implicit function (e.g., a
clipping plane). The scalar data are cell data, rather than point data.
Because of this, VTK throws an error and exits. The error message is
at line 223 of vtkClipPolyData.cxx (official src release vtk 3.1.2):
"Cannot clip without clip function or input scalars"
Looking at vtkClipPolyData.cxx, I see that only the input point data
are checked for scalar data:
clipScalars = inPD->GetScalars();
Since my scalars are cell data, this call fails and VTK has nothing to
clip with.
Is this the intended behavior? Is there some reason that clipping based
on cell data is not possible, or supported? If it's possible, can we
get vtkClipPolyData.cxx augmented to clip on cell data too?
I tried changing the line above to set clipScalars from the cell data,
i.e.,
clipScalars = inCD->GetScalars();
The resulting pipeline was able to display something, but the clipping
did not look right, i.e., some criterion was applied for clipping, but
the wrong cells appear to have been clipped.
Thanks for any help,
Chris
==========================================================================
Chris Myers
Cornell Theory Center
--------------------------------------------------------------------------
636 Rhodes Hall email: myers at tc.cornell.edu
Cornell University phone: (607) 255-5894 / fax: (607) 254-8888
Ithaca, NY 14853 http://www.tc.cornell.edu/~myers
--------------------------------------------------------------------------
"To thine own self be blue." - Polonious Funk
==========================================================================
More information about the vtkusers
mailing list