-
-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dicom series loaded with incorrect origin and spacing (linked from SimpleITK) #4677
Comments
Thank you for contributing an issue! 🙏 Welcome to the ITK community! 🤗👋☀️ We are glad you are here and appreciate your contribution. Please keep in mind our community participation guidelines. 📜 This is an automatic message. Allow for time for the ITK community to be able to read the issue and comment on it. |
Hi @chris-rapson-formus , There were a number of DICOM origin and spacing improvements made in ITK 5.4rc4. You could try: pip install --upgrade --pre itk import itk
image = itk.imread(dicom_folder)
print(itk.origin(image))
print(itk.spacing(image)) |
@thewtex Thanks for the suggestion. Unfortunately, itk v5.4 is still giving me the same origin and spacing. >>> import itk
>>> image = itk.imread(dicom_folder)
>>> print(itk.origin(image))
itkPointD3 ([0, 0, 0])
>>> print(itk.spacing(image))
itkVectorD3 ([1, 1, 1])
>>> print(itk.__version__)
5.4.0 |
Note that the tags can be listed with @chris-rapson-formus based on your comment: SimpleITK/SimpleITK#2117 (comment) The issue may be a removed |
What is the value of 'SOP Class UID' (0x0008, 0x0016)? And 0x0002,0x0002? Please prefer dcmdump or gdcmdump for reading attributes. |
@thewtex @issakomi |
Thank you. Support for Secondary Capture Image Storage has recently been improved (IPP/IOP will be read). It's likely that the ITK 5.4 version you're using doesn't have it (5.4 hasn't been released yet). |
Thanks @issakomi, that makes sense. And I was able to confirm it - using the instructions from @thewtex, I had installed >>> import itk
>>> print(itk.__version__)
5.4.0
>>> image = itk.imread('dicom')
>>> print(itk.origin(image))
itkPointD3 ([-208.748, -260.748, 1014.1])
>>> print(itk.spacing(image))
itkVectorD3 ([0.503906, 0.503906, 0.6]) So it looks like there is already a fix and I should just wait for the ITK release (and for that release to filter through to SimpleITK). I'll close this ticket now. |
Description
I am using SimpleITK to load DICOMs, and raised a ticket with them when some anonymised DICOMs loaded with incorrect origin and spacing. The relevant metadata seems fine, and can be read by other software. It was suggested that I should raise the ticket here.
For more details, please see the SimpleITK ticket.
The text was updated successfully, but these errors were encountered: