bug : save nifti segmentation results with wrong affine - when running on dicom
When running TS on dicom directory, the program first converts the dicom to nifti and then processes the nifti file, finally saving a nifti segmentation result. However, the original dicom affine matrix is not kept. this causes the output segmentation nifti file to have an affine matrix which is different. If I run dicom to nifti externally, and then run TS on the nifti file, the correct affine matrix is produced in the result segmentation nifti file. the difference is both in the values of the origin, and the orientation matrix. Using Python 3.11.11 environment Name: totalsegmentator Version: 2.4.0
Please check this issies
I use the following library for dicom to nifti conversion: https://github.com/icometrix/dicom2nifti They would have to fix this problem and then it also works in TotalSegmentator.