Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Extendig metadata JSON with Brain Imaging Data Structure fields #39
Brain Imaging Data Structure (BIDS) is a new specification describing how a neuroimaging dataset should be organized and described. Part of the standard are JSON sidecar files with acquisition parameters essential for performing data analysis that are not present (or reliably reported) in the NIFTI header (see here for details). Such fields include but are not limited to:
Some of those fields are part of DICOM Ontology and are directly accessible from standard DICOM headers (such as RepetitionTime and EchoTime) and some are not part of standard DICOM nomenclature and require extraction using vendor and sequence specific heuristics (for example PhaseEncodingDirection or EffectiveEchoSpacing). We aded them to the BIDS standard because they are necessary for data processing.
I would like to send a PR that would include code to extract those fields from DICOM metadata and putting them in the root of the embedded JSON file. For example:
Before I commit time to doing this I would love to hear your opinion. For some of the fields (such as PhaseEncodingDirection) I only have code to infer them for siemens scans, but this field can be just omitted when a different type of scan will be used. We can also make all of the BIDS fields optional controlled by a command line flag.
I would rather not do this in such an ad hoc way. Currently dcmstack just pulls DICOM meta data and summarizes it. All of the meta data is classified based on how it varies (which your proposal does not do). Conversion of this data to meet other standards should probably happen elsewhere.
I do want to try to implement something like this in nibabel: https://github.com/nipy/nibabel/wiki/json-header-extension . This would allow some normalization of meta data across vendors.