img
Input image. Can be an antsImage
of 2, 3 or 4 dimensions.
If img
is NULL, a file chooser dialog will appear.
cleanup
If >0
, morphological operations will be applied to
clean up the mask by eroding away small or weakly-connected areas, and
closing holes.