brainlife/app-mrtrix3-act

mrconvert: [ERROR] unknown format for image "null"

Opened this issue · 2 comments

I am seeing the following error messager on 1.4 branch.

+ set -e
++ jq -r .diff config.json
+ DIFF=../5fb339585079852dfbdaf4e5/output/dwi.nii.gz
++ jq -r .bval config.json
+ BVAL=../5fb339585079852dfbdaf4e5/output/dwi.bvals
++ jq -r .bvec config.json
+ BVEC=../5fb339585079852dfbdaf4e5/output/dwi.bvecs
++ jq -r .anat config.json
+ ANAT=null
++ jq -r .ens_lmax config.json
+ ENS_LMAX=null
++ jq -r .imaxs config.json
+ IMAXS=16
++ jq -r .curvs config.json
+ CURVS=35
++ jq -r .num_fibers config.json
+ NUM_FIBERS=1500000
++ jq -r .min_length config.json
+ MIN_LENGTH=25
++ jq -r .max_length config.json
+ MAX_LENGTH=220
++ jq -r .tensor_fit config.json
+ TENSOR_FIT=null
++ jq -r .norm config.json
+ NORM=null
++ jq -r .do_prb2 config.json
+ DO_PRB2=true
++ jq -r .do_prb1 config.json
+ DO_PRB1=null
++ jq -r .do_detr config.json
+ DO_DETR=null
++ jq -r .do_dtdt config.json
+ DO_DTDT=null
++ jq -r .do_dtpb config.json
+ DO_DTPB=null
++ jq -r .do_fact config.json
+ DO_FACT=null
++ jq -r .fact_dirs config.json
+ FACT_DIRS=null
++ jq -r .fact_fibs config.json
+ FACT_FIBS=null
++ jq -r .premask config.json
+ PREMASK=null
+ rm -rf ./tmp
+ mkdir ./tmp
+ difm=dwi
+ mask=mask
+ anat=t1
+ echo 'Converting raw data into MRTrix3 format...'
+ mrconvert -fslgrad ../5fb339585079852dfbdaf4e5/output/dwi.bvecs ../5fb339585079852dfbdaf4e5/output/dwi.bvals ../5fb339585079852dfbdaf4e5/output/dwi.nii.gz dwi.mif --export_grad_mrtrix dwi.b -force -nthreads 8 -quiet
+ bet ../5fb339585079852dfbdaf4e5/output/dwi.nii.gz bet -R -m -f 0.3
+ mrconvert bet_mask.nii.gz mask.mif -force -nthreads 8 -quiet
+ mrconvert null t1.mif -force -nthreads 8 -quiet
mrconvert: [ERROR] unknown format for image "null"
mrconvert: [ERROR] error opening image "null"

real	0m16.051s
user	0m12.297s
sys	0m1.789s

The config.json fed to this was

    "min_length": 25,
    "max_length": 220,
    "imaxs": 16,
    "curvs": 35,
    "num_fibers": 1500000,
    "do_prb2": true,
    "diff": "../5fb339585079852dfbdaf4e5/output/dwi.nii.gz",
    "bvec": "../5fb339585079852dfbdaf4e5/output/dwi.bvecs",
    "bval": "../5fb339585079852dfbdaf4e5/output/dwi.bvals",
    "t1": "../5fb338ca5079859dd6daf4ca/5fae16596b11522ce4dfab76/t1.nii.gz",

I've updated "t1" to "anat" in the app registration. Now the App is running all the way to the end, but it looks like it's just skipping all tracking.

time="2020-11-19T17:55:52-05:00" level=warning msg="\"/run/user/1589653\" directory set by $XDG_RUNTIME_DIR does not exist. Either create the directory or unset $XDG_RUNTIME_DIR.: stat /run/user/1589653: no such file or directory: Trying to pull image in the event that it is a public image."
INFO:    Using cached SIF image
+ set -e
++ jq -r .diff config.json
+ DIFF=../5fb339585079852dfbdaf4e5/output/dwi.nii.gz
++ jq -r .bval config.json
+ BVAL=../5fb339585079852dfbdaf4e5/output/dwi.bvals
++ jq -r .bvec config.json
+ BVEC=../5fb339585079852dfbdaf4e5/output/dwi.bvecs
++ jq -r .anat config.json
+ ANAT=../5fb338ca5079859dd6daf4ca/5fae16596b11522ce4dfab76/t1.nii.gz
++ jq -r .ens_lmax config.json
+ ENS_LMAX=null
++ jq -r .imaxs config.json
+ IMAXS=4
++ jq -r .curvs config.json
+ CURVS=35
++ jq -r .num_fibers config.json
+ NUM_FIBERS=15000
++ jq -r .min_length config.json
+ MIN_LENGTH=25
++ jq -r .max_length config.json
+ MAX_LENGTH=220
++ jq -r .tensor_fit config.json
+ TENSOR_FIT=null
++ jq -r .norm config.json
+ NORM=null
++ jq -r .do_prb2 config.json
+ DO_PRB2=true
++ jq -r .do_prb1 config.json
+ DO_PRB1=null
++ jq -r .do_detr config.json
+ DO_DETR=null
++ jq -r .do_dtdt config.json
+ DO_DTDT=null
++ jq -r .do_dtpb config.json
+ DO_DTPB=null
++ jq -r .do_fact config.json
+ DO_FACT=null
++ jq -r .fact_dirs config.json
+ FACT_DIRS=null
++ jq -r .fact_fibs config.json
+ FACT_FIBS=null
++ jq -r .premask config.json
+ PREMASK=null
+ rm -rf ./tmp
+ mkdir ./tmp
+ difm=dwi
+ mask=mask
+ anat=t1
+ echo 'Converting raw data into MRTrix3 format...'
+ mrconvert -fslgrad ../5fb339585079852dfbdaf4e5/output/dwi.bvecs ../5fb339585079852dfbdaf4e5/output/dwi.bvals ../5fb339585079852dfbdaf4e5/output/dwi.nii.gz dwi.mif --export_grad_mrtrix dwi.b -force -nthreads 8 -quiet
+ bet ../5fb339585079852dfbdaf4e5/output/dwi.nii.gz bet -R -m -f 0.3
+ mrconvert bet_mask.nii.gz mask.mif -force -nthreads 8 -quiet
+ mrconvert ../5fb338ca5079859dd6daf4ca/5fae16596b11522ce4dfab76/t1.nii.gz t1.mif -force -nthreads 8 -quiet
+ mrmath - mean b0.mif -axis 3 -nthreads 8 -quiet -force
+ dwiextract dwi.mif - -bzero -nthreads 8 -quiet
+ '[' '!' -f b0.mif ']'
++ mrinfo -shell_bvalues dwi.mif
++ wc -w
+ ISHELL=3
+ NSHELL=2
++ mrinfo -shell_sizes dwi.mif
++ awk '{print $1}'
+ NB0s=6
+ EB0=0,
+ '[' 2 -gt 1 ']'
+ MS=1
+ echo 'Multi-shell data: 2 total shells'
+ echo Number of b0s: 6
++ mrinfo -shell_bvalues dwi.mif
+ BVALS='5 1496.94 2995 '
++ mrinfo -shell_sizes dwi.mif
+ COUNTS='6 31 31 '
+ echo -n 'Shell b-values: '
+ echo 5 1496.94 2995
+ echo -n 'Unique Counts:  '
+ echo 6 31 31
++ dirstat dwi.b
++ grep lmax
++ awk '{print $8}'
++ sed 's|:||g'
+ MLMAXS='6
6'
+ echo -n 'Maximum Lmax:   '
+ echo 6 6
++ echo '6
6'
++ tr ' ' '\n'
++ head -n1
++ sort -nr
+ MAXLMAX=6
+ echo 'Maximum Lmax across shells: 6'
+ '[' -z 4 ']'
++ echo 4
++ wc -w
+ NMAX=1
+ '[' 1 -gt 1 ']'
+ MMAXS=4
+ '[' 4 -gt 6 ']'
+ '[' null == true ']'
+ LMAXS=4
+ '[' 6 -eq 0 ']'
+ RMAX=0
+ iter=1
+ '[' 1 -lt 3 ']'
+ RMAX=0,6
+ iter=2
+ '[' 2 -lt 3 ']'
+ RMAX=0,6,6
+ iter=3
+ '[' 3 -lt 3 ']'
+ echo 'Tractography will be created on lmax(s): 4'
+ TOTAL=0
+ '[' true == true ']'
+ for lmax in '$LMAXS'
+ for curv in '$CURVS'
+ TOTAL=15000
+ '[' null == true ']'
+ '[' null == true ']'
+ '[' null == true ']'
+ '[' null == true ']'
+ '[' null == true ']'
+ echo 'Expecting 15000 streamlines in track.tck.'
+ '[' '!' -z null ']'
++ echo 5 1496.94 2995
++ grep -o null
+ TFE=

real	0m12.362s
user	0m14.372s
sys	0m2.756s