[ITK Community] [Insight-users] Creating a line structuring element

Emma Ryan eryanvtk at yahoo.com
Tue Feb 11 19:42:11 EST 2014


Hi,

 How does one create a line structuring element.  I would like to create a [1, 5] size  vector so to speak and use that as a structuring element.
I guess I have to use itk::FlatStructuringElement<2>     and StructuringElementType::Box(..)

But beyond that, how does one set the size ?  From a default radius of 1 (3 x 3) I would like a (1 x 5) or should it be (0 x 5) size structural element.

The following does not work. It gives a syntax error on SetSize and frankly I dont think syntax is the only issue.



unsigned int radius = 2;
    typedefe itk::Size<2> SizeType;
    SizeType strelSize;
    strelSize[0] = 1;
    strelSize[1] = 5;

    typedef itk::FlatStructuringElement<2> StructuringElementType;
    StructuringElementType::RadiusType elementRadius;
    elementRadius.Fill(2);
    elementRadius.SetSize(strelSize);
    StructuringElementType strel = StructuringElementType::Box(elementRadius);



thank you,
Emma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140211/905b9b11/attachment-0002.html>
-------------- next part --------------
_____________________________________
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.php

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 Community mailing list