From 3c83f3e78289deee641ef19a8ba992cb7db50525 Mon Sep 17 00:00:00 2001 From: Beliy Nikita Date: Tue, 5 Mar 2024 14:20:45 +0100 Subject: [PATCH] Frst draft: common principles and MRI --- src/common-principles.md | 30 ++++++++++--------- .../magnetic-resonance-imaging-data.md | 26 ++++++++++++++++ 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/src/common-principles.md b/src/common-principles.md index f56f420c08..987f05d851 100644 --- a/src/common-principles.md +++ b/src/common-principles.md @@ -409,20 +409,22 @@ datasets and non-compliant derivatives. ### Imaging files -All imaging data MUST be stored using the NIfTI file format. We RECOMMEND using -compressed NIfTI files (.nii.gz), either version 1.0 or 2.0. If using compressed files, -the gzip header SHOULD lack source filenames and timestamps. Imaging data SHOULD -be converted to the NIfTI format using a tool that provides as much of the NIfTI -header information (such as orientation and slice timing information) as -possible. Since the NIfTI standard offers limited support for the various image -acquisition parameters available in DICOM files, we RECOMMEND that users provide -additional meta information extracted from DICOM files in a sidecar JSON file -(with the same filename as the `.nii[.gz]` file, but with a `.json` extension). -Extraction of BIDS compatible metadata can be performed using [dcm2niix](https://github.com/rordenlab/dcm2niix) -and [dicm2nii](https://www.mathworks.com/matlabcentral/fileexchange/42997-xiangruili-dicm2nii) -DICOM to NIfTI converters. The [BIDS-validator](https://github.com/bids-standard/bids-validator) -will check for conflicts between the JSON file and the data recorded in the -NIfTI header. +All imaging data MUST be stored using BIDS-compatible file format, specified +in the respective section. The conversion from original imaging data format +to BIDS-compatible one must be performed using a tool that conserves as much +of original metadata, as possible, at exception of information relative to +the participant identity, which should not be present in the converted image. + +We RECOMMEND that the imaging file will be accompanied with a additional meta +information extracted from source image and/or external sources in a sidecar +JSON file. If present, sidecar JSON filename MUST be same as as the imaging +file, but with a `.json` extension). + +In some cases BIDS authorize to store compressed imaging files. In such cases +the compression must be performed using gzip algorithm, and have extension .gz, +for example `sub-123_T1w,nii.gz`. The zip header SHOULD lack source filenames +and timestamps, this can be achieved by using `---name` option of gzip, or +first renaming file, and then compressing it. ### Tabular files diff --git a/src/modality-specific-files/magnetic-resonance-imaging-data.md b/src/modality-specific-files/magnetic-resonance-imaging-data.md index 3b51755b1d..d8e09d499e 100644 --- a/src/modality-specific-files/magnetic-resonance-imaging-data.md +++ b/src/modality-specific-files/magnetic-resonance-imaging-data.md @@ -1,5 +1,31 @@ # Magnetic Resonance Imaging +## Data format + +All MRI imaging data MUST be stored using the [NIfTI-1 or NIFTI-2](https://nifti.nimh.nih.gov/) +file format (.nii). The ANALYZE-7.5 file format (.hdr/.img), despite +being very similar to NIFTI-1, is not allowed. Imaging data SHOULD be +converted to the NIfTI format using a tool that provides as much of +the NIfTI header information (such as orientation and slice timing +information) as possible. + +We RECOMMEND to use [dcm2niix](https://github.com/rordenlab/dcm2niix) +to convert source DICOM images to NIFTI-2 file format, as it extracts +large number of BIDS compatible metadata. As alternative, [dicm2nii](https://www.mathworks.com/matlabcentral/fileexchange/42997-xiangruili-dicm2nii) and +[spm_dicom_convert](https://github.com/neurodebian/spm12/blob/master/spm_dicom_convert.m) +from [spm package](https://github.com/neurodebian/spm12/tree/master) can be used for convertion. + +Multi-volume acquisitions (e.g., 2D slices of anatomical MRI or 3D volumes +of functional MRI) MUST be concatenated into single image (3D or 4D, respectively). +This can be performed either by [concat_images](https://nipy.org/nibabel/reference/nibabel.funcs.html) +of Nibabel package. + +Due to the important size of MRI imaging data, we RECOMMEND using compressed NIfTI files +by [gzip](https://www.gzip.org/) algorithm (.nii.gz). +If using compressed files, the gzip header SHOULD lack source filenames and timestamps. +This can be achieved by using `--no-name` option of gzip, or by first renaming original file +to BIDS standard and then compressing. + ## Common metadata fields MR Data described in the following sections share the following RECOMMENDED metadata