[vtkusers] Solid Voxelization with VTK
Berti Krüger
berti_krueger at hotmail.com
Tue Jun 5 03:26:27 EDT 2018
Hi David,
thank you very much for your help.
I tried the example from your link. Unfortunately the result is same as using the vtkVoxelModeller:
[Screenshot result voxelization]
I get only a voxelization of the surface. The interior of the voxelized cone is still hollow and not filled with voxels (at least this is implied by the visualization).
For the visualization i use Bill Lorensen's example code from here:
https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/
I have attached this small example which compiles with VTK 8.1 to show the issue. It basicly only consist of the example code from your link (https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/) and the visualization code from the Bill Lorensen's example from the link above. I have not changed much.
Any idea what is going wrong or what can i do get also voxelization of the interior (solid voxelization)?
Thank you very much in advance.
Regards
Berti
PolyDataToImageData - lorensen.github.io<https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/>
lorensen.github.io
If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build:
GenerateCubesFromLabels - GitHub Pages<https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/>
lorensen.github.io
Usage: GenerateCubesFromLabels FullHead.mhd StartLabel EndLabel where InputVolume is a meta file containing a 3 volume of discrete labels.
________________________________
Von: David Gobbi <david.gobbi at gmail.com>
Gesendet: Montag, 28. Mai 2018 23:13
An: Berti Krüger
Cc: vtkusers at vtk.org
Betreff: Re: [vtkusers] Solid Voxelization with VTK
Hi Berti,
If its a triangulated surface that you want to fill with voxels, use vtkPolyDataToImageStencil:
https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/
PolyDataToImageData - lorensen.github.io<https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/>
lorensen.github.io
If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build:
If its a mesh of 3D elements and you want to sample the elements to create voxels, try vtkResampleToImage.
- David
On Mon, May 28, 2018 at 4:41 PM, Berti Krüger <berti_krueger at hotmail.com<mailto:berti_krueger at hotmail.com>> wrote:
Hello Everyone.
For my Project i have to voxelize a 3D-Triangle-Mesh. I already found the
vtkVoxelModeller which, while somewhat slow (only around 200 Triangles per
second), works, but only voxelizes the outer shell where the mesh boundary
triangles are. The inner part of the mesh stays hollow.
Is there some way to get solid voxelization of 3D-Triangle-Meshes out of the
box with VTK ?
Thank you very much in advance,
Berti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180605/0ad053f1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot.jpg
Type: image/jpeg
Size: 62429 bytes
Desc: screenshot.jpg
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180605/0ad053f1/attachment.jpg>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180605/0ad053f1/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PolyDataToImageDataVisualization.cxx
Type: text/x-c++src
Size: 7162 bytes
Desc: PolyDataToImageDataVisualization.cxx
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180605/0ad053f1/attachment.cxx>
More information about the vtkusers
mailing list