If cleanup
is >0
, the following steps are applied
Erosion with radius 2 voxels
Retain largest
component
Dilation with radius 1 voxel
Morphological closing
These functions are available in iMath, see the operations
“ME”, “GetLargestComponent”, “MD”, “FillHoles”.