SimpleITK BinaryDilateImageFilter

Hi :wave:

Where can I find an example of BinaryDilateImageFilter in SimpleITK? In particular, how to set the structuring element?

Thanks,

Diego

Hello,

Thank you for tagging the issue with Python.

Here is the C++ Doxygen documentation for the class:

It has a method SetKernelType that takes a KernelEnum type in C++.

sitkAnnulus 	
sitkBall 	
sitkBox 	
sitkCross 	
sitkPolygon3 	
sitkPolygon4 	
sitkPolygon5 	
sitkPolygon6 	
sitkPolygon7 	
sitkPolygon8 	
sitkPolygon9 

The class can be used in SimpleITK Python like this:

import SimpleITK as sink
dilate_filter = sitk.BinaryDilateImageFilter()
dilate_filter.SetKernelType(sitk.sitkCross)
dilate_filter.SetKernelRadius( 3 )
2 Likes