gibbonCode / GIBBON

The Geometry and Image-Based Bioengineering add-On for MATLAB
http://gibboncode.org/
GNU Affero General Public License v3.0
191 stars 60 forks source link

Reordered dicom images in IMDAT.mat struct file #178

Closed arojproj closed 1 year ago

arojproj commented 1 year ago

I am trying to perform 3D segmentation of the CT DICOM images for the construction of 3D organ surface in the chest wall.

Issue: I sorted the DICOM image series as per their slice location. Then, I created an IMDAT data file. However, while converting dicom to .mat format, using

dcmFolder2MATobject(pathName);

the dicom image series are reordered ignoring the InstanceNumber. More interestingly, and also, can be seen in the table below, after every 5 or 10 consecutive slices, the last slices are stacked followed by the previous image sequences.

Is this a bug, or might I have missed something?

image

DNedrelow commented 1 year ago

I have a feeling MATLAB's image coordinate convention (positive y at the bottom) may be an issue for you, but I could be wrong.

arojproj commented 1 year ago

It seems like I did not specify reOrderOpt to non-zero. Having it adjusted, I got the correct image sequencing.