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

Cannot convert Tilted CT Scan #123

Open
gauvinalexandre opened this issue Aug 18, 2023 · 0 comments
Open

Cannot convert Tilted CT Scan #123

gauvinalexandre opened this issue Aug 18, 2023 · 0 comments

Comments

@gauvinalexandre
Copy link

Describe the bug
For CT Scan Dicoms that have tilt correction, *.json sidecar is not created. Hence, an error prevents dcm2niix and bidskit from continuing.

To Reproduce
Unfortunately, I cannot share my Dicom data to help reproduce the bug.
Steps to reproduce the behavior:

  1. Run bidskit with the command bidskit -d <sourcedata-path>
  2. Conversion to nifiti works well until:
  Adding protocol Vol_Bone_0.5__Vol. to dictionary
*** <file-path>/Vol_Bone_0.5_Vol.--s4--e0_Tilt_1.json
*** JSON sidecar not found - returning empty dictionary
Traceback (most recent call last):
  File "/home/algo/software/anaconda3/envs/neuro/bin/bidskit", line 33, in <module>
    sys.exit(load_entry_point('bidskit', 'console_scripts', 'bidskit')())
  File "/home/algo/libs/bidskit/bidskit/__main__.py", line 300, in main
    d2n.organize_series(
  File "/home/algo/libs/bidskit/bidskit/dcm2niix.py", line 142, in organize_series
    ser_desc = src_meta['SeriesDescription'].replace(' ', '_')
KeyError: 'SeriesDescription'
  1. If I copy the *.json sidecar file from he corresponding scan, and rename it with _Tilt_1 suffix, I still get the following error when running the command the second time:
Traceback (most recent call last):
  File "/home/algo/software/anaconda3/envs/neuro/bin/bidskit", line 33, in <module>
    sys.exit(load_entry_point('bidskit', 'console_scripts', 'bidskit')())
  File "/home/algo/libs/bidskit/bidskit/__main__.py", line 300, in main
    d2n.organize_series(
  File "/home/algo/libs/bidskit/bidskit/dcm2niix.py", line 209, in organize_series
    tr.purpose_handling(src_meta,
  File "/home/algo/libs/bidskit/bidskit/translate.py", line 107, in purpose_handling
    scan_seq = bids_meta['ScanningSequence']
KeyError: 'ScanningSequence'

Indeed, when I print the content of bids_meta, I get the following (no key "ScanningSequence"):

dict_keys(['Modality', 'ImagingFrequency', 'Manufacturer', 'ManufacturersModelName', 'InstitutionName', 'InstitutionalDepartmentName', 'InstitutionAddress', 'DeviceSerialNumber', 'StationName', 'BodyPartExamined', 'PatientPosition', 'SoftwareVersions', 'SeriesDescription', 'ProtocolName', 'ScanOptions', 'ImageType', 'SeriesNumber', 'AcquisitionTime', 'AcquisitionNumber', 'ConvolutionKernel', 'ExposureTime', 'XRayTubeCurrent', 'XRayExposure', 'ImageOrientationPatientDICOM', 'ConversionSoftware', 'ConversionSoftwareVersion'])

Expected behavior
I'd hope to be able to use bidskit to convert and organize my ct scans, including the tilted version.

Desktop (please complete the following information):

  • OS: Ubuntu 23.04
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

1 participant