[vtkusers] Re: Extract connected components -> single images -> volume

Goodwin Lawlor goodwin.lawlor at ucd.ie
Mon Nov 15 03:23:17 EST 2004


Michnay,

Have you tried the vtkImageSeedConnectivity class? Alternatively, contour
your binary volume as-is and extract each of the polydata models using
vtkPolyDataConnectivityFilter.

Posting some example code could help to see what's going wrong with
vtkConnectivityFilter.

hth

Goodwin

"Michnay Balázs" <michnay at freemail.hu> wrote in message
news:freemail.20041015085014.25519 at fm7.freemail.hu...
> Dear VTK Users,
> I have spent many time trying to solve my problem but I couldn't find a
> solution. What my problem is:
>
> I have an binary vtkImageData (which I use as a mask).
> What I'd like to do is to extract all the connected components (from the
> masked image) as single images to build a volume from them.
>
> It doesn't seem something impossible but I don't know how to do this.
> There must be a way...
> I tried vtkConnectivityFilter but GetNumberOfConnectedRegions()
> always returns 1. If I set ColorRegion() to TRUE the whole image
> becomes red, so the only one extracted region is the whole image...
> Can I use vtkConnectivityFilter to extract the regions or do I need to
> use another class?
>
> If someone has done similar things before, please help, I'm stuck at
> this point.
> Thanks a lot in advance,
> All the best,
>
>  MB
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
&lt;http://www.vtk.org/Wiki/VTK_FAQ&gt;
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>






More information about the vtkusers mailing list