[vtkusers] Fill in 2D vtkPolyData

David Gobbi david.gobbi at gmail.com
Thu Apr 19 14:03:10 EDT 2012


Hi Jonathan,

This is why I haven't added this filter to VTK yet.  When the input
has multiple contours, the code doesn't yet have the necessary logic
for determining which contours are holes.  In your case, it has
incorrectly marked the large contour as a hole.

Unfortunately I cannot provide you with a timeline for when I will
finish this filter, lately I've been crazy busy on other projects.
But if you want to give it a shot yourself, take a look at the code
for vtkContourToPolygonFilter::MakePolysFromContours(). The
section that needs to be modified is the block that starts with
"if (normal == 0)".

 - David


On Thu, Apr 19, 2012 at 11:44 AM, Jonathan Morra <jonmorra at gmail.com> wrote:
>
> After using your filter for a little while, for the most part it works great, however I have discovered a few cases where it doesn't work.  I've attached a screen shot showing a failure,  The first image is the input vtkPolyData, and the second is the result of running through your filter.  Can you determine what is going on?  If not, I'd be happy to give you the poly data I'm using, just let me know how to export it to disk, and I can email it to you.
>
> Thanks
>
> PS The behavior seems unpredictable, as sometimes with shapes just as complicated it works fine, I can't seem to tell what makes it fail.
>
>
>
>
>
>
> On Tue, Apr 10, 2012 at 12:26 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>
>> Use the PickableOff() method (on the actor, not the data).
>>
>> On Tue, Apr 10, 2012 at 1:17 PM, Jonathan Morra <jonmorra at gmail.com> wrote:
>> > One more question along this same line.  Now that I have opaque vtkPolyData,
>> > I'm noticing that my vtkPicker is no longer hitting the same data it was
>> > before, it's hitting the now opaque poly data.  This makes sense to me, but
>> > I don't want it to happen.  Is there a way to tell the vtkPicker to ignore
>> > some vtkPolyData (ie always pick the underlying data).
>> >
>> > Thanks
>
>



More information about the vtkusers mailing list