[vtkusers] vtkPolydata contour to image

Paulo Henrique Junqueira Amorim paulojamorim at gmail.com
Sun Mar 13 09:05:54 EDT 2011


Jerome,

Searched the wiki, but not found.

I will try.

Thanks.
Paulo



On 13 March 2011 04:41, Jérôme <jerome.velut at gmail.com> wrote:

> The first solution may be implemented through this pipeline:
> vtkImageData (your binary volume, from a reader or another producer)
> -> vtkImageGradient -> vtkImageMagnitude
>
> The second one with erosion would be:
> vtkImageData  --> vtkImageDilateErode3D --->  vtkImageMathematics
> (SetOperationToSubstract)
>                      ------------------------------------------>
>
> Though I never implemented such pipelines, it should do the trick. Are
> you sure there are no example on the VTK wiki?
>
> Best regards,
> Jerome
>
> 2011/3/13 Sara Rolfe <smrolfe at u.washington.edu>:
> > Thanks Jerome.  I actually started with a binary volume and converted to
> the
> > polydata contour.  Sounds like this step may be unnecessary.
> > Can anyone point me to an example of getting an image data contour from a
> > filled binary volume?  I've checked the email archives and haven't seen
> > anything yet.
> > Thanks,
> > Sara
> > On Mar 12, 2011, at 8:55 AM, Jérôme wrote:
> >
> > 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
> >>
> >
> >
> >
> _______________________________________________
> 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/20110313/808fd9c1/attachment.htm>


More information about the vtkusers mailing list