[vtkusers] Fixing vtkPolyDataToImageStencil

David Gobbi david.gobbi at gmail.com
Thu Dec 4 11:32:16 EST 2014

Hi Ricardo,

Thanks for the feedback.  In the image that you attached, the pixels are
twice as large as the "jaggies" of the contour, so I'm not sure how it
would be possible for them to match exactly?

That diagram for polygon scan conversion is an accurate depiction of what
vtkPolyDataToImageStencil does if you call SetTolerance(0.0) and the
contour passes exactly through the centre of a voxel.  If the tolerance is
greater than zero, then leftmost and topmost pixels would also be included.

 - David

On Thu, Dec 4, 2014 at 9:17 AM, Ricardo A Corredor <ra.corredor at gmail.com>

> Hi David,
> I didn't reply when you submit this change, but I confirm that it works
> well
> !! Thanks
> However, I still have a question. Please look the following image:
> <http://vtk.1045678.n5.nabble.com/file/n5729677/PolydataToImage.jpg>
> There are some voxels inside the polydata that are not included in the
> final
> mask. Is it a problem on the way they are calculated? Probably a shift when
> considering the voxel inside the contour (something like what is shown here
> http://guy-grave.developpez.com/tutoriels/hardware/les-cartes-graphiques/pipeline-non-programmable/rasterization/images/Polygon_scan-conversion.svg
> )?
> Thank you again and have a good day.
> Ricardo
> RaC
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729677.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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://public.kitware.com/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141204/2dad624a/attachment.html>

More information about the vtkusers mailing list