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"><<a href="mailto:jerome.velut@gmail.com">jerome.velut@gmail.com</a>></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>
-> vtkImageGradient -> vtkImageMagnitude<br>
<br>
The second one with erosion would be:<br>
vtkImageData --> vtkImageDilateErode3D ---> vtkImageMathematics<br>
(SetOperationToSubstract)<br>
------------------------------------------><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 <<a href="mailto:smrolfe@u.washington.edu">smrolfe@u.washington.edu</a>>:<br>
<div><div></div><div class="h5">> Thanks Jerome. I actually started with a binary volume and converted to the<br>
> polydata contour. Sounds like this step may be unnecessary.<br>
> Can anyone point me to an example of getting an image data contour from a<br>
> filled binary volume? I've checked the email archives and haven't seen<br>
> anything yet.<br>
> Thanks,<br>
> Sara<br>
> On Mar 12, 2011, at 8:55 AM, Jérôme wrote:<br>
><br>
> Hi Sara,<br>
> In my mind, theproblem is that your polydata sampling does not match the<br>
> image sampling. If you managed to get a filled binary volume from your<br>
> polydata surface, then you can try to compute the gradient of this image.<br>
> Another solution is to substract the binary volume from a dilated version of<br>
> 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<br>
> thanks to native VTK filters.<br>
><br>
> HTH,<br>
> Jerome<br>
><br>
><br>
> 2011/3/12 Sara Rolfe <<a href="mailto:smrolfe@u.washington.edu">smrolfe@u.washington.edu</a>><br>
>><br>
>> Hello,<br>
>> I have a vtkPolydata contour that I'd like to convert into image data.<br>
>> This is similar to the example here:<br>
>><br>
>> VTK/Examples/Cxx/PolyData/PolyDataContourToImageData<br>
>><br>
>> except that I don't want the image contour to be filled. I thought that I<br>
>> could get around this by using polyData->GetPoints, iterating through the<br>
>> point list, converting to an ITK image index, and assigning the image data<br>
>> value. However, I get the ridge artifact shown in the image I've attached.<br>
>><br>
>> Please let me know if you have any ideas on the optimal method to solve<br>
>> this problem.<br>
>> Thanks,<br>
>> Sara<br>
>><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<br>
>> <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:<br>
>> <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>
><br>
><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>
</div></div></blockquote></div><br>