Skip to content

Commit

Permalink
Frst draft: common principles and MRI
Browse files Browse the repository at this point in the history
  • Loading branch information
Beliy Nikita committed Mar 5, 2024
1 parent 05f64ed commit 3c83f3e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/common-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 26 additions & 0 deletions src/modality-specific-files/magnetic-resonance-imaging-data.md
Original file line number Diff line number Diff line change
@@ -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.

Check failure on line 16 in src/modality-specific-files/magnetic-resonance-imaging-data.md

View workflow job for this annotation

GitHub Actions / codespell

convertion ==> conversion

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
Expand Down

0 comments on commit 3c83f3e

Please sign in to comment.