Jerome,<br><br>Searched the wiki, but not found. <br><br>I will try. <br><br>Thanks.<br>Paulo<br><br><br><br><div class="gmail_quote">On 13 March 2011 04:41, Jérôme <span dir="ltr">&lt;<a href="mailto:jerome.velut@gmail.com">jerome.velut@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">The first solution may be implemented through this pipeline:<br>
vtkImageData (your binary volume, from a reader or another producer)<br>
-&gt; vtkImageGradient -&gt; vtkImageMagnitude<br>
<br>
The second one with erosion would be:<br>
vtkImageData  --&gt; vtkImageDilateErode3D ---&gt;  vtkImageMathematics<br>
(SetOperationToSubstract)<br>
                      ------------------------------------------&gt;<br>
<br>
Though I never implemented such pipelines, it should do the trick. Are<br>
you sure there are no example on the VTK wiki?<br>
<br>
Best regards,<br>
Jerome<br>
<br>
2011/3/13 Sara Rolfe &lt;<a href="mailto:smrolfe@u.washington.edu">smrolfe@u.washington.edu</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Thanks Jerome.  I actually started with a binary volume and converted to the<br>
&gt; polydata contour.  Sounds like this step may be unnecessary.<br>
&gt; Can anyone point me to an example of getting an image data contour from a<br>
&gt; filled binary volume?  I&#39;ve checked the email archives and haven&#39;t seen<br>
&gt; anything yet.<br>
&gt; Thanks,<br>
&gt; Sara<br>
&gt; On Mar 12, 2011, at 8:55 AM, Jérôme wrote:<br>
&gt;<br>
&gt; Hi Sara,<br>
&gt; In my mind, theproblem is that your polydata sampling does not match the<br>
&gt; image sampling. If you managed to get a filled binary volume from your<br>
&gt; polydata surface, then you can try to compute the gradient of this image.<br>
&gt; Another solution is to substract the binary volume from a dilated version of<br>
&gt; the binary volume: the output will contain only the contour voxels.<br>
&gt;<br>
&gt; Note, they are a lot of other solutions, but these one may be implemented<br>
&gt; thanks to native VTK filters.<br>
&gt;<br>
&gt; HTH,<br>
&gt; Jerome<br>
&gt;<br>
&gt;<br>
&gt; 2011/3/12 Sara Rolfe &lt;<a href="mailto:smrolfe@u.washington.edu">smrolfe@u.washington.edu</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hello,<br>
&gt;&gt; I have a vtkPolydata contour that I&#39;d like to convert into image data.<br>
&gt;&gt;  This is similar to the example here:<br>
&gt;&gt;<br>
&gt;&gt; VTK/Examples/Cxx/PolyData/PolyDataContourToImageData<br>
&gt;&gt;<br>
&gt;&gt; except that I don&#39;t want the image contour to be filled.  I thought that I<br>
&gt;&gt; could get around this by using polyData-&gt;GetPoints, iterating through the<br>
&gt;&gt; point list, converting to an ITK image index, and assigning the image data<br>
&gt;&gt; value.  However, I get the ridge artifact shown in the image I&#39;ve attached.<br>
&gt;&gt;<br>
&gt;&gt; Please let me know if you have any ideas on the optimal method to solve<br>
&gt;&gt; this problem.<br>
&gt;&gt; Thanks,<br>
&gt;&gt; Sara<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" 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" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br>