[vtkusers] Fixing vtkPolyDataToImageStencil

David Gobbi david.gobbi at gmail.com
Mon Oct 20 11:34:04 EDT 2014


Hi Richard, Ryan,

I have modified vtkPolyDataToImageStencil so that it works with the data
sets that you provided (thanks for making them available to me).  Richard's
data used to fail because it had several short horizontal line segments,
and there was a bug in the code when horizontal line segments were close to
a pixel boundary.  Ryan's data set had some short "spurs" (tiny line
segments branching off of the main contour) that confused the algorithm,
but I've extended the algorithm so that it removes short branches.

The most recent code is at the following URL.  It will hopefully be merged
into VTK sometime this week.  Thanks again for the test code and the data,
it made it much easier for me to pinpoint the bugs.

http://review.source.kitware.com/#/c/17021/

 - David


On Wed, Oct 8, 2014 at 11:45 AM, Ricardo A Corredor <ra.corredor at gmail.com>
wrote:

> That's good to know!
>
> Just an additional info, I could reproduce @ryan45 error. In this data,
> this
> problem happens with a relatively small spacing: around 2.5 (included) and
> below; with higher values the result is correct. Polydata bounds> X:
> 2.32e+03 to 4.16e+03 (delta: 1.84e+03), Y: 2.47e+03 to 4.47e+03 (2e+03)
>
>
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729052.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/20141020/ec2fa8d2/attachment.html>


More information about the vtkusers mailing list