Skip to content
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

After Siemens XA30 update, fmaps are misclassified as func and raise exceptions when run in heudiconv #73

Open
mjstarrett opened this issue Jan 16, 2025 · 1 comment

Comments

@mjstarrett
Copy link

Our imaging facility recently updated the software for our Siemens Prisma 3T scanner to XA30. Prior to the update, I was able to run heudiconv using the reproin heuristic to convert and BIDS-ify my data (i.e., the protocol names for this study were compatible with reproin). However, while testing the same study after updating to XA30, I started getting an error on my fmaps, which use the PEpolar technique (i.e., fmap_dir-ap and fmap_dir-pa).

I did note that the ImageType in the dicom header has changed. Prior to the update it was...
['ORIGINAL', 'PRIMARY', 'M', 'ND', 'NORM', 'MOSAIC']
after the XA30 update it is now...
['ORIGINAL', 'PRIMARY', 'FMRI', 'NONE']

PROTOCOL NAMES:

  • localizer
  • anat-scout
  • anat-T1w_acq-0.8mm
  • func_run-01_task-rateDist
  • fmap_dir-AP
  • fmap_dir-PA

COMMAND RUN:
heudiconv -d sourcedata/{subject}/* -o . -f reproin -c dcm2niix -b --overwrite -s 1001

OUTPUT:

INFO: Running heudiconv version 1.3.2 latest 1.3.2
INFO: Need to process 1 study sessions
INFO: PROCESSING STARTS: {'subject': '1001', 'outdir': '/datapool/home/mjstarrett/projects/siemensX30A/', 'session': None}
INFO: Processing 252 dicoms
INFO: Analyzing 252 dicoms
INFO: Filtering out 0 dicoms based on their filename
INFO: Generated sequence info for 8 studies with 252 entries total
INFO: Processing 8 seqinfo entries
WARNING: Could not determine the series name by looking at protocol_name, series_description fields
WARNING: Deduced datatype to be func from DICOM, but got fmap out of fmap_dir-AP
Traceback (most recent call last):
  File "/datapool/home/mjstarrett/.local/bin/heudiconv", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/datapool/home/mjstarrett/.local/lib/python3.11/site-packages/heudiconv/cli/run.py", line 30, in main
    workflow(**kwargs)
  File "/datapool/home/mjstarrett/.local/lib/python3.11/site-packages/heudiconv/main.py", line 479, in workflow
    prep_conversion(
  File "/datapool/home/mjstarrett/.local/lib/python3.11/site-packages/heudiconv/convert.py", line 241, in prep_conversion
    info = heuristic.infotodict(seqinfo_list)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/datapool/home/mjstarrett/.local/lib/python3.11/site-packages/heudiconv/heuristics/reproin.py", line 514, in infotodict
    datatype_suffix = {
                      ^
KeyError: 'FMRI'
@mvdoc
Copy link
Member

mvdoc commented Jan 17, 2025

I don't have a solution, but I wanted to add that with the XA30 some of the tags used by reproin/heudiconv have been moved to the key ImageTypeText. E.g.,

"ImageType": [
    "ORIGINAL",
    "PRIMARY",
    "FMRI",
    "NONE"
  ],
  "ImageTypeText": [
    "ORIGINAL",
    "PRIMARY",
    "M",
    "MB",
    "TE3",
    "NORM",
    "DIS2D"
  ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants