Summary of what happened:
I am trying to convert a set of dicom files to BIDS format using dcm2niix and a custom heuristic. See the following command:
heudiconv --files /mnt/LD4_PilotData/rawdata/LD001/*/*dcm -o /mnt/LD4_PilotData/subjects -f /mnt/LD4_PilotData/code/LD4_BIDS.py -s 001 -c dcm2niix -b --overwrite
Everything converts as expected except for one thing: One particular run, run # 5, which is the 6th run out of 7 runs (using a 0-6 naming convention) should be a functional bold 4D image, but for some reason it only has 3 dimensions after conversion. All the other functional runs are converted correctly with 4D. Hence, I’m not sure what’s going on with run # 5 (although I do not think it is a data issue, because I tried preprocessing the data in AFNI and it turns out fine).
Perhaps a factor is that my subject dicom files include both multiple multi-echo/multi-band scans and one or more non-ME/non-MB fMRI scans. So maybe I am not constructing my heurstic LD4_BIDS.py correctly to account for this? (This is my first time dealing with single and mutli band/ME files).
I have attached my custom heuristic LD4_BIDS.py.txt and any help is appreciated!
Command used (and if a helper script was used, a link to the helper script or the command generated):
heudiconv --files /mnt/LD4_PilotData/rawdata/LD001/*/*dcm -o /mnt/LD4_PilotData/subjects -f /mnt/LD4_PilotData/code/LD4_BIDS.py -s 001 -c dcm2niix -b --overwrite
Version:
- OS: Ubuntu 18.04.6 LTS
- Python version: Python 2.7.17
- Heudiconv version: 0.5.4.dev1
- dcm2niix version: v1.0.20181125
Environment (Docker, Singularity / Apptainer, custom installation):
- Local environment
Data formatted according to a validatable standard? Please provide the output of the validator:
#### **Error 2: [Code 54] BOLD_NOT_4D**
Bold scans must be 4 dimensional.1 file
#### **sub-001_task-SD_run-05_echo-1_bold.nii.gz** **109.761 KB | application/gzip**
Location:
subjects/sub-001/func/sub-001_task-SD_run-05_echo-1_bold.nii.gz
Reason:
Bold scans must be 4 dimensional.
Evidence:
header field "dim" = 3,64,64,23