[vtkusers] remove triangles from polydata
Dean Inglis
dean.inglis at sympatico.ca
Sun Nov 16 14:01:33 EST 2008
Hi,
I have a vtkPolydata 3D surface comprised of triangles
with scalar values associated with the point data. I want
to remove all triangles having a scalar value of 0 at all
three points of the triangles. After which, I want to measure
the volume of the surface using vtkMassProperties.
vtkThreshold does almost exactly
what I need with the exception that it outputs a
vtkUnstructuredGrid and not a vtkPolyData.
vtkThreshold* threshold = vtkThreshold::New();
threshold->SetInputConnection( poly );
threshold->AllScalarsOn();
threshold->SetPointsDataTypeToFloat();
threshold->SetAttributeModeToUsePointData();
threshold->ThresholdByUpper( 0 );
How can I recover a vtkPolyData? I have
seen vtkUnstructuredGridToPolyDataFilter
but this is an abstract class.
Dean
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dean Inglis, PhD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~ Center for Appendicular ~~~~~
Magnetic Resonance Imaging Studies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
610 - 25 Charlton Ave. E.
Hamilton, Ontario, L8N 1Y2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assistant Professor (Adjunct)
Department of Civil Engineering
McMaster University
Hamilton, Ontario
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Software Demos:
http://www.youtube.com/watch?v=_zYNtHC9-0s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081116/8c7578e1/attachment.htm>
More information about the vtkusers
mailing list