Hello again.

I dug into the code and could locate the problem (I don't have a solution, 
though. My coding skills are quite amateurish.) I think the problem somehow 
lies in the format of my bvecs file.

 flip4fsl is not able to read it correctly:
-------
if (-e $inbvecs) then
  echo "INFO: found $inbvecs, converting to FSL format"
  if $fslflipx then
    set sign = `echo $inorient | sed "s/[RAS]/+\ /g; s/[LPI]/-\ /g"`
  endif
  cp /dev/null $outbvecs
  foreach j (1 2 3)
    foreach k (1 2 3)
      if ($order[$k] == $j) then
        printf '%s ' `cat $inbvecs | awk -v sgn=$sign[$k]1 -v n=$k '{print 
sgn*$n}'` \
                    >> $outbvecs
        printf '\n' >> $outbvecs
      endif
    end
  end
endif
-------

I tried
awk '{ print $1 }' bvecs     (with my original bvecs file)
this printed:
0

This has something to do with the file's carriage return. I then produced a new 
bvecs file by manually typing values into a new text file. Now awk '{ print $1 
}' bvecs  delivers one column with 33 lines.


Nevertheless, the bvecs output of flip4fsl is weird (full of zeros; 3 x 66; see 
attachment).
I don't really get how this printf  & awk command works.

Any comments are very much appreciated.
Franz



Attachment: bvecs
Description: Binary data

Am 05.07.2011 um 15:19 schrieb Franz Liem:

> Dear Freesurfers.
> 
> I am trying to run trac-all on one subject and have a problem with the bvecs 
> file at the -prep stage.
> After dtifit is started an error massage occurs: Error: bvecs and bvals don't 
> have the same number of entries.
> I checked the dmri/bvals and dmri/bvecs. There seems to be a problem at the 
> -corr stage (-corr alone finishes without error).
> 
> My input file is one 4d .nii.gz file (with a total of 33 images, with the 
> first being a b0 image).
> 
> (I have attached the files from the dmri folder)
> 
> The dmri/bvecs file only contains:
> 0,0000000
> 0,0000000
> 0,0000000
> 
> The original bvecs contains 3 columns and 33 lines.
> 
> The dmri/bvals seems to be ok (1 column and 33 lines).
> 
> eddy_correct processes 33 files (dmri/dwi_tmp0000 ... dmri/dwi_tmp0032).
> 
> I am running FSL(4.6.1) and Freesurfer v5.1.0 on Mac (10.6.4) (although the 
> recon was done with 5.0.0, but I guess this not important at this stage, is 
> it?)
> 
> 
> *******
> My Configuration File:
> 
> set dtroot = $SUBJECTS_DIR/DTI
> set subjlist = (s02x)
> 
> set dcmroot = $SUBJECTS_DIR/DTI
> set dcmlist = (s02x/dti4d.nii.gz)
> 
> set bvalfile = /Users/.../DTI/bvals/bvals
> set bvecfile = /Users/.../DTI/bvals/bvecs
> set nb0 = 1
> 
> set doeddy = 1
> set dorotbvecs = 1
> set thrbet = 0.3
> set doregflt = 1
> set doregbbr = 0
> *******
> 
> 
> Thanks,
> Franz
> 
> <bvals><bvecs><bvecs.norot><dwi_orig.mghdti.bvals><dwi_orig.mghdti.bvecs>_______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> 
> 
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine 
> at
> http://www.partners.org/complianceline . If the e-mail was sent to you in 
> error
> but does not contain patient information, please contact the sender and 
> properly
> dispose of the e-mail.

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply via email to