Closed
Description
Describe the bug
When reading the dicom series with LoadImage(pydicom backend) in MONAI transforms, the spacing is recorded incorrectly.
updated when reading dicom series:
MONAI/monai/data/image_reader.py
Line 542 in 02e7b79
didn't updated when reading a single pydicom dataset object:
MONAI/monai/data/image_reader.py
Line 634 in 02e7b79
MONAI/monai/data/image_reader.py
Line 664 in 02e7b79
To Reproduce
Steps to reproduce the behavior:
- Install the MONAI dev branch.
- Download the attachment dcm file whose md5 is f511acb750076c56ad2d9647dcfe521d, put it in a folder.
- Run
from monai.transforms import LoadImage
loader = LoadImage(reader='pydicomreader')
pydicom_result = loader('./test_data')
print(pydicom_result.affine)
loader = LoadImage(reader='itkreader')
itk_result = loader('./test_data')
print(itk_result.affine)
Expected behavior
pydicom can record spacing correctly when reading a single pydicom dataset object