[vtkusers] Extract different vtkPolyData from vtkPolyDataConnectivityFilter
Federico Milano
fmilano at gmail.com
Wed May 16 11:23:32 EDT 2012
Thanks David. The first approach is what I'm looking for. The thing is that
I want to extract all the regions to different vtkPolyData. How do I know
the number of regionIds I can add with AddSpecifiedRegion?
Right now, if I run this code <http://pastie.org/3920656> I get 40 in
numberOfRegions and 1 in numberOfOutputs. But if I render
the colored output, I see only 2 regions These 2 regions are, in fact, what
I'm expecting, but this does not match with numberOfRegions or with
numberOfOutputs.
Do you know how can I extract a variable number of regions?
Thanks,
Federico
On Tue, May 15, 2012 at 4:54 PM, David Doria <daviddoria at gmail.com> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120516/16f2e4a4/attachment.htm>
More information about the vtkusers
mailing list