InsightSoftwareConsortium / InsightSoftwareConsortium/ITK
Behaviour change between ITK 5.3 and 5.4 with DICOM spacing
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 748
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 64
Description
Further to some discussions in https://github.com/InsightSoftwareConsortium/ITK/pull/4647 and https://github.com/InsightSoftwareConsortium/ITK/pull/4521, we still have a situation that isn't quite clear to us, and since those are merged already, we thought we'd create a new ticket.
Basically, there is a change in behaviour between ITK 5.3 and 5.4 that we are trying to understand if it's a bug or deliberate & correct.
If we query a DICOM file for its image spacing information, we get different results depending on:
- using `itk::ImageSeriesReader` vs using `itk::GDCMImageIO`
- having 1 DICOM file in the folder vs having multiple
A small C++ test case is attached: [inconsistency_in_spacing.zip](https://github.com/user-attachments/files/16473741/inconsistency_in_spacing.zip)
It uses a DICOM file named `D_CLUNIE_CT1_J2KR1.dcm`, from the GDCM test suite I think, but from David Clunie's collection ultimately I suppose.
In ITK 5.3:
Number of files | ImageSeriesReader | GDCMImageIO
---|---|---
Single | [0.661468, 0.661468, 1] | [0.661468, 0.661468, 1]
Multiple | [0.661468, 0.661468, 1] | [0.661468, 0.661468, 1]
Notice everything agrees: the z spacing is 1.
In ITK 5.4 / master:
Number of files | ImageSeriesReader | GDCMImageIO
---|---|---
Single | [0.661468, 0.661468, 5] | [0.661468, 0.661468, 5]
Multiple | [0.661468, 0.661468, 1] | [0.661468, 0.661468, 5]
Notice now everything does not agree.
The change from 1 to 5 is presumably deliberate from https://github.com/InsightSoftwareConsortium/ITK/pull/4521.
But then shouldn't that lone 1 (in the bottom left) also be 5?
Thanks.
Contributor guide
Assessment
This issue has not been assessed yet.