nipy / heudiconv

Flexible DICOM conversion into structured directory layouts
https://heudiconv.readthedocs.io
Other
232 stars 125 forks source link

[ENH] update_complex_name to handle real+imaginary complex data #761

Open bpinsard opened 2 months ago

bpinsard commented 2 months ago

Someone recently shared with me some GE Hyperband multi-echo data from a SIGNA UHP, where they exported mag + real + imaginary data (weird combination but why not), all 3 ends up in the same series. So that should ideally be handled in heudiconv within update_complex_name which only covers mag+phase case for now.

Though I hope it won't be the final export format for that project, it could make sense to cover that usecase in heudiconv.

I don't know if there are any open test data with real+imaginary data within the same series, @neurolabusc ?

bpinsard commented 2 months ago

Codespell get called in both Codespell and Linters? It fails in both on some files that has nothing to do with that PR.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 62.50000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 82.02%. Comparing base (41b6d83) to head (eef6f46). Report is 2 commits behind head on master.

Files Patch % Lines
heudiconv/dicoms.py 16.66% 5 Missing :warning:
heudiconv/convert.py 90.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #761 +/- ## ========================================== - Coverage 82.08% 82.02% -0.07% ========================================== Files 42 42 Lines 4215 4223 +8 ========================================== + Hits 3460 3464 +4 - Misses 755 759 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bpinsard commented 2 months ago

This will require https://github.com/rordenlab/dcm2niix/pull/826 to work, otherwise we might need to assume that data are "MAGNITUDE" by default in update_complex_name

yarikoptic commented 2 months ago

Codespell get called in both Codespell and Linters? It fails in both on some files that has nothing to do with that PR.

thanks! now there is

bpinsard commented 2 months ago

ImageType is a mess: just remembered that diffusion data on Siemens won't have that info in the ImageType, see https://github.com/CMRR-C2P/MB/issues/305 for the CMRR sequence where they were able to fix that.

I wonder if dcm2niix should add a new ComplexImageComponent json tag rather than editing the ImageType to match what inconsistently exists on Siemens.