[Neuroimaging] Reading Dicom files with nibabel

Brendan Moloney moloney at ohsu.edu
Mon Aug 3 23:34:27 CEST 2015


> Chris is right - dcmstack is the current best answer.
> To expand a bit - we plan to integrate dcmstack and nibabel at some
> point, but progress is slow, that is mainly my fault.

Well I think most of the blame is on me...

But yes, we are still working (slowly) towards some integration. I 
actually have a little bit of time here and there to work on this now 
(and hopefully much more in the near future).  

I have a PR that is about 90% complete for doing additional meta data 
extraction from private sub-headers (just Siemens currently but the 
approach is generic): https://github.com/nipy/nibabel/pull/290 

That PR is actually extracting much more meta data than dcmstack 
does currently, so that is why it is taking a while. A nice side benefit is 
that this will let us read Siemens raw measurement (k-space) files.

After that I want to start a PR for the actual DICOM -> Nifti conversion,
which should be somewhat straight forward as this will look more similar 
to the code already in dcmstack.

Eventually we need some meta data anonymization. Satra suggested 
support for CTP anonymization profiles and I agree that is a good way 
to go. I just want to allow it to be modified also in a pythonic manner 
(i.e. don't require people go and edit XML profiles).

The last step would be storing extracted meta data in a Nifti header 
extension: https://github.com/nipy/nibabel/wiki/json-header-extension

But it sounds like you are mostly interested in plain DICOM to Nifti 
conversion (step 2), which may actually get integrated in the not-to-
distant future.


More information about the Neuroimaging mailing list