Heudiconv - not processing from dicom to nii

Hi All,

We are running heudiconv (via singularity) and are having a hard time getting heudiconv to convert files from dicom to nii files.

Heudiconv will say it has run, but also produces the following error:
““embedder” (/home/scratch/embedmetafvxqq82g/embedder)
WARNING: [Node] Error on “embedder” (/home/scratch/embedmetafvxqq82g/embedder)
ERROR: Embedding failed: Cannot work out file type of”

The full error log is here: heudiconv error

Our heuristics file is here: heudiconv

The script we are running is:
python /autofs/homes/009/leb87/.local/bin/heudiconv -d /autofs/space/neuroendo_001/users/edcrp/dicom/1110/sub-{subject}/ses-{session}//MR -o /autofs/space/neuroendo_001/users/edcrp/nifti/1110 -f /autofs/space/neuroendo_001/users/edcrp/nifti/1110/heuristic_files/heuristic_ses-001_01_test.py -s ne00091 -ss 001 -c dcm2niix --bids --overwrite

When we look at the files they are too small to be actual nii files & will not open in fsl or spm to view. We believe it may only be converting the first volume, but are unsure.

Any insight anyone could provide would be helpful.

Hi @laurenbreithaupt!

While it’s a bit tough to say exactly what’s causing this error, I do have a few suggestions / questions that might help clear things up.

  1. What version of heudiconv are you running? Usually this will be the first thing that heudiconv prints to the screen (like: INFO: Running heudiconv version x.x.x ). I would recommend using version 0.5.4 if you’re not currently.

  2. Did you build the Singularity image from scratch or did you pull from the heudiconv Docker images? From the lack of pigz in the image it seems like you might be using either an old heudiconv image or you “rolled your own.” If you’re open to it, I’d suggest building a new one with:

    $ singularity pull docker://nipy/heudiconv:0.5.4
  3. It might be worth trying to just convert one of the DICOM series with just dcm2niix to see if it’s the conversion procedure that’s being screwy (I doubt it, based on the logfile, but it’s possible!). If you navigate to one of the directories with your DICOMs and run dcm2niix *dcm you should get a Nifti and json file as outputs (in the same directory). Can you load this generated Nifti in FSL?

Let me know!

(Sorry for all the edits—I accidentally posted before finishing typing!)