[vtkusers] Scan convert a mesh to voxel data
David Doria
daviddoria+vtk at gmail.com
Tue Mar 16 09:32:49 EDT 2010
On Tue, Mar 16, 2010 at 5:24 AM, Roman Grothausmann
<roman.grothausmann at helmholtz-berlin.de> wrote:
> Dear mailing list members,
>
>
> We try to create a small py-script that allows one to create a test image
> from a few blender meshes. The idea is to create some blender mesh objects
> that then get rasterized into 3D voxel data (dimensions are supplied by the
> user). We'd want a black (value 0) backgournd and closed meshs to be filled
> by a foreground value, either 1 for all or a different integer value for
> each individual object. As a later extension : open meshes we'd like to get
> a voxel contour of and points should turn up as a single voxels.
> In the software Avizo the module doing this is called ScanConvertSurface.
>
> Concentrating on the closed meshes first:
> We tried vtkVoxelModeller (see
> http://www.vtk.org/pipermail/vtkusers/2010-March/106866.html) but with no
> luck. For one vtk_bit is no longer supported by the image writer (as
> mentioned in the example:
> http://www.itk.org/Wiki/VTK/Examples/VoxelModeller). The vtkVoxelModeller
> test uses vtkDataSetWriter. But if we look at the output then with paraview,
> we see nothing.
> Using vtkImplicitModeller we get some output but closed mesh-objects don't
> get filled.
> Is there a better way to do this?
>
> I found also this thread:
> http://www.vtk.org/pipermail/vtkusers/2010-March/107087.html
>
> The problem seems similar but I wonder what the vtkVoxelModeller is meant
> for? Why would one start with a mesh, voxelize it and then mesh it again?
> That's in that tread and also in the vtkVoxelModeller test.
>
> Any help or hints on this are very much appreciated
> Roman
>
>
> --
> Roman Grothausmann
>
I recently fixed this by changing vtkVoxelModeller from using VTK_BIT
to VTK_UNSIGNED_CHAR. If you are building VTK from source, you can get
the new file from here:
http://public.kitware.com/Bug/view.php?id=10414
and re-build VTK.
Thanks,
David
More information about the vtkusers
mailing list