I have a hippocampus that was segmented from FreeSurfer. I noticed when opening the volume in FSL that there are a few small holes in the structure. What would be the best method to fill these holes? Is there a simple way using FSL or MATLAB? I need to fill the holes to do shape analysis with SPHARM-PDM.
depending on how large the holes are you could write a script that cycles through all the zero voxels, and if a bunch of the neighboring voxels are non-zero replace the value of the empty
Thanks Chris. I ended up finding a slightly different way to fill in the holes. I'll post it in case anyone needs it later.
I started with my hippocampus volume that had intensity 1 for the hippocampus and 0 for everything else (holes and background). -Created an inverted mask where the holes/background are 1 and hippocampus is 0. -Use fsl "cluster" command to create a cluster index map -Remove the "background cluster" from the cluster index volume. -Add the cluster map and the original image together.