I have an image of size 301,512,512 which is a binary mask image .
the one values are concentrated near a patch,but there are a few holes inside the path.I would like to fill them with value one.
i have tried
img_fill_holes = scipy.ndimage.binary_fill_holes(array_to_be_filled[:,:,:]).astype(int)
and
import SimpleITK as sitk
filledImage = sitk.BinaryFillhole(array_to_be_filled)
but both of the methods dont give the desired outputs, Any suggestions which may help me would be great. Thanks in advance.