[ITK Community] Question about BinaryDilateImageFilter

Matt McCormick matt.mccormick at kitware.com
Sat Feb 22 15:45:34 EST 2014


Hi Michka,

> I was going through the python examples to do some cleanup.
> I would need some help. It's for the example in Examples/Filtering/BinaryDilateImageFilter.py
>
> It seems I need to instantiate the filter like this :
>
> image_type = itk.Image[itk.UC, 2]
> se_type = ??
> itk.BinaryDilateImageFilter[image_type, image_type, se_type].New()
>
> Secondly, there is a call to the BinaryBallStructuringElement class.
> In itkExtras.py there is a strel() function (a comment in it tells it is/ it will be deprecated), which uses : itk.FlatStructuringElement[dim].Ball(radius)
>
>
> I have two questions related to this :
> - What about this Structuring element type, which seems not to be wrapped ? Should this type be the same as the one from input image ?

I wrote up the example here [1].  It is PEP8 compliant, but otherwise
follows ITK's style conventions, which helps when comparing to the C++
code.

> - BinaryBallStructuringElement is not wrapped. Is it still used somewhere ? What is the preferred way, and is BinaryBallStructuringElement really deprecated ?

Yes, I think strel() could be removed.

BinaryBallStructuringElement now internally just delegates to
FlatStructuringElement, and the latter is preferred [2]

Thanks,
Matt

[1] http://review.source.kitware.com/#/c/14534/1

[2] http://www.itk.org/Doxygen/html/classitk_1_1BinaryBallStructuringElement.html



More information about the Community mailing list