I have around 200 CT slides from patients and need to reconstruct them and segment out the eye orbit. In Matlab, I read the original DICOM image, use imbinarize(I,T) to change them to binary image, and then stack them up to form the 3D orbital image (see attached images below).
Original DICOMenter image description here
Binarized Imageenter image description here
However, as you can see, there are many holes inside the orbit. To cope with this, I use bwmorph() with 'thicken' and 'bridge', then use imclose() with the 'disk' parameter:
for i = 30 : 160
info = dicominfo(dirOutput(i).name,'UseDictionaryVR',true);
imgTemp = dicomread(info);
imgCropped = imcrop(imgTemp,bboxCrop);
imgCroppedBin = imbinarize(imgCropped,0.51728);
img_thick = bwmorph(imgCroppedBin,'thicken');
img_bridge = bwmorph(img_thick,'bridge',Inf);
se = strel('disk',1);
I(:,:,i) = imclose(img_bridge,se);
end;
I(:,:,i) is the resulting 3D array. Then I use fv = isosurface(I,ISOVALUE) and patch() to reconstruct the 3D array to a 3D image (as attached above).
The resulting 3D image still has many holes unfilled. Increasing the STREL element size or decreasing the ISOVALUE will make the final model thick and coarse (e.g. with stair case inside).
May I ask how can I fill the resulting holes in the 3D model and still preserve the original smoothness of the image? Should I do this in the 3D image or do this in 2D binary image before the reconstruction?
I tried alphaShape as well to fill the holes, the result is more satisfactory and easier to control than isosurface() and patch(). But with large "alpha value" e.g. 8, the output model becomes to lose detail, such as the "inferior orbital fissure" being smoothed too.
Reconstructed image using alphaShape with alpha value = 8
Grateful if anyone can suggest a solution. Thanks!