rordenlab / dcm2niix

dcm2nii DICOM to NIfTI converter: compiled versions available from NITRC
https://www.nitrc.org/plugins/mwiki/index.php/dcm2nii:MainPage
Other
898 stars 229 forks source link

TablePosition not outputting in some ".dcm" files but the information is present in the metadata #890

Closed po09i closed 1 week ago

po09i commented 1 week ago

Describe the bug

The tag TablePosition sometimes does not get populated depending on the data format.

I uploaded a test folder containing a sequence that was acquired. When it was being acquired, it was automatically exported on a connected laptop to a ".dcm" format. At the end of the imaging session, the dataset was exported to a remote server, downloaded to the same laptop the following day, but this time, it resulted in "IMA" format. The same sequence when exported in these 2 different ways yields different results after dcm2niix conversion:

To reproduce

  1. Download table_position.zip
  2. Run the command './dcm2niix -o table_position/nifti_from_ima table_position/ima'
  3. Run the command './dcm2niix -o table_position/nifti_from_dcm table_position/dcm'
  4. See both output JSON files where TablePosition is only populated in nifti_from_ima

Probable reason behind the bug The tag (0019, 1014) ImaRelTablePosition is not populated in the ".dcm" file. However, the private CSA header does get populated with the table position information in both provided cases (RelTablePosition: See the provided python file in the test folder). I wonder if dcm2niix could fall back to reading this information on Siemens data if the tag (0019, 1014) is not present.

Version

Latest development version (v1.0.20241106) table_position.zip

neurolabusc commented 1 week ago

@po09i please test development branch and if this resolves your problem please close this issue.

po09i commented 1 week ago

I tested it and it resolved my issue, thanks!