[vtkusers] New filter class: vtkPolyDataToUnstructuredGridFilter

Jérôme jerome.velut at gmail.com
Mon Mar 22 07:36:52 EDT 2010


Hi Oliver,

when I use vtkThreshold on an vtkImageData, I get a fulfilled unstructured
grid,
I mean, 3D grid. You can easily check this by cutting your object along a
plane:
if the result is a 1D curve, then your object is 2D, ie a surface. In my
case,
when I cut a thresholded binary sphere along a plane, I get a fulfilled
ellipse. It means
that my thresholded binary sphere is 3D (well, quickly speaking).

However, I don't know if the retained cells are only the hulls of polyhedra
or the
polyhedra themselves. It could be your question, but I don't have the answer
!

Best regards,
Jerome


2010/3/22 Oliver Rudolph <oliver.rudolph at iisb.fraunhofer.de>

> Hi Jérôme,
>
> okay, from what I've read about vtkThreshold (did not try it yet), this
> would give me an unstructured grid but with the surface cells only, right?
>
> But what I would really need (as posted a couple of minutes earlier) is
> the surface filled with tetrahedra...
>
> Yours,
> Oliver
>
>
>
> Jérôme wrote:
> > Hi,
> > I feel surprised about the conversion from PolyData to UnstructuredGrid
> > posts: I didn't see them!
> >
> > I have a quite fast solution, I don't know it is suitable for you:
> > just pass your polydata in a vtkThreshold, with thresholds being set
> > to actual min and max values of any of your data array. If you don't
> > have any array, just add a vtkGenerateIndexArray before the threshold
> >
> > note: you can easily check this pipeline with paraview:
> > Sphere Source -> Generate Point Ids -> Threshold
> >
> > HTH
> > Jerome
> >
> > 2010/3/19 Oliver Rudolph <oliver.rudolph at iisb.fraunhofer.de
> > <mailto:oliver.rudolph at iisb.fraunhofer.de>>
> >
> >     Hi folks!
> >
> >     There had been several postings on conversion from vtkPolyData to
> >     vtkUnstructuredGrid in the past with no really accessible solutions
> >     except the global statement "write a filter on your own".
> >
> >     Now, I was confronted with doing quite the same conversion and found
> a
> >     rather quick solution doing some 3D delaunization. Although this is
> not
> >     yet stable in all situations there are, "normal" input as I had been
> >     confronted with up to know, worked well.
> >
> >     Maybe you have suggestions for improvement or other approaches to
> this
> >     problem. So far, please find attached the source files, maybe you'll
> >     want to add them to the vtk codebase (which would make me a little
> >     proud :)
> >
> >
> >     Best regards,
> >     Oliver
> >
> >     _______________________________________________
> >     Powered by www.kitware.com <http://www.kitware.com>
> >
> >     Visit other Kitware open-source projects at
> >     http://www.kitware.com/opensource/opensource.html
> >
> >     Please keep messages on-topic and check the VTK FAQ at:
> >     http://www.vtk.org/Wiki/VTK_FAQ
> >
> >     Follow this link to subscribe/unsubscribe:
> >     http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100322/e8ec5969/attachment.htm>


More information about the vtkusers mailing list