Hello everyone,
I am new to fMRI analyses and would appreciate some help with using dcm2bids to prepare my data for fMRIPrep.
As a background, our scanning protocol includes:
- Three task-based fMRI scans (AST, MT, SST; all with PA phase encoding)
- One resting-state fMRI scan (PA)
- One topup scan (AP) per task and for resting-state
- Four DWI scans:
- b0 (7 directions, PA)
- b1k (40 directions, AP)
- b2k (53 directions, AP)
- b3k (66 directions, AP)
I am following the official dcm2bids tutorial and can run dcm2bids successfully. However, the resulting NIfTI filenames are not very informative. At a glance, it is difficult to see which file corresponds to which task or DWI acquisition without inspecting the JSON sidecars.
Below are examples of the generated filenames for functional scans, topups, and DWI data, respectively:
Func:
sub-1001_dir-PA_run-01_bold.json
sub-1001_dir-PA_run-03_bold.json
sub-1001_dir-PA_run-01_bold.nii.gz
sub-1001_dir-PA_run-03_bold.nii.gz
sub-1001_dir-PA_run-02_bold.json
sub-1001_dir-PA_run-04_bold.json
sub-1001_dir-PA_run-02_bold.nii.gz
sub-1001_dir-PA_run-04_bold.nii.gz
topup:
sub-1001_dir-AP_run-01_epi.json
sub-1001_dir-AP_run-03_epi.json
sub-1001_dir-AP_run-01_epi.nii.gz
sub-1001_dir-AP_run-03_epi.nii.gz
sub-1001_dir-AP_run-02_epi.json
sub-1001_dir-AP_run-04_epi.json
sub-1001_dir-AP_run-02_epi.nii.gz
sub-1001_dir-AP_run-04_epi.nii.gz
DWI:
sub-1001_b0.bval
sub-1001_run-02_dwi.bval
sub-1001_b0.bvec
sub-1001_run-02_dwi.bvec
sub-1001_b0.json sub-1001_run-02_dwi.json
sub-1001_b0.nii.gz
sub-1001_run-02_dwi.nii.gz
sub-1001_run-01_dwi.bval
sub-1001_run-03_dwi.bval
sub-1001_run-01_dwi.bvec
sub-1001_run-03_dwi.bvec
sub-1001_run-01_dwi.json
sub-1001_run-03_dwi.json
sub-1001_run-01_dwi.nii.gz
sub-1001_run-03_dwi.nii.gz
As far as I understand, the naming convention is controlled by the dcm2bids_config.json. Below is an excerpt of my configuration file (functional tasks, fieldmaps, and DWI):
{
"descriptions": [
{
"id": "id_task-Rest",
"datatype": "func",
"suffix": "bold",
"custom_entities": {
"task": "Rest",
"acq": "epfid2m4",
"dir": "PA",
"run": "Run{item:02d}"
},
"criteria": {
"SeriesDescription": "rs-fMRI_mbep2d_bold_2mm_MB4_PA_Run1"
},
"sidecar_changes": {
"TaskName": "Rest"
}
},
{
"id": "id_task-SST",
"datatype": "func",
"suffix": "bold",
"custom_entities": {
"task": "SST",
"acq": "epfid2m4",
"dir": "PA",
"run": "Run{item:02d}"
},
"criteria": {
"SeriesDescription": "fMRI_SST_mbep2d_bold_2mm_MB4_PA_Run1"
},
"sidecar_changes": {
"TaskName": "SST"
}
},
{
"id": "id_task-MT",
"datatype": "func",
"suffix": "bold",
"custom_entities": {
"task": "MT",
"acq": "epfid2m4",
"dir": "PA",
"run": "Run{item:02d}"
},
"criteria": {
"SeriesDescription": "fMRI_MT_mbep2d_bold_2mm_MB4_PA_Run1"
},
"sidecar_changes": {
"TaskName": "MT"
}
},
{
"id": "id_task-AST",
"datatype": "func",
"suffix": "bold",
"custom_entities": {
"task": "AST",
"acq": "epfid2m4",
"dir": "PA",
"run": "Run{item:02d}"
},
"criteria": {
"SeriesDescription": "fMRI_AST_mbep2d_bold_2mm_MB4_PA_Run1"
},
"sidecar_changes": {
"TaskName": "AST"
}
},
{
"datatype": "fmap",
"suffix": "epi",
"criteria": {
"SeriesDescription": "mbep2d_bold_2mm_MB4_topup_AP"
},
"sidecar_changes": {
"intendedFor": ["id_task-Rest"]
}
},
{
"datatype": "fmap",
"suffix": "epi",
"criteria": {
"SeriesDescription": "mbep2d_bold_2mm_MB4_SST_topup_AP"
},
"sidecar_changes": {
"intendedFor": ["id_task-SST"]
}
},
{
"datatype": "fmap",
"suffix": "epi",
"criteria": {
"SeriesDescription": "mbep2d_bold_2mm_MB4_MT_topup_AP"
},
"sidecar_changes": {
"intendedFor": ["id_task-MT"]
}
},
{
"datatype": "fmap",
"suffix": "epi",
"criteria": {
"SeriesDescription": "mbep2d_bold_2mm_MB4_AST_topup_AP"
},
"sidecar_changes": {
"intendedFor": ["id_task-AST"]
}
},
{
"datatype": "dwi",
"suffix": "dwi",
"criteria": {
"SeriesDescription": "mb_diff_b1k_40dirs_2mm_AP_MB2G2"
}
},
{
"datatype": "dwi",
"suffix": "dwi",
"criteria": {
"SeriesDescription": "mb_diff_b2k_53dirs_2mm_AP_MB2G2"
}
},
{
"datatype": "dwi",
"suffix": "dwi",
"criteria": {
"SeriesDescription": "mb_diff_b3k_66dirs_2mm_AP_MB2G2"
}
},
{
"datatype": "dwi",
"suffix": "b0",
"criteria": {
"SeriesDescription": "mb_diff_b0_7dirs_2mm_PA_MB2G2"
}
}
]
}
Is it possible to make the filenames more informative (e.g. explicitly indicating task names or DWI b-values) while remaining fully BIDS-compliant? If so, what would be the recommended way to do this in dcm2bids?
Many thanks in advance for your help!