Fills in a binary image using iMath, using dilation erosion but with zero padding built in.

filler(img, fill_size = 7, verbose = TRUE, dilate = TRUE, erode = TRUE)

Arguments

img

Object of class nifti or antsImage

fill_size

Size of fill (in voxels)

verbose

Output diagnostic values

dilate

should the image be dilated. This and erode allows for the function to perform erosion/dilation only with zero-padding.

erode

should the image be eroded This and dilate allows for the function to perform erosion/dilation only with zero-padding.

Value

Filled object with same class as img