It seems like config.json file is necessary when use dcm2bids to convert DICOM files. But sometimes the structure of DICOM files is not the same across all the subjects. For example, some subjects only complete part of all the tasks or perform some tasks twice due to bad performance during the 1st scanning. So one config.json file cannot fit to all the subjects and it’s impossible to create config.json manually for thousands of subjects. May I ask how to handle this situation? Especially the json files created by dcm2bids are required by fmriprep.
Here is what I can think of: use dcm2bids to convert on a subject who complete all the tasks, then rename and copy/paste these json files to folders containing NIFTI files of other subjects, does this make sense? The problem of this situation is, I do not know if json files contains individual information specified to each subject that may affect the outcomes of fmriprep.
Could you share a specific example? E.g. how would *task-A_run-??_bold.nii.gz look across a few subjects?
If it helps, if multiply scans correspond to an entry in your dcm2bids configuration file, then these files will be automatically labeled with the “run” attributed, given their order in the dicom series. E.g. sub-01_task-A_run-01_bold.nii.gz sub-01_task-A_run-02_bold.nii.gz
could be made from one dcm2bids config entry.
Thanks for your kind reply. I guess I know how config.json works. Missing data would not been converted even it is listed in the config.json. May I ask if there is a manual on how we should create config.json file, e.g., which variables are necessary and which variables should not be changed?
No worries.
If you still wanted to use dcm2bids, you can use parameters in the .json files dcm2bids creates in your config.json file. Every criterion dcm2bids uses to classify scans is taken from the json file for each scan/series.
If you need to include or change certain fields, you can include the "sidecarChanges": field in your dcm2bids config.json. Include it in a specific scan/series entry.
If you want, go ahead and post your dcm2bids config.json, as well as any relevant parameters. I can help you format it, if you like!