[vtkusers] Create "cuberille" kind of vtkPolyData from vtkImageData
David Gobbi
david.gobbi at gmail.com
Sun Feb 3 15:18:26 EST 2013
On Sun, Feb 3, 2013 at 1:02 PM, joopeter <joo.peter at gmail.com> wrote:
> I am wondering what is the most straightforward way to create that kind of
> mesh in VTK.
>
> You can check what is it here:
> http://www2.imm.dtu.dk/~janba/gallery/polygonization.html
> <http://vtk.1045678.n5.nabble.com/file/n5718248/cuberille-candypig.png>
>
> Obviously internal faces need to be avoided in the final mesh, that's why
> vtkImageDataGeometryFilter is not OK I guess.
>
> I think the most complex part of this to *correctly set up the mesh
> topology* (which vertexes are connected to which other) and to *correctly
> set up cell ordering*.
>
> I understand that the final mesh is aliased compared to what Marching Cubes
> produces but for me this 'cuberille' behaviour is a must for my project.
>
> Any opinion and pseudocode are welcome!
This might be possible as a two-stage process:
1) Use vtkThreshold to create a 3D mesh that only contains voxels
above threshold.
2) Use vtkGeometryFilter to get all the polygons that make up the
surface of the mesh.
- David
More information about the vtkusers
mailing list