<div dir="ltr"><div>I am guessing you want to voxelize a polygonal geometry into a binary image where voxels inside the geometry have one value and voxels outside the geometry have another value. Is that correct?</div><div><br></div><div>There isn't anything that I know of that does exactly this, but please see this example for generating an image from an implicit sphere object to get you started:</div><div><br></div><div><a href="http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Imaging/Core/Testing/Python/TestStencilToImage.py">http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Imaging/Core/Testing/Python/TestStencilToImage.py</a><br></div><div><br></div><div>You can change the functionToStencil object to an instance of vtkPolyDataToImageStencil and connect it to the output of a vtkOBJReader.</div><div><br></div><div>HTH,</div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 23, 2015 at 3:11 AM, Constantinus Spanakis <span dir="ltr"><<a href="mailto:c.spanakis83@gmail.com" target="_blank">c.spanakis83@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8px">Hello. I am a new user of VTK and I was wondering if there is an example of 3D file (VRML, OBJ, etc) conversion to Image Conversion(mha, mhd+raw).</span><br></div><div><table style="border-top:1px solid #aaabb6;margin-top:10px">
<tbody><tr>
<td style="width:105px;padding-top:15px">
<a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/logo-avast-v1.png" style="width:90px;min-height:33px"></a>
</td>
<td style="width:470px;padding-top:20px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">This email has been sent from a virus-free computer protected by Avast. <br><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" style="color:#4453ea" target="_blank">www.avast.com</a>
</td>
</tr>
</tbody></table><a href="#151cde4877ea5a22_DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div>