[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://www.itk.org/pipermail/insight-users/attachments/20140211/905b9b11/attachment.html>
More information about the Insight-users
mailing list