Difference in STL file exported from 3DSlicer and created in Matlab

SimoneCR
Sun, 23 Oct 2022 13:02:16 +0000
Support

I have a 512x512x331 DICOM volume of a CT scan, with voxel size of 0.723x0.723x0.8. I manually segmented (Region Growing) it in 3DSlicer to retain the femur head only. Exporting this segment to STL file, I can see that it has consistent difference in size from the one I read in Matlab. In Matlab, I obtained the femur segment reading the DICOM and cropping it using the binary labelmap taken from the same 3DSlicer segmentation: when I create the corresponding STL file with stlwrite (from Exchange) I can appreciate this difference in the dimensions.

So I thought it must be some reading options of stlwrite and I rescaled the vertices I obtained from this according to the original voxel size: the differences become much more slight but not negligible, at least in the z-dimension (almost 2-3 mm, as if 3 or 4 slices are missing).
What is strange is that the segmentation has 147 slice, 0.8 mm each: so I should have a piece 117.6mm tall, but neither the 3DSlicer output (119.64mm) nor the Matlab “scaled” one (116.8mm) are correct. I can understand the problem in Matlab, maybe because of the function used, but should the 3DSlicer output not reproduce the real size? Do you think that the fact that SliceThickness is 1mm can be a problem? PS I create STL faces and verticecs using isosurface and isocaps.

Can anyone help me with this? It depends on the Matlab function or on some 3DSlicer settings?

Thanks in advance

19 posts - 4 participants