NIfTI uses single-precision floats for image geometry metadata, including the origin.
If an image is read in from DICOM and passes into run_hybrid_segmentation then the cardiac segmentation fails because the origin of this image can be different to the NIfTI that is processed by nnU-Net (which runs on a NIfTI saved to a temporary file).
The error occurs during the registration process, where the mismatched origins raise an internal ITK error.
One workaround is to save the image to NIfTI and reload. This is suboptimal, but I'm not sure about other solutions.
Reference: https://discourse.itk.org/t/direction-orientation-matrix-dicom-vs-nifti/3289/4
NIfTI uses single-precision floats for image geometry metadata, including the origin.
If an image is read in from DICOM and passes into run_hybrid_segmentation then the cardiac segmentation fails because the origin of this image can be different to the NIfTI that is processed by nnU-Net (which runs on a NIfTI saved to a temporary file).
The error occurs during the registration process, where the mismatched origins raise an internal ITK error.
One workaround is to save the image to NIfTI and reload. This is suboptimal, but I'm not sure about other solutions.
Reference: https://discourse.itk.org/t/direction-orientation-matrix-dicom-vs-nifti/3289/4