-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Data formats clarification #1720
base: master
Are you sure you want to change the base?
Changes from all commits
3c83f3e
d2b33fe
f8be29d
f261fb3
d5d2928
8943f54
f655623
838ed8e
55acae0
7f15ae8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -409,20 +409,18 @@ 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, if it | ||
is required, 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. | ||
Comment on lines
+419
to
+421
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For certain file the sidecar is REQUIRED so I would actually remove this sentence. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would agree if JSON sidecars was properly introduced in common principles. It is mentioned in several places, but without a proper definition. This paragraph tried to provide such definition. |
||
If present, sidecar JSON filename MUST be same as as the imaging file, but | ||
with a `.json` extension. | ||
|
||
### Tabular files | ||
|
||
|
nbeliy marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
# 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. | ||
Remi-Gau marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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. | ||
|
||
Multi-volume acquisitions (for example, 2D slices of anatomical MRI or 3D | ||
volumes of functional MRI) MUST be concatenated into single image (3D or 4D, | ||
respectively). | ||
|
||
Due to the important size of MRI imaging data, we RECOMMEND using compressed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment about PET and recommending zipped data. |
||
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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,10 +73,28 @@ and a guide for using macros can be found at | |
suffixes=["pet", "events", "physio", "stim"]) | ||
}} | ||
|
||
PET data MUST be stored in the `pet` directory. | ||
PET imaging data SHOULD be stored in 4D (or 3D, if only one volume was acquired) | ||
NIfTI files with the `_pet` suffix. | ||
Volumes MUST be stored in chronological order (the order they were acquired in). | ||
### PET data format | ||
|
||
All PET 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, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if it's still needed. Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No idea but I am starting to think we should NOT mention things that are NOT allowed, because it could get very long. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mnoergaard might know :-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For MRI is needed -- just saying NIFTI includes the |
||
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. | ||
|
||
Dynamic (multi-volume) PET imaging data SHOULD be stored in 4D, | ||
in chronological order (the order they were acquired in). | ||
|
||
Due to the important size of PET imaging data, we RECOMMEND using compressed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we do not actually officialy recommend (meaning that the validator would throw a warning if people use Maybe "we suggest" or "we enourage". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Recommendation was carried from common principles:
|
||
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. | ||
|
||
### PET file naming | ||
|
||
PET data MUST be stored in the `pet` directory with `_pet` suffix. | ||
|
||
The OPTIONAL [`task-<label>`](../appendices/entities.md#task) is used to | ||
indicate a task subjects were asked to perform in the scanner. | ||
|
@@ -129,8 +147,10 @@ the same [`task-<label>`](../appendices/entities.md#task) entity SHOULD be used. | |
For further details, see | ||
[Task (including resting state) imaging data](./magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). | ||
|
||
<!-- | ||
In addition to the imaging data (`*.nii`) a `_pet.json` sidecar file MUST be provided. | ||
The included metadata are divided into sections described below. | ||
--> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Commented this paragraph, as it appears in incorrect section (JSON must be present no matter if it's pure PET of PET-MRI dataset). Also, the same information appears directly below. |
||
|
||
### PET metadata | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if this heading should not be renamed now that this section has become more generic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used Imaging files as generic file, including for example EEG. I can't find a good name, data file will also incompass the tabular files. But I'm open for suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I was more making a note also for other reviewers