[vtkusers] vtkFeatureEdges, vtkUnstructuredGrid to vtkPolyData and their writers

lynx.abraxas at freenet.de lynx.abraxas at freenet.de
Fri Jan 15 15:33:31 EST 2010


On 15/01/10 15:04:48, David Doria wrote:
> I started a brief summary of these data types here: (mainly taken from
> the VTK book)
>
> http://www.cmake.org/Wiki/VTK_3D_Data_Types#Structured_Grid

Great! Would it make sense to add the corresponding readers/writers. For image
data quite a lot...

> vtkDelaunay3D definitely creates 3D cells (tetrahedra). That is why it
> cannot be a PolyData, because polydata only accepts 0,1,2D cells. It
> must be an unstructured grid (which also accepts 3D cells).
>
> You should use vtkXMLPolyDataWriter for PolyData.
> You should use vtkXMLUnstructuredGridWriter for UnstructuredGrid.
>
> So to your main question - you can't directly convert from an
> unstructured grid to a polydata because the unstructured grid can
> contain elements that are not allowed in a polydata. You must use
> either a filter that takes 3d cells as input and outputs only 2d cells
> (such as vtkDataSetSurfaceFilter) or find some other way of getting
> the things you need from the unstructured grid into the polydata (but
> only things that are allowed in polydata!)

Thanks. Now I got it. I didn't  know  that  there  are  3D  cells.  For  me  a
tetrahedra  was  alwas  four  2D cells. So to get from an unstructured grid to
polydata I need a triangulate in 3d (tetrahedragulate) and then a filter  that
make  four  2D cells out of one tetrahedron?Does some filter like that already
exist in vtk? ;-)

Thanks a lot again for Your quick answer.
Lynx



More information about the vtkusers mailing list