[vtkusers] strange problem while creating a binary mask
David Gobbi
dgobbi at atamai.com
Tue Oct 31 10:08:02 EST 2006
Hi Anja,
The vtkPolyDataToImageStencil calculates the normal of each polygon to
find out which face of the polygon is the front (the "outside") and
which is the back (the "inside"). The calculation of the normal depends
on the ordering of the points.
You are extruding a polyline to create the the polydata, right?
Unfortunately, I don't whether the the front/back orientation of the
polygons depends on the ordering of points in the original polyline...
Dean might have more experience here.
When you apply the stencil, most classes that have a SetStencil() method
also have a ReverseStencilOn() method to set whether you want to use the
region inside the stencil or the region outside the stencil.
- David
Anja Ende wrote:
> Ok, I have clearly missed this part!!!
>
> So, the points have to be ordered in a counter clockwise fashion???
> Why is that???
>
> Cheers,
> Anja
>
> On 30/10/06, * Dean Inglis* <dean.inglis at sympatico.ca
> <mailto:dean.inglis at sympatico.ca>> wrote:
>
> Hi Anja,
>
> is your polydata always defined such
> that the points forming a closed loop are
> ordered counter-clockwise or equivalently,
> always clockwise and the vtkImageStencil set
> accordingly?
>
> Dean
>
>
>
>
>
> --
> Cheers,
>
> Anja
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list