Open bjeurissen opened 2 weeks ago
This issue is noted in dcm2niix issue 144 - Philips scanners often generate two different ImagePositionPatient (0020,0032) values for each slice. You want to use the one from the public sequence PlanePositionSequence
and ignore the one stored in the private sequence (2005,140f). When I discovered this years ago, I did tell Philips clinical scientists that re-using a the public tag (0020,0032) for private purposes was likely to lead to unintended consequences. However, nothing has changed. The good news with Philips DICOMs is that they seem to be moribund, so they do not change. The unfortunate thing is that Philips enhanced DICOMs are insanely verbose with a tremendous amount of redundant information. They are in stark contrast to the lean Canon and Siemens enhanced DICOMs. I have seen Philips enhanced DICOMs that are so bloated they will crash Horos and Osirix.
For the image you reference, the duplicates look like this:
(0020,9113) SQ (Sequence with undefined length #=1) # u/l, 1 PlanePositionSequence
...
(fffe,e000) na (Item with undefined length #=1) # u/l, 1 Item
(0020,0032) DS [-128.74297738075\-121.27660465240\-38.354631973134] # 50, 3 ImagePositionPatient
...
(2005,140f) SQ (Sequence with undefined length #=1) # u/l, 1 Unknown Tag & Data
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(0020,0032) DS [-129.24297738075\-121.77660465240\-38.354645685758] # 50, 3 ImagePositionPatient
Tested the suggestion of @neurolabusc by replacing
with
return true;
which completely ignores anything within Philips PrivatePerFrameSq, and this indeed restores the correct Transform
.
@jdtournier how do we properly integrate this fix (not completely ignoring Philips PrivatePerFrameSq, but only certain tags)?
I noticed a discrepancy in the
Transform
(shift of half a voxel along the in-plane dimensions) when converting a Philips DICOM data set usingmrconvert
vsdcm2niix
.@Lestropie suggested that it might be related to Enhanced DICOM, which turns out to be the case.
The issue seems to be specific to Philips Enhanced DICOM (other vendors and classic DICOM are fine) and can be reproduced using the dcmqa* datasets from @neurolabusc.
Using https://github.com/neurolabusc/dcm_qa_philips_enh.git which contains both a classic and an enhanced DICOM version of the same dataset, dcm2niix reports the same transform across DICOM versions, whereas mrconvert reports a shift of half a voxel along the in-plane dimensions for the enhanced DICOM dataset:
Using https://github.com/neurolabusc/dcm_qa_enh.git which contains Enhanced DICOMs from different vendors (Canon, Siemens, and Philips), dcm2niix and mrconvert agree on the Canon and Siemens data, but not on the Philips data (again half a voxel shift along the in-plane dimensions):