[vtkusers] Extract different vtkPolyData from vtkPolyDataConnectivityFilter

David Doria daviddoria at gmail.com
Tue May 15 15:54:53 EDT 2012


On Tue, May 15, 2012 at 3:46 PM, Federico Milano <fmilano at gmail.com> wrote:
> Hi. This is probably very simple but I'm not seeing it. How can I extract
> the polydata that correspond to the different regions found by
> the vtkPolyDataConnectivityFilter? I can render the output of this filter
> with colors and the regions are there, but I don't find a way to extract a
> different polydata for each regions.
>
> I would really appreciate any hint.
>
> Thanks in advance,
>
> Federico

You can either extract the region directly with the
vtkPolyDataConnectivityFilter like this:

http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/vtkPolyDataConnectivityFilter_SpecifiedRegion

or later you can extract the RegionId array from the PointData and use
it to threshold the data, using something like this:

http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/ExtractSelectedThresholds

David



More information about the vtkusers mailing list