[Insight-users] xxxxxSPAMxxxxx itkPolylineMask2DImageFilter

Luis Ibanez luis.ibanez at kitware.com
Wed Jan 20 19:07:37 EST 2010


Hi Isaac,

1) Your observation is correct.

    This filter expects the Polyline to be defined in
    a particular direction. Which is a standard
    practice when defining the inside / outside of
    a closed contour in math and geometry.


2) We have not added this to the documentation
    of the class.

http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkPolylineMask2DImageFilter.h?root=Insight&r1=1.7&r2=1.8&sortby=date


    It was an unfortunate omission that this
    directional dependency was not mentioned
    in the documentation.


Please let us know if you have further questions,


     Thanks


          Luis


-------------------------------------------------------
On Fri, Jan 15, 2010 at 11:05 AM, Isaac Abbott <isaac.abbott at gmail.com> wrote:
> I've added code to a project to allow a user to define the polyline to be
> used in the itkPolylineMask2DImageFilter.
>
> It works when I draw the polyline by clicking vertex points in the
> counter-clockwise direction only.
> It does not work when the polyline is defined by points in the clockwise
> orientation (it sets the whole image to 0).
>
> What is the deal with this?  Is there a reason for it or is it a bug?  It is
> certainly not convenient.
>
> These results can be replicated by changing two lines in the test file:
> itkPolylineMask2DImageFilterTest
> See commented lines below.
>
>     VertexType v;
>     v[0] = 12.8;
>     v[1] = 25.6;
>     inputPolyline->AddVertex(v);
>
>     v[0] = 25.6;
>     v[1] = 12.8;//39.4;                //Swapped to break filter;
>     inputPolyline->AddVertex(v);
>
>     v[0] = 39.4;
>     v[1] = 25.6;
>     inputPolyline->AddVertex(v);
>
>     v[0] = 25.6;
>     v[1] = 39.4;//12.8;                //Swapped to break filter;
>     inputPolyline->AddVertex(v);
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list