Coder Social home page Coder Social logo

Comments (8)

chris-rapson-formus avatar chris-rapson-formus commented on July 17, 2024 2

Thanks @issakomi, that makes sense. And I was able to confirm it - using the instructions from @thewtex, I had installed 5.4rc2. After updating pip, I was able to install 5.4rc4. Now I get the correct origin and spacing:

>>> 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.

from itk.

thewtex avatar thewtex commented on July 17, 2024 1

Note that the tags can be listed with print(dict(image)).

@chris-rapson-formus based on your comment:

SimpleITK/SimpleITK#2117 (comment)

The issue may be a removed 0018,0050 tag? See, for example, the discussion and DICOM standard links here: #4521 . Tag interpretation is also modality dependent.

from itk.

issakomi avatar issakomi commented on July 17, 2024 1

What is the value of 'SOP Class UID' (0x0008, 0x0016)? And 0x0002,0x0002? Please prefer dcmdump or gdcmdump for reading attributes.

from itk.

chris-rapson-formus avatar chris-rapson-formus commented on July 17, 2024 1

@thewtex
Thanks for linking that discussion. It does look very similar, and the DICOMs were missing the 0018,0050 tags when I initially processed them. However, even after adding this tag, the spacing is still (1., 1., 1.) and the origin is still (0., 0., 0.,). The modality is CT, and that is also what is shown in 0008,0060.

@issakomi
0008,0016 SOP Class UID: 1.2.840.10008.5.1.4.1.1.7
0002,0002 Media Storage SOP Class UID: 1.2.840.10008.5.1.4.1.1.7
I've attached the dcmdump output from a file where I have manually added data for the three missing tags which I suspected were causing the problem (0018,0050, 0018,0088, 0020,1041). As noted above, the symptoms are unchanged even after adding in these tags using dcmodify.

from itk.

issakomi avatar issakomi commented on July 17, 2024 1

0008,0016 SOP Class UID: 1.2.840.10008.5.1.4.1.1.7
0002,0002 Media Storage SOP Class UID: 1.2.840.10008.5.1.4.1.1.7

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).

from itk.

github-actions avatar github-actions commented on July 17, 2024

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. πŸ“œ
Also, please check existing open issues and consider discussion on the ITK Discourse. πŸ“–

This is an automatic message. Allow for time for the ITK community to be able to read the issue and comment on it.

from itk.

thewtex avatar thewtex commented on July 17, 2024

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))

from itk.

chris-rapson-formus avatar chris-rapson-formus commented on July 17, 2024

@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

from itk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.