[vtkusers] vtkPolydata contour to image

Jérôme jerome.velut at gmail.com
Sat Mar 12 11:55:34 EST 2011


Hi Sara,
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.

Note, they are a lot of other solutions, but these one may be implemented
thanks to native VTK filters.

HTH,
Jerome


2011/3/12 Sara Rolfe <smrolfe at u.washington.edu>

> Hello,
>
> I have a vtkPolydata contour that I'd like to convert into image data.
>  This is similar to the example here:
> VTK/Examples/Cxx/PolyData/PolyDataContourToImageData
> except that I don't want the image contour to be filled.  I thought that I
> could get around this by using polyData->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've attached.
>
>
> Please let me know if you have any ideas on the optimal method to solve
> this problem.
>
> Thanks,
> Sara
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110312/8aba356a/attachment.htm>


More information about the vtkusers mailing list