Open p-j-smith opened 2 months ago
BIDS is predominantly a folder structure and naming scheme for organising nifti files from multiple subjects and sessions. While our current data structure is (for subject ids 1 and 2):
data
├───1
│ └───niftis
│ ├───T1.nii.gz
│ └───FLAIR.nii.gz
│
├───2
│ └───niftis
│ ├───T1.nii.gz
│ └───FLAIR.nii.gz
└───subjects.txt
A BIDS one might be like:
data
├───sub-1
│ └───anat
│ ├───sub-1_T1w.json
│ ├───sub-1_T1w.nii.gz
│ ├───sub-1_FLAIR.json
│ └───sub-1_FLAIR.nii.gz
│
└───sub-2
└───anat
├───sub-1_T1w.json
├───sub-1_T1w.nii.gz
├───sub-1_FLAIR.json
└───sub-1_FLAIR.nii.gz
BIDS may also optionally contain another level of directories inside the subject folder for individual scanning sessions.
So main changes are:
sub-
before the idniftis
must be renamed to anat
sub-ID_T1w.nii.gz
(for T1) and sub-ID_FLAIR.nii.gz
(for FLAIR). There may also be a session id here, if there was more than one scanning session e.g. sub-ID_ses-1_T1w.nii.gz
.json
file containing image metadata/parameters of the scan. This isn't used by the pipeline, but is part of the BIDS formatderivatives
folder inside BIDSsubjects.txt
file entirely and just pull subject IDs directly from the sub-
folder names in the BIDS dataSome useful links:
BIDS starter kit: really clear introduction to the BIDS format, starting from the folders page
BIDS validator: can be used to check if datasets comply with BIDS
BIDS Derivatives folder information
Note that the MRIcroGL dicom to nifti converter will produce BIDS jsons (also called 'BIDS Sidecar') automatically. There's an option on the left side for 'Create BIDS Sidecar', which should be set to 'Yes, Anonymized' by default.
If you give the output filename as sub-%i_%p
it'll get you pretty close to the filename you need (presumably without the T1w / FLAIR endings?)
Motivation
Suggested by Chris via email:
Pitch
derivatives
folderAlternatives
No response
Additional context
No response