Hi,
I have dicoms that I turn to nifti using dcm2nii (with the default settings plus anonymization option turned on [-a y]). The bvec files it generates by default are 3 rows by n columns (where n is b0 number + directions). I am under the impression tracula requires this to be converted to a n row by 3 column file. 1) is this correct, 2) is there a preferred way to perform this transformation on linux systems?
Thanks you,
-Sal
set x = `cat bvecs | awk '{if (NR==1) print}'` set y = `cat bvecs | awk '{if (NR==2) print}'` set z = `cat bvecs | awk '{if (NR==3) print}'`
@ k = 1 while ( $k <= `head -1 bvecs|wc -w` ) echo $x[$k] $y[$k] $z[$k] @ k = $k + 1 end
I'd make sure though dcm2nii doesn't L-R flip the gradient vectors, I think there was a thread recently that suggested it might.
On Wed, 7 Aug 2013, Salil Soman wrote:
Hi, I have dicoms that I turn to nifti using dcm2nii (with the default settings plus anonymization option turned on [-a y]). The bvec files it generates by default are 3 rows by n columns (where n is b0 number + directions). I am under the impression tracula requires this to be converted to a n row by 3 column file. 1) is this correct, 2) is there a preferred way to perform this transformation on linux systems?
Thanks you,
-Sal
Thank you for the email.
I saw a warning to check for flipping L-R from the dcm2nii site: http://www.mccauslandcenter.sc.edu/mricro/mricron/dcm2nii.html
Is the problem you mentioned vendor specific (I have all GE data). Is there a different tool you would recommend for generating the bvec files? I would prefer to run tracula right off the original dicom images but transferring them to the cluster and anonymizing them would be prohibitively difficult.
I could not find the freesurfer archive message you referred to. Any pointers would be greatly appreciated.
Best wishes,
Sal
On Wed, Aug 7, 2013 at 1:12 PM, Anastasia Yendiki < ayendiki@nmr.mgh.harvard.edu> wrote:
set x = `cat bvecs | awk '{if (NR==1) print}'` set y = `cat bvecs | awk '{if (NR==2) print}'` set z = `cat bvecs | awk '{if (NR==3) print}'`
@ k = 1 while ( $k <= `head -1 bvecs|wc -w` ) echo $x[$k] $y[$k] $z[$k] @ k = $k + 1 end
I'd make sure though dcm2nii doesn't L-R flip the gradient vectors, I think there was a thread recently that suggested it might.
On Wed, 7 Aug 2013, Salil Soman wrote:
Hi,
I have dicoms that I turn to nifti using dcm2nii (with the default settings plus anonymization option turned on [-a y]). The bvec files it generates by default are 3 rows by n columns (where n is b0 number + directions). I am under the impression tracula requires this to be converted to a n row by 3 column file. 1) is this correct, 2) is there a preferred way to perform this transformation on linux systems?
Thanks you,
-Sal
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/**compliancelinehttp://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 Sal - Right now you'd just have to try it on one data set and look at the eigenvectors of the tensor (display dmri/dtifit_V1.nii.gz as lines) to make sure they're pointing in the right way.
I'm hoping for the next freesurfer release to finally get mri_convert to read gradient vectors off the dicom header in a way that ends this gradient flipping madness once and for all. But for now you just have to check before you proceed, sorry!
a.y
On Wed, 7 Aug 2013, Salil Soman wrote:
Thank you for the email. I saw a warning to check for flipping L-R from the dcm2nii site: http://www.mccauslandcenter.sc.edu/mricro/mricron/dcm2nii.html
Is the problem you mentioned vendor specific (I have all GE data). Is there a different tool you would recommend for generating the bvec files? I would prefer to run tracula right off the original dicom images but transferring them to the cluster and anonymizing them would be prohibitively difficult.
I could not find the freesurfer archive message you referred to. Any pointers would be greatly appreciated.
Best wishes,
Sal
On Wed, Aug 7, 2013 at 1:12 PM, Anastasia Yendiki ayendiki@nmr.mgh.harvard.edu wrote:
set x = `cat bvecs | awk '{if (NR==1) print}'` set y = `cat bvecs | awk '{if (NR==2) print}'` set z = `cat bvecs | awk '{if (NR==3) print}'` @ k = 1 while ( $k <= `head -1 bvecs|wc -w` ) echo $x[$k] $y[$k] $z[$k] @ k = $k + 1 end I'd make sure though dcm2nii doesn't L-R flip the gradient vectors, I think there was a thread recently that suggested it might. On Wed, 7 Aug 2013, Salil Soman wrote: Hi, I have dicoms that I turn to nifti using dcm2nii (with the default settings plus anonymization option turned on [-a y]). The bvec files it generates by default are 3 rows by n columns (where n is b0 number + directions). I am under the impression tracula requires this to be converted to a n row by 3 column file. 1) is this correct, 2) is there a preferred way to perform this transformation on linux systems? Thanks you, -SalThe 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.
-- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System
Thank you for your response. Is there a best way to review the eigenvectors (tkmedit, freeview, other program?).
Thank you.
-S
Freeview can do this in principle, but the current version of freeview has a known bug with displaying eigenvectors as lines (see known issues in http://surfer.nmr.mgh.harvard.edu/fswiki/ReleaseNotes), so for now you can use fslview.
On Wed, 7 Aug 2013, Salil Soman wrote:
Thank you for your response. Is there a best way to review the eigenvectors (tkmedit, freeview, other program?). Thank you.
-S
Hi Anastasia,
Thank you for this code piece. Is there a way to modify it so that set y's sign gets flipped? (I have a dataset where its is acquired on GE (so the Y row gets flipped)?
Thank you!
-Sal
On Wed, Aug 7, 2013 at 1:12 PM, Anastasia Yendiki < ayendiki@nmr.mgh.harvard.edu> wrote:
set x = `cat bvecs | awk '{if (NR==1) print}'` set y = `cat bvecs | awk '{if (NR==2) print}'` set z = `cat bvecs | awk '{if (NR==3) print}'`
@ k = 1 while ( $k <= `head -1 bvecs|wc -w` ) echo $x[$k] $y[$k] $z[$k] @ k = $k + 1 end
I'd make sure though dcm2nii doesn't L-R flip the gradient vectors, I think there was a thread recently that suggested it might.
On Wed, 7 Aug 2013, Salil Soman wrote:
Hi,
I have dicoms that I turn to nifti using dcm2nii (with the default settings plus anonymization option turned on [-a y]). The bvec files it generates by default are 3 rows by n columns (where n is b0 number + directions). I am under the impression tracula requires this to be converted to a n row by 3 column file. 1) is this correct, 2) is there a preferred way to perform this transformation on linux systems?
Thanks you,
-Sal
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/**compliancelinehttp://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.
Once the file is in 3-column format:
cat yourfilename | awk '{print $1 -$2 $3}'
On Thu, 31 Oct 2013, Salil Soman wrote:
Hi Anastasia, Thank you for this code piece. Is there a way to modify it so that set y's sign gets flipped? (I have a dataset where its is acquired on GE (so the Y row gets flipped)?
Thank you!
-Sal
On Wed, Aug 7, 2013 at 1:12 PM, Anastasia Yendiki ayendiki@nmr.mgh.harvard.edu wrote:
set x = `cat bvecs | awk '{if (NR==1) print}'` set y = `cat bvecs | awk '{if (NR==2) print}'` set z = `cat bvecs | awk '{if (NR==3) print}'` @ k = 1 while ( $k <= `head -1 bvecs|wc -w` ) echo $x[$k] $y[$k] $z[$k] @ k = $k + 1 end I'd make sure though dcm2nii doesn't L-R flip the gradient vectors, I think there was a thread recently that suggested it might. On Wed, 7 Aug 2013, Salil Soman wrote: Hi, I have dicoms that I turn to nifti using dcm2nii (with the default settings plus anonymization option turned on [-a y]). The bvec files it generates by default are 3 rows by n columns (where n is b0 number + directions). I am under the impression tracula requires this to be converted to a n row by 3 column file. 1) is this correct, 2) is there a preferred way to perform this transformation on linux systems? Thanks you, -SalThe 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.
-- Salil Soman, MD, MS Postdoctoral Research Fellow - Stanford Radiological Sciences Laboratory Fellow - Palo Alto War Related Illness and Injury Study Center WOC Neuroradiology Attending - Veterans Affairs Palo Alto Health Care System
Dear Matt and freesurfers,
I am encounting this old problem, that is, using fsl_sub to launch FreeSurfer jobs in SGE and get this error message: (standard_in) 2: Error: comparison in expression and freesurfer stoped. But running freesurfer without fsl_sub is OK (using fsl_sub to launch other commonds also fine).
Following Matt's message on this problem https://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/2012-May/023961.html, I added a line "POSIXLY_CORRECT=0 " in fsl_sub under the line "set -- `getopt T:q:a:p:M:j:t:z:N:Fvm:l:s: $*`" which now looks like this ... set -- `getopt T:q:a:p:M:j:t:z:N:Fvm:l:s: $*` POSIXLY_CORRECT=0 ...
However, the error was still the same, and what's even worse is that seems the job was launched twice.
So can Matt or anybody tell me why? Am I misunderstood Matt's message? or mybe version differences since Matt's solution came out one year ago? I am using freesurfer-Linux-centos4_x86_64-stable-pub-v5.2.0, FMRIB Software Library, Release 5.0 (c) 2012
there are two fsLsub ./src/sgeutils/fsl_sub ./bin/fsl_sub which one should I edit or both?
Any help is appreciated, Thank you all!
2013-11-01
Chunhui Chen _________________
State Key Laboratory of Cognitive Neuroscience and Learning Beijing Normal University Beijing, China 100875
I think the latest version of FSL has this sorted out (it doesn't change your machine's POSIXLY_CORRECT setting except briefly in the middle of fsl_sub).
Peace,
Matt.
From: chenchunhuichina chenchunhuichina@gmail.com Date: Friday, November 1, 2013 2:55 AM To: Matt Glasser matt@ma-tea.com Cc: free surfer freesurfer@nmr.mgh.harvard.edu Subject: ERROR: comparison in expression (FS with SGE)
Dear Matt and freesurfers,
I am encounting this old problem, that is, using fsl_sub to launch FreeSurfer jobs in SGE and get this error message: (standard_in) 2: Error: comparison in expression and freesurfer stoped. But running freesurfer without fsl_sub is OK (using fsl_sub to launch other commonds also fine).
Following Matt's message on this problem https://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/2012-May/023961.html, I added a line "POSIXLY_CORRECT=0 " in fsl_sub under the line "set -- `getopt T:q:a:p:M:j:t:z:N:Fvm:l:s: $*`" which now looks like this ... set -- `getopt T:q:a:p:M:j:t:z:N:Fvm:l:s: $*` POSIXLY_CORRECT=0 ...
However, the error was still the same, and what's even worse is that seems the job was launched twice.
So can Matt or anybody tell me why? Am I misunderstood Matt's message? or mybe version differences since Matt's solution came out one year ago? I am using freesurfer-Linux-centos4_x86_64-stable-pub-v5.2.0, FMRIB Software Library, Release 5.0 (c) 2012
there are two fsLsub ./src/sgeutils/fsl_sub ./bin/fsl_sub which one should I edit or both?
Any help is appreciated, Thank you all!
2013-11-01
Chunhui Chen _________________
State Key Laboratory of Cognitive Neuroscience and Learning Beijing Normal University Beijing, China 100875
freesurfer@nmr.mgh.harvard.edu