nipy / nibabel

Python package to access a cacophony of neuro-imaging file formats
http://nipy.org/nibabel/
Other
634 stars 258 forks source link

BF: Fix for 'split' (concatenated?) multiframe DICOM #1328

Open moloney opened 2 weeks ago

moloney commented 2 weeks ago

Can't just use number of frame indices to determine shape of data, as the actual frames could still be split into different files. Also can't assume a multiframe file is more than a single slice.

I am checking with colleagues if we have some phantom data I can use to create a test case.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.19%. Comparing base (d18022d) to head (578e60d).

Files Patch % Lines
nibabel/nicom/dicomwrappers.py 72.72% 1 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1328 +/- ## ========================================== - Coverage 92.20% 92.19% -0.01% ========================================== Files 98 98 Lines 12400 12400 Branches 2557 2559 +2 ========================================== - Hits 11433 11432 -1 Misses 644 644 - Partials 323 324 +1 ```

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

moloney commented 2 weeks ago

It seems like the "TestMultiFrameWrapper.test_data_trace" test assumes we will keep any extra-spatial (after 3rd dimension) singular dimensions. I can keep that behavior if desired but it seems counter intuitive.