Hi Jérôme,<br><br>How could calculate the gradient of a binary image with vtk?<br><br>Regards,<br>Paulo Amorim<br><br><br><br><br><br><div class="gmail_quote">On 12 March 2011 13:55, 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="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Sara,<br>In my mind, theproblem is that your polydata sampling does not match the image sampling. If you managed to get a filled binary volume from your polydata surface, then you can try to compute the gradient of this image. Another solution is to substract the binary volume from a dilated version of the binary volume: the output will contain only the contour voxels.<br>


<br>Note, they are a lot of other solutions, but these one may be implemented thanks to native VTK filters. <br><br>HTH,<br>Jerome<br><br><br><div class="gmail_quote"><div><div></div><div class="h5">2011/3/12 Sara Rolfe <span dir="ltr">&lt;<a href="mailto:smrolfe@u.washington.edu" target="_blank">smrolfe@u.washington.edu</a>&gt;</span><br>


</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5"><div style="word-wrap: break-word;"><div>Hello,</div>

<div><br></div><div>I have a vtkPolydata contour that I&#39;d like to convert into image data.  This is similar to the example here:</div>
<div><h1><span style="font-weight: normal;"><font size="3"><span style="font-size: 12px;">VTK/Examples/Cxx/PolyData/PolyDataContourToImageData</span></font></span></h1></div><div>except that I don&#39;t want the image contour to be filled.  I thought that I could get around this by using polyData-&gt;GetPoints, iterating through the point list, converting to an ITK image index, and assigning the image data value.  However, I get the ridge artifact shown in the image I&#39;ve attached.  </div>


<div><br></div><div>Please let me know if you have any ideas on the optimal method to solve this problem.</div><div><br></div><div>Thanks,</div><div>Sara</div><font color="#888888"><div><br></div><br></font></div><br></div>

</div><div class="im">_______________________________________________<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>
<br></div></blockquote></div><br>
<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>
<br></blockquote></div><br>