Magnetic resonance imaging is an essential data acquisition method for TRR379.
Four sites acquire such data.
Each site has (different) established routines and conventions.
This documentation collects resources and best practices that can be adopted by TRR379 members.
As the “true” raw data, DICOMs are rarely (re)accessed and hardly ever need to change.
However, they need to be stored somewhere.
Tracking DICOMs in DataLad datasets allows dependency tracking for conversion to NIfTI.
However, it’s good to keep DataLad optional (allow DataLad and non-DataLad access).
Historical precedent: ICF at FZJ
The following solution has been proposed for the Imaging Core Facility at FZJ:
One of the TRR sites indicated intent to use a Forgejo instance for DICOM storage.
A particular challenge for the underlying system was inode limitation.
For this reason, an adaptation of the ICF system has been proposed:
a dataset is generated upfront, and DICOM tarball is stored with the dataset in Forgejo (as annex)
we keep using the archivist remote (file in tarball) to avoid using up thousands of inodes for individual files
(Git can pack its repository into several files, so we only add one more for the tarball).
A proof of principle for dataset generation (using re-written ICF
code) has been proposed in https://hub.trr379.de/q02/dicom-utilities. See the README for more
detailed explanations (and commit messages for even more detail).
timestamps are normalized to ensure re-packing the same data does not change tarball checksums ↩︎
uncurl is chosen because it allows re-writing patterns with just configuration, e.g., should the base URL change ↩︎
BIDS conversion
Converting the heterogeneous, site-specific raw MRI data acquisitions into a standardized dataset is an essential precondition for the collaborative work in TRR379.
It readies the data for processing with established pipelines, and applies a pseudonymization as a safeguard for responsible use of this personal data.
The conversion of raw MRI data in DICOM format to a BIDS-compliant dataset is a largely automated process.
The recommended software to be used for conversion is Heudiconv.
Heudiconv uses dcm2niix as the actual DICOM→NIfTI converter.
In our experience, dcm2niix is the most robust and most correct tool available for this task.
Heudiconv does the job of mapping DICOM series to BIDS entities (ie. determine BIDS-compliant file names).
A key heudiconv concept is a heuristic: a Python program (function) which looks at the DICOM series properties and matches it with a file naming pattern.
A heuristic typically relies on DICOM series naming (set at the scanner console), but it can also use other properties such as number of images or acquisition parameters.
Because TRR379 uses its own conventions, a matching heuristic needs to be provided (possibly one for each TRR379 site).
An implementation of such a heuristic has been created, and was tested on phantom MRI acquisitions from all sites (see below).
Using this heuristic, MRI data from all sites can be BIDS-standardized.
As with any automation, caution and oversight is needed for edge cases (e.g. repeated / discarded acquisitions).
Heudiconv tutorials further illustrate the process and capabilities of the software.
Scans of MRI phantoms were carried out using the intended sequences (presumably - see caveats section below).
These were shared with Q02 and uploaded to the TRR Hub forgejo instance:
Conversion of re-scanned Aachen phantom is in https://hub.trr379.de/q02/tmp-phantom-bids (separate from the above
because input data is not available as a DataLad dataset)