Hi experts, I tried to unpack some Phillips scanner functional data using HeuDiConv and am getting the following error:
INFO: Running heudiconv version 0.5.3
INFO: Need to process 1 study sessions
INFO: PROCESSING STARTS: {'subject': '0501100704v05', 'outdir': '$datadir/BIDS/', 'session': None}
INFO: Processing 4 dicoms
INFO: Analyzing 4 dicoms
Traceback (most recent call last):
File "/opt/miniconda-latest/bin/heudiconv", line 11, in <module>
load_entry_point('heudiconv', 'console_scripts', 'heudiconv')()
File "/home/eichesco/.local/lib/python3.6/site-packages/heudiconv/cli/run.py", line 125, in main
process_args(args)
File "/home/eichesco/.local/lib/python3.6/site-packages/heudiconv/cli/run.py", line 338, in process_args
overwrite=args.overwrite,)
File "/home/eichesco/.local/lib/python3.6/site-packages/heudiconv/convert.py", line 159, in prep_conversion
grouping=None)
File "/home/eichesco/.local/lib/python3.6/site-packages/heudiconv/dicoms.py", line 122, in group_dicoms_into_seqinfos
if mw.is_same_series(mwgroup[idx]):
File "/home/eichesco/.local/lib/python3.6/site-packages/nibabel/nicom/dicomwrappers.py", line 357, in is_same_series
my_sig = self.series_signature
File "/home/eichesco/.local/lib/python3.6/site-packages/nibabel/onetime.py", line 141, in __get__
val = self.getter(obj)
File "/home/eichesco/.local/lib/python3.6/site-packages/nibabel/nicom/dicomwrappers.py", line 600, in series_signature
signature['image_shape'] = (self.image_shape, eq)
File "/home/eichesco/.local/lib/python3.6/site-packages/nibabel/onetime.py", line 141, in __get__
val = self.getter(obj)
File "/home/eichesco/.local/lib/python3.6/site-packages/nibabel/nicom/dicomwrappers.py", line 537, in image_shape
raise WrapperError("Calculated shape does not match number of "
nibabel.nicom.dicomwrappers.WrapperError: Calculated shape does not match number of frames.
In the DICOM folder, there is only one dicom image 0501100704_ser201_acq02_img00001.dcm
. I used dcm2niix
to unpack this dicom and am able to successfully obtain a 4D nii file, along with a .json. So not sure what is happening here.
Here’s the HeuDiConv command I used. The reason I think it is a Phillips scanner issue is because I tried the same command on test dicoms from Siemens and GE and they seem to work.
IMAGE=$dir/heudiconv.simg
singularity exec --bind '$dir:$dir' $IMAGE \
/neurodocker/startup.sh heudiconv \
-d '$dir/all_dicoms/{subject}/*/DICOM/*.dcm' \
-s $(cat $dir/all_dicoms/subject-list.txt | tr '\n' ' ') \
-f convertall \
-c none \
-o $dir/BIDS