[vtkusers] remove triangles from polydata
Dean Inglis
dean.inglis at camris.ca
Mon Nov 17 08:30:11 EST 2008
thanks Dominik, that was what I needed.
Dean
Most likely you need the dataset surface filter.
Dominik
Dean Inglis wrote:
> 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
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
--
Dominik Szczerba, PhD
Computational Physics Group
IT'IS Foundation
http://www.itis.ethz.ch
More information about the vtkusers
mailing list