On 20 August 2014 14:27, Anastasia Yendiki
<ayendiki@nmr.mgh.harvard.edu> wrote:
Thanks a lot, Kirstie. Nice job on finding solutions in the archives! You
are a model user :)
Thank you....although unfortunately not quite the perfect user - I still have problems...
I
think I lied in my earlier email - I think that the mri_convert --frame problem
(#3 below) is actually in the newest version of trac-preproc. (I didn't
do a great job of keeping track of my version because I was being lazy!
More fool me.)
Here's the part of the code which in
the May 2014 update ('$Id: trac-preproc,v 1.49 2014/03/22 03:31:22
ayendiki Exp $' ) that is leading to the error:
#=========================================================================
# Make diffusion brain mask
if ($#nb0 > 0) then
set lowblist = ()
@ k = 0
while ($k < $nb0)
set lowblist = ($lowblist $k)
@ k = $k + 1
end
else
set bmin = `grep -v ^$ $dwidir/dwi_orig.mghdti.bvals \
| sort --numeric-sort | head -1`
set lowblist = `cat $dwidir/dwi_orig.mghdti.bvals \
| awk -v bmin=$bmin '{if ($1 == bmin) print NR-1}'`
endif
if (! $#lowblist) then
echo "ERROR: Cannot detect low-b volumes"
goto error_exit
endif
set cmd = mri_convert
set cmd = ($cmd --frame $lowblist)
set cmd = ($cmd $dwidir/dwi.nii.gz)
set cmd = ($cmd $dwidir/lowb.nii.gz)
echo $cmd |& tee -a $LF |& tee -a $CF
if ($RunIt) then
$cmd |& tee -a $LF
if ($status) goto error_exit
endif
#=========================================================================
Which leads to this command:
> mri_convert --frame 0 14 27 41 54 68 /scratch/kw401/UCHANGE_INTERIM/SUB_DATA/10778/SURFER/MRI0/dmri/dwi.nii.gz /scratch/kw401/UCHANGE_INTERIM/SUB_DATA/10778/SURFER/MRI0/dmri/lowb.nii.gz
And then to this error:
> mri_convert: extra arguments ("41" and following)
I made the following changes to the code (trac-preproc) and everything seems to run just fine.
#=========================================================================
OLD
> set cmd = ($cmd --frame $lowblist)
NEW
< set cmd = ($cmd --frame ${lowblist[1]})
#=========================================================================
What do you think? Is this just an odd-ness for me, or is
it a helpful fix? One thing that I haven't been able to ascertain is
whether I have an old version of mri_convert that should be able to
concatenate the six listed volumes! (The next section of code seems to
look like its trying to concatenate volumes so it might be expecting a
4D file? Or multiple lowb.nii.gz volumes?) I haven't seen this problem crop up in any later processing but it may do??
I hope this all makes sense! Thank you again for all your hard work!
Kx