[ITK Community] Question about BinaryDilateImageFilter

Michka Popoff michkapopoff at gmail.com
Sat Feb 22 16:23:49 EST 2014


I’m currently reviewing the code, very nice work. It seems much clearer now.

Just to be sure, what’s the difference between the ITK examples folder and the ITKwikiexamples ?
You added the examples to the ITK wiki examples, so what happens to the “old” ITK examples folder ?
Maintaining the code in the two seems complicated to me.

On 22 févr. 2014, at 21:45, Matt McCormick <matt.mccormick at kitware.com> wrote:

> 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