[vtkusers] Fixing vtkPolyDataToImageStencil

David Gobbi david.gobbi at gmail.com
Mon Oct 6 15:44:39 EDT 2014


I suspect there are problems with the way that the tolerance is
applied during the rasterization part of the algorithm, and the larger
the tolerance, the more likely it is that problems will occur. For
best results you should use a tolerance of zero.

The patch is still sitting in the queue because I haven't had time to
test it properly.  If it is at all possible for you to provide data
sets or test code, that would be a big help.

 - David

On Mon, Oct 6, 2014 at 12:05 PM, Ricardo A Corredor
<ra.corredor at gmail.com> wrote:
> Hi David,
>
> I just made a test using my data and your patch. It seems it is working
> well, but I still don't get how the tolerance should be selected. I explain
> myself with the following image and description:
> <http://vtk.1045678.n5.nabble.com/file/n5728996/PolyDataRasterization.jpeg>
>
> I'm using a very simple modified version of the VTK Cxx example,
> PolyDataToImageData (code and data are here: http://git.io/s49TIA). I used
> two polydata (the cells of both polydata are polylines, i.e. closed contours
> along Z axis, that could be seen in the image in white), one reasonably
> bigger than the other one (in the image you will see the body and a
> structure inside), but keeping same properties. When using the Tolerance
> (0.001) by default in the big polydata (the body), the 'raster' image is
> generated correctly. When using the same code in the small structure, the
> output image still has strange blank lines (left part of the image).
> However, if I decrease considerably the Tolerance (0.00001), the result is
> correct (right part of the image).
>
> Does it makes sense to you? Is that normal?
>
> Thanks!
>
> Regards,
>
> Ricardo
> RaC
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5728996.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


More information about the vtkusers mailing list