<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.m-8313790439840091783xmsonormal, li.m-8313790439840091783xmsonormal, div.m-8313790439840091783xmsonormal
        {mso-style-name:m_-8313790439840091783x_msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-CA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Hi David,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">If the documentation is lacking, and you made the effort to give an explanation, then I think it would make sense to add this to the doxy. It would
 be simpler if someone with push access could just add it, but let me know and I’ll make a MR.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Btw the discussion is very interesting, and I’ll make some changes accordingly to the algorithm in Slicer too.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">csaba<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> David Gobbi [mailto:david.gobbi@gmail.com]
<br>
<b>Sent:</b> Sunday, September 23, 2018 12:16<br>
<b>To:</b> Berti Krüger<br>
<b>Cc:</b> Csaba Pinter; VTK Users<br>
<b>Subject:</b> Re: [vtkusers] Solid Voxelization with VTK<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in">Hi Berti,<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Thanks for the code, I'm sure that people will find it useful.  The vtkImageStencilData class isn't described in much detail in the VTK documentation, but I can provide a brief description.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">The vtkImageStencilData object stores each raster-line of a binary image as a list of (begin, end) pairs.  That is, each raster line has zero or more non-overlapping (begin, end) pairs.  When vtkImageStencil operates
 on an image, it simply iterates through the (begin, end) pairs to figure out what parts of the image to copy.  One way to think about this is that if the original binary image volume is stored as O(n^3) voxels, the vtkImageStencilData stores O(n^2) values.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">When a vtkImageStencilData is created, it allocates enough memory to store one (begin, end) pair per raster line, since this matches the most common use case (i.e. a mask that corresponds to a convex object). Thereafter
 it performs additional allocations as necessary.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">As for vtkPolyDataToImageStencil, it works by cutting your STL object along each XY plane to create polygons (zero or more polygons per slice), and then it rasterizes each polygon to create the (begin, end) pairs
 for each raster line.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">One comment about your code: it would be more efficient to use vtkImageStencilToImage instead of vtkImageStencil and vtkImageCast.  The vtkImageStencilToImage filter requires only one input (the stencil), i.e. it
 doesn't require 'binaryLabelMap' as input.  Also, you can set the data type of the image that it produces as output, so it doesn't have to be followed by a cast.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> - David<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">On Sat, Sep 22, 2018 at 10:29 PM Berti Krüger <<a href="mailto:berti_krueger@hotmail.com">berti_krueger@hotmail.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div id="m_-8313790439840091783divtagdefaultwrapper">
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black">Hi all.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black">I am very sorry to revive this ancient thread. <o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black">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.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black">I adapted the 3D slicer vtk code Csaba has pointed me to and incorporated the hints from David and everything works like a charm:<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black"><img border="0" width="384" height="281" id="m_-8313790439840091783652102_rs_x007c_3" src="cid:795e083b-ffaa-4d6b-8b3f-97deb637b01c"><o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black">The whole procedure is incredibly simple. Basically the vtkPolyData of the mesh is converted via the vtkPolyDataToImageStencil filter to a vtkImageStencil and the rest of the whole magic is only done
 by the vtkImageStencil filter:<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:9.0pt;font-family:"Courier New";color:black">// Convert stencil to image</span></b><span style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:9.0pt;font-family:"Courier New";color:black">vtkNew<vtkImageStencil> stencil;</span></b><span style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:9.0pt;font-family:"Courier New";color:black">stencil->SetInputData(binaryLabelMap);</span></b><span style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:9.0pt;font-family:"Courier New";color:black">stencil->SetStencilConnection(polyDataToImageStencil->GetOutputPort());</span></b><span style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:9.0pt;font-family:"Courier New";color:black">stencil->ReverseStencilOn();</span></b><span style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:9.0pt;font-family:"Courier New";color:black">stencil->SetBackgroundValue(1); // General foreground value is 1 (background value because of reverse stencil)</span></b><span style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Calibri",sans-serif;color:black">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.
<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black">So thanks again to Bill, Csaba, David, Elvis and everyone else on this thread.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black">Kind regards,<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-family:"Calibri",sans-serif;color:black">Berti<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">
<span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">
<span style="font-family:"Calibri",sans-serif;color:black">PS: Example code, CMakeLists and example STL mesh are attached<o:p></o:p></span></p>
<div>
<div class="MsoNormal" align="center" style="margin-left:.5in;text-align:center">
<span style="font-family:"Calibri",sans-serif;color:black">
<hr size="2" width="98%" align="center">
</span></div>
<div id="m_-8313790439840091783divRplyFwdMsg">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Von:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> Csaba Pinter <<a href="mailto:csaba.pinter@queensu.ca" target="_blank">csaba.pinter@queensu.ca</a>><br>
<b>Gesendet:</b> Montag, 11. Juni 2018 12:45<br>
<b>An:</b> Berti Krüger<br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Betreff:</b> RE: [vtkusers] Solid Voxelization with VTK</span><span style="font-family:"Calibri",sans-serif;color:black">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Hi Berti,</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">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><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Best,</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">csaba</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Berti Krüger <<a href="mailto:berti_krueger@hotmail.com" target="_blank">berti_krueger@hotmail.com</a>>
<br>
<b>Sent:</b> Monday, June 11, 2018 02:46<br>
<b>To:</b> Csaba Pinter <<a href="mailto:csaba.pinter@queensu.ca" target="_blank">csaba.pinter@queensu.ca</a>>; David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>><br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Subject:</b> Re: [vtkusers] Solid Voxelization with VTK</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</div>
</div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">Hi Csaba,<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">thank you very much for you answer and for offering your help.<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">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 :-) ).<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">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).<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">Regards<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">Berti<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">Am 05.06.2018 um 16:14 schrieb Csaba Pinter:<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Hi Berti,</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">There is a pretty robust conversion algorithm implemented within 3D Slicer but using solely VTK:</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><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" target="_blank" id="m_-8313790439840091783LPlnk784568">https://github.com/Slicer/Slicer/blob/master/Libs/vtkSegmentationCore/vtkClosedSurfaceToBinaryLabelmapConversionRule.cxx#L118</a></span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">It consists of a short pipeline of standard VTK filters (some preprocessing then vtkPolyDataToImageStencil and vtkImageStencil).</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Let me know if you have any questions.</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">csaba</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> vtkusers
<a href="mailto:vtkusers-bounces@public.kitware.com" target="_blank" id="m_-8313790439840091783LPlnk325079">
<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" target="_blank" id="m_-8313790439840091783LPlnk465500">
<david.gobbi@gmail.com></a><br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank" id="m_-8313790439840091783LPlnk106640">
vtkusers@vtk.org</a><br>
<b>Subject:</b> Re: [vtkusers] Solid Voxelization with VTK</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</div>
</div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<div id="m_-8313790439840091783x_divtagdefaultwrapper">
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">Hi David,<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">thank you very much for your help.<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">I tried the example from your link. Unfortunately the result is same as using the vtkVoxelModeller:<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><img border="0" width="800" height="811" id="m_-8313790439840091783x_74177_rs_x007c_1" src="cid:image001.jpg@01D40160.9EEDCDA0" alt="Screenshot result voxelization"><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).<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">For the visualization i use Bill Lorensen's example code from here:<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><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="m_-8313790439840091783LPlnk363920">https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/</a><o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">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" target="_blank" id="m_-8313790439840091783LPlnk404825">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.<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">Any idea what is going wrong or what can i do get also voxelization of the interior (solid voxelization)?<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">Thank you very much in advance.<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">Regards<o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">Berti<o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<div style="margin-bottom:15.0pt;overflow:auto" id="m_-8313790439840091783LPBorder_GT_15281833117650.8290773938385372">
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="5%" style="width:5.12%;margin-left:.5in;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="m_-8313790439840091783LPTitle_15281833117630.11207222027314834">
<p class="m-8313790439840091783xmsonormal" 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"><span style="text-decoration:none">PolyDataToImageData
 - lorensen.github.io</span></a></span><o:p></o:p></p>
</div>
<div style="margin-top:7.5pt;margin-bottom:12.0pt" id="m_-8313790439840091783LPMetadata_15281833117640.37822664008060847">
<p class="m-8313790439840091783xmsonormal" style="margin-top:15.0pt;line-height:10.5pt">
<span style="font-size:10.5pt"><a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Florensen.github.io&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Cc3acb54dd8ab4c3d0b6008d6216fd21d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636733161494714334&sdata=XHLnKUx0oL5WzpyqIk5whM6Sv6rDflslQDtotOPpvas%3D&reserved=0" target="_blank">lorensen.github.io</a></span><o:p></o:p></p>
</div>
<div id="m_-8313790439840091783LPDescription_15281833117650.4396140244786022">
<p class="m-8313790439840091783xmsonormal" 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><o:p></o:p></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-left:.5in;background:white"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<div style="margin-bottom:15.0pt;overflow:auto" id="m_-8313790439840091783LPBorder_GT_15281830212730.19571757144054258">
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="5%" style="width:5.12%;margin-left:.5in;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="m_-8313790439840091783LPTitle_15281830212690.8554042823458445">
<p class="m-8313790439840091783xmsonormal" 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"><span style="text-decoration:none">GenerateCubesFromLabels
 - GitHub Pages</span></a></span><o:p></o:p></p>
</div>
<div style="margin-top:7.5pt;margin-bottom:12.0pt" id="m_-8313790439840091783LPMetadata_15281830212710.7303898190223084">
<p class="m-8313790439840091783xmsonormal" style="margin-top:15.0pt;line-height:10.5pt">
<span style="font-size:10.5pt"><a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Florensen.github.io&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Cc3acb54dd8ab4c3d0b6008d6216fd21d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636733161494724344&sdata=4HJ1a4Pm%2BFR9heHn38cq%2B2XGoe%2FqHizir8zTvF7coTM%3D&reserved=0" target="_blank">lorensen.github.io</a></span><o:p></o:p></p>
</div>
<div id="m_-8313790439840091783LPDescription_15281830212720.03673246019722454">
<p class="m-8313790439840091783xmsonormal" 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><o:p></o:p></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p class="m-8313790439840091783xmsonormal" style="mso-margin-top-alt:5.0pt;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p class="m-8313790439840091783xmsonormal" style="mso-margin-top-alt:5.0pt;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<div>
<div class="MsoNormal" align="center" style="margin-left:.5in;text-align:center;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">
<hr size="2" width="98%" align="center">
</span></div>
<div id="m_-8313790439840091783x_divRplyFwdMsg">
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Von:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank" id="m_-8313790439840091783LPlnk577224">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" target="_blank" id="m_-8313790439840091783LPlnk460001">
vtkusers@vtk.org</a><br>
<b>Betreff:</b> Re: [vtkusers] Solid Voxelization with VTK</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">
<o:p></o:p></span></p>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">Hi Berti,
<o:p></o:p></span></p>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">If its a triangulated surface that you want to fill with voxels, use vtkPolyDataToImageStencil:<o:p></o:p></span></p>
</div>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"><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="m_-8313790439840091783LPlnk739546">https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/</a>
<o:p></o:p></span></p>
<div style="margin-bottom:15.0pt;overflow:auto" id="m_-8313790439840091783LPBorder_GT_15281827222900.5768444366185992">
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="5%" style="width:5.12%;margin-left:.5in;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="m_-8313790439840091783LPTitle_15281827222890.533190778266545">
<p class="m-8313790439840091783xmsonormal" 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"><span style="text-decoration:none">PolyDataToImageData
 - lorensen.github.io</span></a></span><o:p></o:p></p>
</div>
<div style="margin-top:7.5pt;margin-bottom:12.0pt" id="m_-8313790439840091783LPMetadata_15281827222890.7452275815734757">
<p class="m-8313790439840091783xmsonormal" style="margin-top:15.0pt;line-height:10.5pt">
<span style="font-size:10.5pt"><a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Florensen.github.io&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Cc3acb54dd8ab4c3d0b6008d6216fd21d%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636733161494724344&sdata=4HJ1a4Pm%2BFR9heHn38cq%2B2XGoe%2FqHizir8zTvF7coTM%3D&reserved=0" target="_blank">lorensen.github.io</a></span><o:p></o:p></p>
</div>
<div id="m_-8313790439840091783LPDescription_15281827222900.21981643030984221">
<p class="m-8313790439840091783xmsonormal" 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><o:p></o:p></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p class="m-8313790439840091783xmsonormal" style="mso-margin-top-alt:5.0pt;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">If its a mesh of 3D elements and you want to sample the elements to create voxels, try vtkResampleToImage.<o:p></o:p></span></p>
</div>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> - David<o:p></o:p></span></p>
</div>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<div>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">On Mon, May 28, 2018 at 4:41 PM, Berti Krüger <<a href="mailto:berti_krueger@hotmail.com" target="_blank" id="m_-8313790439840091783LPlnk570911">berti_krueger@hotmail.com</a>> wrote:<o:p></o:p></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="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">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<o:p></o:p></span></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<p class="m-8313790439840091783xmsonormal" style="margin-left:.5in;background:white">
<span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>