TotalSegmentator icon indicating copy to clipboard operation
TotalSegmentator copied to clipboard

bug : save nifti segmentation results with wrong affine - when running on dicom

Open michalhg opened this issue 11 months ago • 1 comments

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

michalhg avatar Jan 15 '25 14:01 michalhg

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.

wasserth avatar Feb 11 '25 10:02 wasserth