Skip to content

Enhanced dicom issues #44

@akhanf

Description

@akhanf

With our recent Siemens software upgrade and move to enhanced dicoms we expected some issues, and here are the ones I've seen so far.

  1. the cfmm2tar filename pattern, specifically the study instance uid hash, is of a different form now:

e.g. from:
Lau_NeuroAnalytics_20231218_SNSX_P145_1.350F466C.tar
to:
Lau_NeuroAnalytics_20241112_2024_11_12_209_8bee69a3-a558-44.25602A30.tar

The parsing in tar2bids is kludgy, so that will get a bit more awkward unless we move it to actual regex.. Not sure if the pattern (8hex-4hex-2hex?) will be consistent for different scans - @isolovey do you know?

  1. the dcmstack in heudiconv chokes on the enhanced dicoms:
ERROR: Embedding failed: Exception raised while executing Node embedder.

Traceback:
	Traceback (most recent call last):
	  File "/usr/local/lib/python3.9/dist-packages/nipype/interfaces/base/core.py", line 397, in run
	    runtime = self._run_interface(runtime)
	  File "/usr/local/lib/python3.9/dist-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
	    out = function_handle(**args)
	  File "<string>", line 35, in embed_dicom_and_nifti_metadata
	  File "/usr/local/lib/python3.9/dist-packages/dcmstack/dcmstack.py", line 1163, in parse_and_stack
	    results[key] = stack_group(group, warn_on_except, **stack_args)
	  File "/usr/local/lib/python3.9/dist-packages/dcmstack/dcmstack.py", line 1117, in stack_group
	    result.add_dcm(dcm, meta)
	  File "/usr/local/lib/python3.9/dist-packages/dcmstack/dcmstack.py", line 551, in add_dcm
	    nii_wrp = NiftiWrapper.from_dicom_wrapper(dw, meta)
	  File "/usr/local/lib/python3.9/dist-packages/dcmstack/dcmmeta.py", line 1561, in from_dicom_wrapper
	    result = klass(nii_img, make_empty=True)
	  File "/usr/local/lib/python3.9/dist-packages/dcmstack/dcmmeta.py", line 1280, in __init__
	    self.meta_ext.check_valid()
	  File "/usr/local/lib/python3.9/dist-packages/dcmstack/dcmmeta.py", line 306, in check_valid
	    raise InvalidExtensionError('Missing required base '
	dcmstack.dcmmeta.InvalidExtensionError: The extension is not valid: Missing required base classification time

however, it looks like using the latest heudiconv fixes this (I've confirmed that myself); looks like it might be related to having the latest nibabel version, as mentioned in this PR:
nipy/heudiconv#800

However, we are currently using a custom fork of heudiconv that has a fix for the Bruker dicoms -- @AlanKuurstra I wonder if this is still needed with the latest heudiconv/nibabel? Or do we just need to update our custom fork? I haven't looked into this yet..

  1. In some of our heuristics (most importantly the default cfmm_base heuristic), we make use of the third entry of ImageType to check whether the data was corrected with gradient non-linearity correction -- this has been 'DIS2D', 'DIS3D' or 'ND', for no distortion correction. Now the field seems to be 'NONE' -- I'd like to confirm (maybe need to get on the console and do some tests with and without correction enabled) what values appear when correction is enabled. In any case, would require a minor update to this and any other heuristics that do the same to also check for NONE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions