Skip to content
Matthew Brett edited this page Nov 22, 2012 · 12 revisions

BIAP4 - merging nibabel and dcmstack

In which we set out what dcmstack does and how it might integrate with the nibabel objects and functions.

This first draft is my (MBs) understanding of what Brendan Moloney told me today (21 Nov 2012).

Overview

dcmstack reads a series of DICOM images, works out their relationship in terms of slices and volumes, and compiles them into nifti volumes.

In the course of the read, dcmstack creates a DcmMetaExtension object : https://github.com/moloney/dcmstack/blob/master/src/dcmstack/dcmmeta.py#L92

The DcmMetaExtension contains copied, summarized or inferred information from reading the slice by slice or volume DICOM information from the DICOM headers.

As one or more DICOMs are read, the DcmMetaExtension fills out its fields.

Some fields in the DcmMetaExtension are identified as being per-slice, others as being per-volume.

After reading the information into the DcmMetaExtension, dcmstack gets the pixel data, and affine, and compiles that into a Nifti image, with the DcmMetaExtension as a header extension.

When working with these images, it's attractive to be able to keep track of the meta-information in the DcmMetaExtension. For example, when taking slice out of a 3D volume, we want to keep track of the information specific to the chosen slice, and remove information for other slices.

Clone this wiki locally