[vtkusers] vtkPolyDataConnectivityFilter Help

Sylvain Jaume sylvain.jaume at kitware.com
Wed Nov 23 17:18:18 EST 2005


Hi Mike,

You could set ColorRegionsOn in vtkPolyDataConnectivityFilter.
Then use vtkClipPolyData with SetValue set to the region id (i in your 
code).

Cheers,
Sylvain

Mike Jackson wrote:

> I have the need to take as input a set of volume data and output a  
> specialized file where the groups of triangles are written together.  
> I have the reading of the data file done and the data converted into  
> a mesh (vtkPolyData). I then run the vtkPolyDataConnectivityFilter on  
> the data and I can see through printouts that it agrees with some  
> other algorithms for grouping the triangles based on connectivity. So  
> what I need to do at this point is extract each "group" of triangles  
> so I can write them out to a file.
>   What I am imagining in pseudo code is:
>
> list currentTriangles;
> int numGroups = vtkPolyDataConnectivityFilter.getNumberOfRegions
> for (int i = 0; i < numGroups; i++)
> {
>     currentTriangles = vtkPolyDataConnectivityFilter.getRegion(i);
>     writeTrianglesToFile;
> }
>
> or something like that.
>
> I have been reading "Visualization Toolkit, 3rd Edition" to try to  
> understand the structure of vtkPolyData but I am coming up a bit  
> short. Could someone point me in the right direction?
>
> ---
> Mike Jackson
> mike _at_ bluequartz dot net
>
>
> _______________________________________________
> 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
>



More information about the vtkusers mailing list