[vtkusers] vtkPolyDataToImageStencil with partial volume

Jonathan Morra jonmorra at gmail.com
Wed Feb 23 13:58:58 EST 2011


I had the tolerance set to 0, and setting it to 1e-6 didn't fix the problem.
 How did you come up with that number?  What's wrong with setting it to 0?
 In my case usually the left and top side of the vtkImageData is being
eroded, such that if I call the filter many times, the vtkImageData will
eventually be blank because it will all be eroded.   However, sometimes the
bottom and right grow in size, I haven't figured out which situations cause
which.

On Wed, Feb 23, 2011 at 10:54 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> 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
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110223/cbb0dedf/attachment.htm>


More information about the vtkusers mailing list