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
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
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.
Hi Franz,
Please refer to the following page:
http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/Tracula
Specifically Step7.2 for the format in which bvals/bvecs files should be given as an input.
If your input bvals/bvecs are in the right format flip4fsl should not give you an error.
Also if you can send us your original bvecs and bvals file (before any flipping is done) we can take a look to make sure it is in the right format.
-Priti
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
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
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
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
Hi Franz,
Sorry I just saw your previous email now. The problem could be due to the variable decimal places you've used in your input bvecs file. I've modified your bvecs file from the previous email to 3 decimal places constantly for all the gradient values (See Attached!!). Can you check to see if this solves the problem?
Thanks, Priti
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
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
Hi Priti and Anastasia.
Thank you very much for your replies.
Prit, I ran you modified_bvecs. This resulted in zeros (see bvecs_out). I also tried the modified_bvecs in a tab-deliniated version. same result.
Anastasia, the original bvecs file is attached as bvecs_orig. I imported this into excel and transposed it. Since (cp $bvecfile $dwidir/dwi_orig.mghdti.bvecs) the dwi_orig.mghdti.bvecs from my first post should be an exact copy of my original input.
1) I then took the bvecs file provided in the tutorial data (and deleted the lines >33). This again resulted in zeros (see bvecs_tutorial_out).
2) I then created a file with only ones and zeros (see bvecs_onezero_western): 33 lines of 0 0 0 1 0 0 ....
This resulted in correct bvecs after ecc (see bvecs_onezero_western_out).
3) I then appended .000 (see bvecs_onezero3dec_western) 0.000 0.000 0.000 1.000 0.000 0.000 ...
this resulted in the exact same bvecs after ecc (with integers - see bvecs_onezero3dec_western_out).
4) I then wrote 1.100 (instead of 1.000; see bvecs_onezero3decpoint1_western). This again led to the same output (see bvecs_bvecs_onezero3decpoint1_western_out).
So in conclusion, it seems as if the flip4fsl cannot read the digits after the decimal point. Can you reproduce this error? Might this be a problem with my german-language-settings computer (mac osx 10.6.4; although, since it is a swiss-german machine the system wide setting for decimal separator is the dot )?
Thank you, Franz
Am 05.07.2011 um 20:17 schrieb rspriti@nmr.mgh.harvard.edu:
Hi Franz,
Sorry I just saw your previous email now. The problem could be due to the variable decimal places you've used in your input bvecs file. I've modified your bvecs file from the previous email to 3 decimal places constantly for all the gradient values (See Attached!!). Can you check to see if this solves the problem?
Thanks, Priti
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 endifend 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
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
<modified_bvecs>
Hi Franz - Looks like it may be a windows vs. unix text file issue.
Looking at dwi_orig.mghdti.bvecs under unix, it seems that it has windows-specific carriage returns (they look like "^M" in unix). Actually, I could only see this on a darwin machine, on a centos machine I can only read the first 3 lines of the file. This was probably courtesy of excel. Can you try using dos2unix on the files or saving them in another program?
a.y
On Wed, 6 Jul 2011, Franz Liem wrote:
Hi Priti and Anastasia.
Thank you very much for your replies.
Prit, I ran you modified_bvecs. This resulted in zeros (see bvecs_out). I also tried the modified_bvecs in a tab-deliniated version. same result.
Anastasia, the original bvecs file is attached as bvecs_orig. I imported this into excel and transposed it. Since (cp $bvecfile $dwidir/dwi_orig.mghdti.bvecs) the dwi_orig.mghdti.bvecs from my first post should be an exact copy of my original input.
I then took the bvecs file provided in the tutorial data (and deleted the lines >33). This again resulted in zeros (see bvecs_tutorial_out).
I then created a file with only ones and zeros (see bvecs_onezero_western):
33 lines of 0 0 0 1 0 0 ....
This resulted in correct bvecs after ecc (see bvecs_onezero_western_out).
- I then appended .000 (see bvecs_onezero3dec_western)
0.000 0.000 0.000 1.000 0.000 0.000 ...
this resulted in the exact same bvecs after ecc (with integers - see bvecs_onezero3dec_western_out).
- I then wrote 1.100 (instead of 1.000; see bvecs_onezero3decpoint1_western). This again led to the same output (see bvecs_bvecs_onezero3decpoint1_western_out).
So in conclusion, it seems as if the flip4fsl cannot read the digits after the decimal point. Can you reproduce this error? Might this be a problem with my german-language-settings computer (mac osx 10.6.4; although, since it is a swiss-german machine the system wide setting for decimal separator is the dot )?
Thank you, Franz
Hi Anastasia, thank you. I created this file from scratch with osx' TextEdit and saved it as western european (Mac OS Roman). Are you able to read this?
Thanks, Franz
Am 06.07.2011 um 17:42 schrieb Anastasia Yendiki:
Hi Franz - Looks like it may be a windows vs. unix text file issue.
Looking at dwi_orig.mghdti.bvecs under unix, it seems that it has windows-specific carriage returns (they look like "^M" in unix). Actually, I could only see this on a darwin machine, on a centos machine I can only read the first 3 lines of the file. This was probably courtesy of excel. Can you try using dos2unix on the files or saving them in another program?
a.y
On Wed, 6 Jul 2011, Franz Liem wrote:
Hi Priti and Anastasia.
Thank you very much for your replies.
Prit, I ran you modified_bvecs. This resulted in zeros (see bvecs_out). I also tried the modified_bvecs in a tab-deliniated version. same result.
Anastasia, the original bvecs file is attached as bvecs_orig. I imported this into excel and transposed it. Since (cp $bvecfile $dwidir/dwi_orig.mghdti.bvecs) the dwi_orig.mghdti.bvecs from my first post should be an exact copy of my original input.
I then took the bvecs file provided in the tutorial data (and deleted the lines >33). This again resulted in zeros (see bvecs_tutorial_out).
I then created a file with only ones and zeros (see bvecs_onezero_western):
33 lines of 0 0 0 1 0 0 ....
This resulted in correct bvecs after ecc (see bvecs_onezero_western_out).
- I then appended .000 (see bvecs_onezero3dec_western)
0.000 0.000 0.000 1.000 0.000 0.000 ...
this resulted in the exact same bvecs after ecc (with integers - see bvecs_onezero3dec_western_out).
- I then wrote 1.100 (instead of 1.000; see bvecs_onezero3decpoint1_western). This again led to the same output (see bvecs_bvecs_onezero3decpoint1_western_out).
So in conclusion, it seems as if the flip4fsl cannot read the digits after the decimal point. Can you reproduce this error? Might this be a problem with my german-language-settings computer (mac osx 10.6.4; although, since it is a swiss-german machine the system wide setting for decimal separator is the dot )?
Thank you, Franz
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.
does your flip4fsl convert this file correctly (with the numbers after the decimal point)?
Thank you, Franz
Am 06.07.2011 um 18:06 schrieb Anastasia Yendiki:
Yes!
On Wed, 6 Jul 2011, Franz Liem wrote:
Hi Anastasia, thank you. I created this file from scratch with osx' TextEdit and saved it as western european (Mac OS Roman). Are you able to read this?
Thanks, Franz
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.
I'd need the nifti file to run flip4fsl. Can you try it on your data?
On Wed, 6 Jul 2011, Franz Liem wrote:
does your flip4fsl convert this file correctly (with the numbers after the decimal point)?
Thank you, Franz
Am 06.07.2011 um 18:06 schrieb Anastasia Yendiki:
Yes!
On Wed, 6 Jul 2011, Franz Liem wrote:
Hi Anastasia, thank you. I created this file from scratch with osx' TextEdit and saved it as western european (Mac OS Roman). Are you able to read this?
Thanks, Franz
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.
If i flip4fsl my fake file the the numbers after the decimal point are missing in the output (bvecs_bvecs_onezero3decpoint1_western_out).
I have attached a fake bvecs fitting your tutorial data (70 lines). Would you be so kind, as to run this.
Thank you so much for your help, Franz
Am 06.07.2011 um 19:48 schrieb Anastasia Yendiki:
I'd need the nifti file to run flip4fsl. Can you try it on your data?
On Wed, 6 Jul 2011, Franz Liem wrote:
does your flip4fsl convert this file correctly (with the numbers after the decimal point)?
Thank you, Franz
Am 06.07.2011 um 18:06 schrieb Anastasia Yendiki:
Yes!
On Wed, 6 Jul 2011, Franz Liem wrote:
Hi Anastasia, thank you. I created this file from scratch with osx' TextEdit and saved it as western european (Mac OS Roman). Are you able to read this?
Thanks, Franz
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
I'm attaching what I get when I run it. Only the trailing zeros are missing.
On Wed, 6 Jul 2011, Franz Liem wrote:
If i flip4fsl my fake file the the numbers after the decimal point are missing in the output (bvecs_bvecs_onezero3decpoint1_western_out).
I have attached a fake bvecs fitting your tutorial data (70 lines). Would you be so kind, as to run this.
Thank you so much for your help, Franz
Hi again,
I found out that, if I change the flip4fsl line printf '%s ' `cat $inbvecs | awk -v sgn=$sign[$k]1 -v n=$k '{print sgn*$n}'` \ to printf '%s ' `cat $inbvecs | awk -v sgn=$sign[$k]1 -v n=$k '{print $n}'` \ (deleting the sgn*) the values in the out-bvecs are correct, i.e. the numbers after the decimal separator are there.
Could you please help me to figure out what this line does. In my case: sign = + + + (my image orientation is LAS) therefore sgn is +1 What is the difference in my case between '{print sgn*$n}'` and '{print $n}'` ?
Thank you very much, Franz
Am 06.07.2011 um 21:32 schrieb Anastasia Yendiki:
I'm attaching what I get when I run it. Only the trailing zeros are missing.
On Wed, 6 Jul 2011, Franz Liem wrote:
If i flip4fsl my fake file the the numbers after the decimal point are missing in the output (bvecs_bvecs_onezero3decpoint1_western_out).
I have attached a fake bvecs fitting your tutorial data (70 lines). Would you be so kind, as to run this.
Thank you so much for your help, Franz
<new1.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.
Dear Anastasia & all.
I fixed it.
The problem was my LOCALE setting which leads to different handling of decimal separators by awk (for further details see http://objectmix.com/awk/716715-awk-different-decimal-separator-different-li...).
My original setting was: % locale LANG="de_CH.UTF-8" LC_COLLATE="de_CH.UTF-8" LC_CTYPE="de_CH.UTF-8" LC_MESSAGES="de_CH.UTF-8" LC_MONETARY="de_CH.UTF-8" LC_NUMERIC="de_CH.UTF-8" LC_TIME="de_CH.UTF-8" LC_ALL=
Therefore awk used the comma as decimal separator.
In order to change this I added the following line to the .tcshrc file: setenv LC_ALL en_US
resulting in: % locale LANG="de_CH.UTF-8" LC_COLLATE="en_US" LC_CTYPE="en_US" LC_MESSAGES="en_US" LC_MONETARY="en_US" LC_NUMERIC="en_US" LC_TIME="en_US" LC_ALL="en_US"
Now the bvec rotation and correction works fine.
Is your setting en_US or another format (e.g. en_US.ISO8859-1, en_US.ISO8859-15, en_US.US-ASCII, en_US.UTF-8)?
Anastasia and Priti, thank you for your time.
Best, Franz
Am 06.07.2011 um 21:32 schrieb Anastasia Yendiki:
I'm attaching what I get when I run it. Only the trailing zeros are missing.
On Wed, 6 Jul 2011, Franz Liem wrote:
If i flip4fsl my fake file the the numbers after the decimal point are missing in the output (bvecs_bvecs_onezero3decpoint1_western_out).
I have attached a fake bvecs fitting your tutorial data (70 lines). Would you be so kind, as to run this.
Thank you so much for your help, Franz
<new1.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.
Great, good to know. My LANG is en_US.UTF-8, everything else is not set.
On Thu, 7 Jul 2011, Franz Liem wrote:
Dear Anastasia & all.
I fixed it.
The problem was my LOCALE setting which leads to different handling of decimal separators by awk (for further details see http://objectmix.com/awk/716715-awk-different-decimal-separator-different-li...).
My original setting was: % locale LANG="de_CH.UTF-8" LC_COLLATE="de_CH.UTF-8" LC_CTYPE="de_CH.UTF-8" LC_MESSAGES="de_CH.UTF-8" LC_MONETARY="de_CH.UTF-8" LC_NUMERIC="de_CH.UTF-8" LC_TIME="de_CH.UTF-8" LC_ALL=
Therefore awk used the comma as decimal separator.
In order to change this I added the following line to the .tcshrc file: setenv LC_ALL en_US
resulting in: % locale LANG="de_CH.UTF-8" LC_COLLATE="en_US" LC_CTYPE="en_US" LC_MESSAGES="en_US" LC_MONETARY="en_US" LC_NUMERIC="en_US" LC_TIME="en_US" LC_ALL="en_US"
Now the bvec rotation and correction works fine.
Is your setting en_US or another format (e.g. en_US.ISO8859-1, en_US.ISO8859-15, en_US.US-ASCII, en_US.UTF-8)?
Anastasia and Priti, thank you for your time.
Best, Franz
Am 06.07.2011 um 21:32 schrieb Anastasia Yendiki:
I'm attaching what I get when I run it. Only the trailing zeros are missing.
On Wed, 6 Jul 2011, Franz Liem wrote:
If i flip4fsl my fake file the the numbers after the decimal point are missing in the output (bvecs_bvecs_onezero3decpoint1_western_out).
I have attached a fake bvecs fitting your tutorial data (70 lines). Would you be so kind, as to run this.
Thank you so much for your help, Franz
<new1.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.
Hi Franz - Which of the files that you sent us are the original files (the bvalfile and bvecfile from your dmrirc)? I could not find any files that had 33 lines among your attachments so I'm not sure what your input files look like.
Thanks, a.y
On Tue, 5 Jul 2011, Franz Liem wrote:
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
and another question. Is it OK to run tracula with recons done with an earlier version (5.0.0)?
Thank you, Franz
Am 06.07.2011 um 00:05 schrieb Anastasia Yendiki:
Hi Franz - Which of the files that you sent us are the original files (the bvalfile and bvecfile from your dmrirc)? I could not find any files that had 33 lines among your attachments so I'm not sure what your input files look like.
Thanks, a.y
On Tue, 5 Jul 2011, Franz Liem wrote:
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
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.
Hi Franz - As long as you have a good aparc+aseg, the exact version of the recon should not matter.
a.y
On Wed, 6 Jul 2011, Franz Liem wrote:
and another question. Is it OK to run tracula with recons done with an earlier version (5.0.0)?
Thank you, Franz
Am 06.07.2011 um 00:05 schrieb Anastasia Yendiki:
Hi Franz - Which of the files that you sent us are the original files (the bvalfile and bvecfile from your dmrirc)? I could not find any files that had 33 lines among your attachments so I'm not sure what your input files look like.
Thanks, a.y
On Tue, 5 Jul 2011, Franz Liem wrote:
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
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@nmr.mgh.harvard.edu