<div dir="ltr">Hi Richard, Ryan,<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div><a href="http://review.source.kitware.com/#/c/17021/">http://review.source.kitware.com/#/c/17021/</a><br></div><div><br></div><div> - David</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 8, 2014 at 11:45 AM, Ricardo A Corredor <span dir="ltr"><<a href="mailto:ra.corredor@gmail.com" target="_blank">ra.corredor@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That's good to know!<br>
<br>
Just an additional info, I could reproduce @ryan45 error. In this data, this<br>
problem happens with a relatively small spacing: around 2.5 (included) and<br>
below; with higher values the result is correct. Polydata bounds> X:<br>
2.32e+03 to 4.16e+03 (delta: 1.84e+03), Y: 2.47e+03 to 4.47e+03 (2e+03)<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729052.html" target="_blank">http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729052.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>