<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi all.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I am very sorry to revive this ancient thread. </p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">But i thought that maybe it could help other vtk users in the future to have a compilable and working example of the final result. If someone thinks that this code could be useful as an vtk example then feel free to modify
 / correct / pimp / add this to the vtk examples on github.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I adapted the 3D slicer vtk code Csaba has pointed me to and incorporated the hints from David and everything works like a charm:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><img size="65894" contenttype="image/jpeg" id="652102_rs|3" style="user-select: none; width: 384px; height: 281.062px;" tabindex="0" width="384" height="281" data-outlook-trace="F:1|T:1" src="cid:795e083b-ffaa-4d6b-8b3f-97deb637b01c"></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">The whole procedure is incredibly simple. Basically the vtkPolyData of the mesh is converted via the <span>vtkPolyDataToImageStencil filter to a <span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">vtkImageStencil</span> and
 the rest of the </span>whole magic is only done by the vtkImageStencil filter:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div><span style="font-family: "Courier New", monospace;"><b><span style="font-size: 9pt;">// Convert stencil to image</span></b></span></div>
<div><span style="font-family: "Courier New", monospace;"><b><span style="font-size: 9pt;">vtkNew<vtkImageStencil> stencil;</span></b></span></div>
<div><span style="font-family: "Courier New", monospace;"><b><span style="font-size: 9pt;">stencil->SetInputData(binaryLabelMap);</span></b></span></div>
<div><span style="font-family: "Courier New", monospace;"><b><span style="font-size: 9pt;">stencil->SetStencilConnection(polyDataToImageStencil->GetOutputPort());</span></b></span></div>
<div><span style="font-family: "Courier New", monospace;"><b><span style="font-size: 9pt;">stencil->ReverseStencilOn();</span></b></span></div>
<div><b><span style="font-family: "Courier New", monospace; font-size: 9pt;">stencil->SetBackgroundValue(1); // General foreground value is 1 (background value because of reverse </span></b><span style="font-family: "Courier New", monospace;"><b><span style="font-size: 9pt;">stencil)</span></b></span></div>
<div><br>
</div>
I would really like to know very roughly how the vtkImageStencil works internally without digging through all of the source code. Because it is really fast (some kind of rasterization maybe ?). If someone could drop me a line on how it works only in principle 
 that would be really great.
<p></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">So thanks again to Bill, Csaba, David, Elvis and everyone else on this thread.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<p style="margin-top:0;margin-bottom:0">Kind regards,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Berti</p>
<p style="margin-top:0;margin-bottom:0"><br>
<br>
</p>
PS: Example code, CMakeLists and example STL mesh are attached<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Csaba Pinter <csaba.pinter@queensu.ca><br>
<b>Gesendet:</b> Montag, 11. Juni 2018 12:45<br>
<b>An:</b> Berti Krüger<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Betreff:</b> RE: [vtkusers] Solid Voxelization with VTK</font>
<div> </div>
</div>
<meta content="text/html; charset=Windows-1252">
<meta name="x_Generator" content="Microsoft Word 15 (filtered medium)">
<div lang="EN-US" link="blue" vlink="purple" style="background-color:white">
<div class="x_WordSection1">
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:windowtext">Hi Berti,</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:windowtext"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:windowtext">That code is under BSD-style license, so you’re free to do basically anything with it. This implementation is already pretty simple; just a concatenation
 of several VTK filters, so you can just give it a try by copy-pasting the relevant part of that function into your code and see if it works. If you’re interested in using the vtkSegmentation library, let me know though!</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:windowtext"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:windowtext">Best,</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:windowtext">csaba</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:windowtext"> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal"><b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:windowtext">From:</span></b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:windowtext"> Berti Krüger <berti_krueger@hotmail.com>
<br>
<b>Sent:</b> Monday, June 11, 2018 02:46<br>
<b>To:</b> Csaba Pinter <csaba.pinter@queensu.ca>; David Gobbi <david.gobbi@gmail.com><br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] Solid Voxelization with VTK</span></p>
</div>
</div>
<p class="x_MsoNormal"> </p>
<p>Hi Csaba,</p>
<p> </p>
<p>thank you very much for you answer and for offering your help.</p>
<p> </p>
<p>I already have looked at it and i think if no simpler option will come up, i will give it a try (hoping not to have to change too much to get it working with my pipeline since i am an absolute vtk beginner :-) ).</p>
<p> </p>
<p>How is this code licensed ? (i am only doing research work at the moment, the whole project i am working on is internal and just for testing and part of some larger work, it might be open sourced one day in the very far future but could even be not at all 
 and it will never be used commercially).</p>
<p> </p>
<p> </p>
<p>Regards</p>
<p> </p>
<p>Berti</p>
<p> </p>
<p class="x_MsoNormal"> </p>
<div>
<p class="x_MsoNormal">Am 05.06.2018 um 16:14 schrieb Csaba Pinter:</p>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Hi Berti,</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">There is a pretty robust conversion algorithm implemented within 3D Slicer but using solely VTK:</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSlicer%2FSlicer%2Fblob%2Fmaster%2FLibs%2FvtkSegmentationCore%2FvtkClosedSurfaceToBinaryLabelmapConversionRule.cxx%23L118&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C3aab37ccc6914427982508d5cf66eedc%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636642963366161717&sdata=p0ekXyWC0VAuADrfhvReHFywfi8%2BD7jhe59iVCIZmqs%3D&reserved=0" id="LPlnk784568" class="OWAAutoLink" previewremoved="true">https://github.com/Slicer/Slicer/blob/master/Libs/vtkSegmentationCore/vtkClosedSurfaceToBinaryLabelmapConversionRule.cxx#L118</a></span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">It consists of a short pipeline of standard VTK filters (some preprocessing then vtkPolyDataToImageStencil and vtkImageStencil).</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Let me know if you have any questions.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">csaba</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal"><b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> vtkusers
<a href="mailto:vtkusers-bounces@public.kitware.com" id="LPlnk325079" class="OWAAutoLink" previewremoved="true">
<vtkusers-bounces@public.kitware.com></a> <b>On Behalf Of </b>Berti Krüger<br>
<b>Sent:</b> Tuesday, June 5, 2018 03:26<br>
<b>To:</b> David Gobbi <a href="mailto:david.gobbi@gmail.com" id="LPlnk465500" class="OWAAutoLink" previewremoved="true">
<david.gobbi@gmail.com></a><br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" id="LPlnk106640" class="OWAAutoLink" previewremoved="true">
vtkusers@vtk.org</a><br>
<b>Subject:</b> Re: [vtkusers] Solid Voxelization with VTK</span></p>
</div>
</div>
<p class="x_MsoNormal"> </p>
<div id="x_divtagdefaultwrapper">
<p><span style="font-family:"Calibri",sans-serif">Hi David,</span></p>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<p><span style="font-family:"Calibri",sans-serif">thank you very much for your help.</span></p>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<p><span style="font-family:"Calibri",sans-serif">I tried the example from your link. Unfortunately the result is same as using the vtkVoxelModeller:</span></p>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<p><span style="font-family:"Calibri",sans-serif"><img border="0" width="800" height="811" id="x__x0037_4177_rs_x007c_1" alt="Screenshot result voxelization" style="width: 8.3333in; height: 8.4479in; user-select: none;" tabindex="0" data-outlook-trace="F:1|T:1" src="cid:image001.jpg@01D40160.9EEDCDA0"><br>
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).</span></p>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<p><span style="font-family:"Calibri",sans-serif">For the visualization i use Bill Lorensen's example code from here:</span></p>
<p><span style="font-family:"Calibri",sans-serif"><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FMedical%2FGenerateCubesFromLabels%2F&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C63496d6b50e24ff32f7808d5cab5a98b%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636637804016225671&sdata=4TKi7VbGBfbM4DpQuLib1m0YGmLJO%2FU7BAO6ZKCUpVU%3D&reserved=0" id="LPlnk363920" previewremoved="true">https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/</a></span></p>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<p><span style="font-family:"Calibri",sans-serif">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 (<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FPolyData%2FPolyDataToImageData%2F&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C63496d6b50e24ff32f7808d5cab5a98b%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636637804016225671&sdata=hXqgnekqjjNPflRneU0sU7DFo%2B%2FcdBfIFDcpE%2FZXiOg%3D&reserved=0" id="LPlnk404825" previewremoved="true">https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/</a>)
 and the visualization code from the  Bill Lorensen's example from the link above. I have not changed much.</span></p>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<p><span style="font-family:"Calibri",sans-serif">Any idea what is going wrong or what can i do get also voxelization of the interior (solid voxelization)?</span></p>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<p><span style="font-family:"Calibri",sans-serif">Thank you very much in advance.</span></p>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<p><span style="font-family:"Calibri",sans-serif">Regards</span></p>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<p><span style="font-family:"Calibri",sans-serif">Berti</span></p>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif"> </span></p>
<div id="LPBorder_GT_15281833117650.8290773938385372" style="margin-bottom:15.0pt; overflow:auto">
<table class="x_MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="90%" style="width:90.0%; background:white; border-top:dotted #C8C8C8 1.0pt; border-left:none; border-bottom:dotted #C8C8C8 1.0pt; border-right:none">
<tbody>
<tr>
<td valign="top" style="border:none; padding:0in 0in 0in 0in">
<div id="LPTitle_15281833117630.11207222027314834">
<p class="x_MsoNormal" style="margin-top:15.0pt"><span style="font-size:16.0pt"><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FPolyData%2FPolyDataToImageData%2F&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C63496d6b50e24ff32f7808d5cab5a98b%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636637804016225671&sdata=hXqgnekqjjNPflRneU0sU7DFo%2B%2FcdBfIFDcpE%2FZXiOg%3D&reserved=0" target="_blank" id="LPlnk95838" class="OWAAutoLink" previewremoved="true"><span style="text-decoration:none">PolyDataToImageData
 - lorensen.github.io</span></a></span></p>
</div>
<div id="LPMetadata_15281833117640.37822664008060847" style="margin-top:7.5pt; margin-bottom:12.0pt">
<p class="x_MsoNormal" style="margin-top:15.0pt; line-height:10.5pt"><span style="font-size:10.5pt">lorensen.github.io</span></p>
</div>
<div id="LPDescription_15281833117650.4396140244786022">
<p class="x_MsoNormal" style="margin-top:15.0pt; line-height:15.0pt"><span style="font-size:10.5pt">If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build:</span></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<p><span style="font-family:"Calibri",sans-serif"> </span></p>
<div id="LPBorder_GT_15281830212730.19571757144054258" style="margin-bottom:15.0pt; overflow:auto">
<table class="x_MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="90%" style="width:90.0%; background:white; border-top:dotted #C8C8C8 1.0pt; border-left:none; border-bottom:dotted #C8C8C8 1.0pt; border-right:none">
<tbody>
<tr>
<td valign="top" style="border:none; padding:0in 0in 0in 0in">
<div id="LPTitle_15281830212690.8554042823458445">
<p class="x_MsoNormal" style="margin-top:15.0pt"><span style="font-size:16.0pt"><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FMedical%2FGenerateCubesFromLabels%2F&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C63496d6b50e24ff32f7808d5cab5a98b%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636637804016225671&sdata=4TKi7VbGBfbM4DpQuLib1m0YGmLJO%2FU7BAO6ZKCUpVU%3D&reserved=0" target="_blank" id="LPlnk571525" class="OWAAutoLink" previewremoved="true"><span style="text-decoration:none">GenerateCubesFromLabels
 - GitHub Pages</span></a></span></p>
</div>
<div id="LPMetadata_15281830212710.7303898190223084" style="margin-top:7.5pt; margin-bottom:12.0pt">
<p class="x_MsoNormal" style="margin-top:15.0pt; line-height:10.5pt"><span style="font-size:10.5pt">lorensen.github.io</span></p>
</div>
<div id="LPDescription_15281830212720.03673246019722454">
<p class="x_MsoNormal" style="margin-top:15.0pt; line-height:15.0pt"><span style="font-size:10.5pt">Usage: GenerateCubesFromLabels FullHead.mhd StartLabel EndLabel where InputVolume is a meta file containing a 3 volume of discrete labels.</span></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p class="x_MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Calibri",sans-serif"> </span></p>
<p class="x_MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Calibri",sans-serif"> </span></p>
<div>
<div class="x_MsoNormal" align="center" style="text-align:center"><span style="font-family:"Calibri",sans-serif">
<hr size="2" width="98%" align="center">
</span></div>
<div id="x_divRplyFwdMsg">
<p class="x_MsoNormal"><b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Von:</span></b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> David Gobbi <<a href="mailto:david.gobbi@gmail.com" id="LPlnk577224" class="OWAAutoLink" previewremoved="true">david.gobbi@gmail.com</a>><br>
<b>Gesendet:</b> Montag, 28. Mai 2018 23:13<br>
<b>An:</b> Berti Krüger<br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" id="LPlnk460001" class="OWAAutoLink" previewremoved="true">
vtkusers@vtk.org</a><br>
<b>Betreff:</b> Re: [vtkusers] Solid Voxelization with VTK</span><span style="font-family:"Calibri",sans-serif">
</span></p>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif"> </span></p>
</div>
</div>
<div>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif">Hi Berti, </span>
</p>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif">If its a triangulated surface that you want to fill with voxels, use vtkPolyDataToImageStencil:</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif"><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FPolyData%2FPolyDataToImageData%2F&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C63496d6b50e24ff32f7808d5cab5a98b%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636637804016225671&sdata=hXqgnekqjjNPflRneU0sU7DFo%2B%2FcdBfIFDcpE%2FZXiOg%3D&reserved=0" target="_blank" id="LPlnk739546" previewremoved="true">https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/</a>
</span></p>
<div id="LPBorder_GT_15281827222900.5768444366185992" style="margin-bottom:15.0pt; overflow:auto">
<table class="x_MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="90%" style="width:90.0%; background:white; border-top:dotted #C8C8C8 1.0pt; border-left:none; border-bottom:dotted #C8C8C8 1.0pt; border-right:none">
<tbody>
<tr>
<td valign="top" style="border:none; padding:0in 0in 0in 0in">
<div id="LPTitle_15281827222890.533190778266545">
<p class="x_MsoNormal" style="margin-top:15.0pt"><span style="font-size:16.0pt"><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FPolyData%2FPolyDataToImageData%2F&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C63496d6b50e24ff32f7808d5cab5a98b%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636637804016225671&sdata=hXqgnekqjjNPflRneU0sU7DFo%2B%2FcdBfIFDcpE%2FZXiOg%3D&reserved=0" target="_blank" id="LPlnk431257" class="OWAAutoLink" previewremoved="true"><span style="text-decoration:none">PolyDataToImageData
 - lorensen.github.io</span></a></span></p>
</div>
<div id="LPMetadata_15281827222890.7452275815734757" style="margin-top:7.5pt; margin-bottom:12.0pt">
<p class="x_MsoNormal" style="margin-top:15.0pt; line-height:10.5pt"><span style="font-size:10.5pt">lorensen.github.io</span></p>
</div>
<div id="LPDescription_15281827222900.21981643030984221">
<p class="x_MsoNormal" style="margin-top:15.0pt; line-height:15.0pt"><span style="font-size:10.5pt">If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build:</span></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p class="x_MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Calibri",sans-serif"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif">If its a mesh of 3D elements and you want to sample the elements to create voxels, try vtkResampleToImage.</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif"> - David</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif"> </span></p>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif"> </span></p>
<div>
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif">On Mon, May 28, 2018 at 4:41 PM, Berti Krüger <<a href="mailto:berti_krueger@hotmail.com" target="_blank" id="LPlnk570911" previewremoved="true">berti_krueger@hotmail.com</a>> wrote:</span></p>
<blockquote style="border:none; border-left:solid #CCCCCC 1.0pt; padding:0in 0in 0in 6.0pt; margin-left:4.8pt; margin-top:5.0pt; margin-right:0in; margin-bottom:5.0pt">
<p class="x_MsoNormal"><span style="font-family:"Calibri",sans-serif">Hello Everyone.<br>
<br>
For my Project i have to voxelize a 3D-Triangle-Mesh. I already found the<br>
vtkVoxelModeller which, while somewhat slow (only around 200 Triangles per<br>
second), works, but only voxelizes the outer shell where the mesh boundary<br>
triangles are. The inner part of the mesh stays hollow. <br>
<br>
Is there some way to get solid voxelization of 3D-Triangle-Meshes out of the<br>
box with VTK ?<br>
<br>
<br>
Thank you very much in advance,<br>
<br>
Berti</span></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<p class="x_MsoNormal"> </p>
</div>
</div>
</div>
</div>
</body>
</html>