I have a 3D binary image that I must fill all of the holes in the image.
"Fill holes 3D" in this case, is basically a 3D version of
BW2 = imfill(BW,'holes') from MatLab,
but I am not focusing on Matlab here. I am focusing on the algorithm in general.
Currently, I simply perform a "flood fill 3D" algorithm on all voxels at the border area of the 3D matrix. Anything not filled are holes so take this as a mask and remove all voxels on the real image with this mask.
Sure, the algorithm works, but somehow, I feel this is inefficient.
What is the fastest way to "fill holes" in 3D in this case?