moloney / dcmstack

DICOM to Nifti conversion with meta data preservation
Other
72 stars 51 forks source link

MetaExtractor only works with pydicom.dataset #83

Open rmarrcode opened 1 year ago

rmarrcode commented 1 year ago

This class should also work with dcmstack objects. It would be easier to use this way. I don't understanding the idea behind creating a dcmstack type but expecting users to use a new type for other important tasks.

moloney commented 1 year ago

The DicomStack type is just intended to be a temporary object created during the process of converting to another file format (i.e. Nifti). The MetaExctractor is intended to pull meta data out of a single DICOM file (including from private sub headers) and make it easier to use and JSON compatible, with some basic default anonymization. This extraction process only has to happen once on the raw DICOM files. The meta data from one or more DICOM files ends up summarized in a DcmMetaExtension, which is associated with a Nifti through a NiftiWrapper.

The API for working with meta data in a NiftiWrapper or DcmMetaExtension isn't great, and I'm not really interested in trying to make my own implementation of XArray so I would rather work towards leveraging their work than improve what is currently there (outside of bug fixes and minor stuff).