HeuDiConv unable to unpack Phillips scanner data

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

@imawla Were you able to resolve this issue? (I am having the same problem using heudiconv with Phillips .dcm files; I have successfully converted Siemens .IMA using heudiconv and also successfully used dcm2niix separately on the Phillips data)

1 Like

Hi everyone,

Has anyone been able to resolve this issue? I am having several instances where DICOM to Nifti conversion through Heudiconv keeps crashing with the Phillips scanner. Has anyone been able to resolve it or found an alternative method to convert DICOM to Nifti in BIDS format?

Thanks.

–Subbi M.

That is quite an old (5 yo!!!) issue/post. There were lots of changes in dcm2niix and heudiconv since then and you would need to be more specific with the issue you are experiencing. In general Philips scanners are supported. Search here and GitHub - nipy/heudiconv: A flexible DICOM converter for organizing brain imaging data into structured directory layouts for similar symptoms and if you find nothing, make sure using recent dcm2niix and heudiconv and file a new issue there. ideally with some sample data to try on

Hi @yarikoptic

Thanks. Noted. I replied to my previous post here: