[vtkusers] vtkPolyDataToImageStencil with partial volume

David Gobbi david.gobbi at gmail.com
Wed Feb 23 13:54:30 EST 2011


Hi Jonathan,

Whether a pixel is set depends on whether the center of the pixel
is inside or outside the contour, irregardless of what proportion of
the pixel's volume is inside or outside.

The only adjustment is the Tolerance, which should be set to
around 1e-6 so that pixels right on the edge of the contour
are considered to be inside.  The tolerance cannot be negative.

 - David


On Wed, Feb 23, 2011 at 11:22 AM, Jonathan Morra <jonmorra at gmail.com> wrote:
> I am currently using vtkPolyDataToImageStencil to successfully convert
> contours represented as vtkPolyData to binary vtkImageData's.  However, I'm
> noticing a problem with the output sometimes.  Sometimes the resulting
> binary images are slightly smaller or slightly bigger than the poly data
> they were made from.  I assume this is the result of partial volume effects.
>  I would like to know 2 things
> 1.  How does vtkPolyDataToImageStencil handle partial volume.
> 2.  Is there a way to tune partial volume in vtkPolyDataToImageStencil?  For
> instance, a parameter which says if the contour includes less than x
> percentage of the pixel then that pixel is 0.
> Thanks,
> Jon
> PS If my assumption about partial volume effects is wrong, please let me
> know.
> _______________________________________________
> 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
>
>



More information about the vtkusers mailing list