When you apply a rotation to the DWIs (as eddy_correct does), you need to apply the same rotation to the corresponding gradient vectors. See for example: Leemans, A., Jones, D. K., Jun 2009. The B-matrix must be rotated when correcting for subject motion in DTI data. Magn Reson Med 61 (6), 1336–49.
If you don't want to pass the dicoms to trac-all directly, you can use mri_convert to convert from dicom to nifti.
On Fri, 9 Aug 2013, Soto, David wrote:
hi - am afraid not because I am feeding to trac-all already eddycorrected images then in the config file I have
# Perform registration-based eddy-current compensation? # Default: 1 (yes) set doeddy = 0 # Rotate diffusion gradient vectors to match eddy-current compensation? # Only used if doeddy = 1 # Default: 1 (yes)
is this critical??
unfortunately, this is the only way I manage to get it to work as said my diffusion outputs from mriconverter are not read by FS, only through mediation of some FSL operation on the files, then FS likes those.
I could start from scratch using dicoms but would prefer not to as the data is already well organised
cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/
From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 09 August 2013 22:44 To: Soto, David Subject: Re: [Freesurfer] trac-all inquiry
Are you rotating the gradient vectors accordingly? This is done in trac-all after running eddy_correct.
On Fri, 9 Aug 2013, Soto, David wrote:
Hi Anastasia, stuff is running smoothly at last one quick question, is there any 'disadvantage' in using FSL to do the eddy correct and then feed those images to trace-all ? cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/
On 9 Aug 2013, at 15:33, David Soto dsoto@imperial.ac.uk wrote:
hi, for some reason FS does not like the nii file from Mriconverter, ( I saw a post about this http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg19526.html ) but does like the nii.gz outputs from FSL... I'll try to debug the bepostx error thanks! ds http://www1.imperial.ac.uk/medicine/people/d.soto/On 09/08/13 14:26, Anastasia Yendiki wrote:
There is no reason to conevrt to .mnc. You should use your original .nii, if that shows up correctly in freeview. As for the bedpostx error, this is an Ubuntu issue that has come to my attention very recently. In Ubuntu /bin/sh is not a bash shell any more. To get around this, you'll have to edit the first line of the scripts $FREESURFER_HOME/bin/bedpostx_mgh and $FREESURFER_HOME/bin/fsl_sub_mgh. You'll have to replace "/bin/sh" with "/bin/bash" on the first line of those two scripts. On Fri, 9 Aug 2013, David Soto wrote: hi- I tried to convert from nii to mnc becos that is what i did when I did recon-all but I also tried with nii at the beggining and got the same issues. In fact in my last post (pasted below again)the input was a nii file could you please check the stuff below? thanks! ds Hi, further to my prior email I made some progress. I noted that nii2mnc does not seem to work on the diffusion output.nii that I got from Mriconverter as the output.mnc brain has parts chopped in Freeview. (I think there may be something funny about this, as the recon-all does like the T1 output form Mriconverter) HENCE I tried use the output of eddycorrect from FSL (which I already run for other thing) Then I created a new folder where i placed the output of FSL eddycorrect and in the configuration file I did (i) set dcmlist = (fsleddycorrectoutput.nii.gz) (ii) turned 'set doeddy = 0' then run it trac-all -c traculatest.txt -prep -log trac_from_fsleddy it seemed to complete without errors (log attached)n and I checked the preprocessing outputs in Freeview (FA, masks and aparc+asegs) and all seemed fine. However when I attempt the next stage in trac-all i.e. trac-all -c traculatest.txt -bedp -log trac_from_fsleddy_bedp it fails saying the following /usr/local/freesurfer/bin/bedpostx_mgh: 131: /usr/local/freesurfer/bin/bedpostx_mgh: Syntax error: "(" unexpected the log is also attached. any advise appreciated! cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/ http://www1.imperial.ac.uk/medicine/people/d.soto/ On 09/08/13 14:02, Anastasia Yendiki wrote: Why are you converting from .nii to .mnc? Why are you not using the .nii directly? On Fri, 9 Aug 2013, David Soto wrote: hi - thanks for the feedback weirdly, the nii2mnc transform of the diffusion data falters, I get a part of the brain chopped have no idea why this is the case, as it worked fine before for the T1 for recon-all...I am using Ubuntu 12.04 anyway am trying to sort this out now, if you have any advise that would much appreciated!! cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/ On 08/08/13 17:03, Anastasia Yendiki wrote: Hi David - The fact that it's taking so many tries to initialize the left ILF tells me that something has gone wrong with the data, either with the T1 to DWI registration, or with the mask, or something like that. Have you looked at any of the output files of the pre-processing? The FA map, the aparc+aseg, etc? a.y On Wed, 7 Aug 2013, Soto, David wrote: Hi Anastasia, I checked the becs and bvals files, there was a bug in the transposition of the columns into 3 rows in the bvecs. But i still have problems.. I rerun trac-all -prep and seemed fine but ended with a Segmentation fault (core dumped) which however is not present in the last line of the trac-all.log (Attached). Writing output files to/home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dlabel/mni/lh.ilf_AS_avg33_mn i_bbr_* Writing spline volume to/home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dlabel/mni/lh.ilf_AS_avg33_mn i_bbr_cpts_5.nii.gz Segmentation fault (core dumped) Just in case I tried trac-all -bedp complains like these below, any advise appreciated, cheers - ds /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/diffree/tracula02ST.txt -bedp INFO: SUBJECTS_DIR is /home/dsoto/Documents/fmri/rsdtianawmgui INFO: Diffusion root is /home/dsoto/Documents/fmri/rsdtianawmgui Actual FREESURFER_HOME /usr/local/freesurfer WARN: Running FSL's bedbost locally - this might take a while WARN: It is recommended to run this step on a cluster bedpostx_mgh -n 2 /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri /usr/local/freesurfer/bin/bedpostx_mgh: 131: /usr/local/freesurfer/bin/bedpostx_mgh: Syntax error: "(" unexpected http://www1.imperial.ac.uk/medicine/people/d.soto/ ________________________________________ From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 07 August 2013 17:22 To: Soto, David Cc: freesurfer@nmr.mgh.harvard.edu Subject: RE: [Freesurfer] trac-all inquiry Hi David - Every time you run trac-all, the results get appended to this file, so you need to look for error messages only in the more recent invocation of trac-all. The first error there seems to be: Error: bvecs and bvals don't have the same number of entries Do you have the same number of b-values and gradient vectors and volumes in your DWI series? a.y On Tue, 6 Aug 2013, Soto, David wrote: hi I upgraded to FS 5.3 but still encountering issues with trac-all prep. The log is attached, things I noted after inspecting it 1) INFO: FreeSurfer build stamps do not match Subject Stamp: freesurfer-Linux-centos4_x86_64-stable-pub-v5.1.0 Current Stamp: freesurfer-Linux-centos4_x86_64-stable-pub-v5.3.0 2) Error: input image /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri/lowb not valid 3) Image Exception : #22 :: ERROR: Could not open image /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri/lowb_brain 4) Image Exception : #22 :: ERROR: Could not open image /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dlabel/diff/White-Matter++. 5) ERROR: Could not read /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri/dtifit_FA.nii.gz but despite all this it says: trac-preproc finished without error at Tue Aug 6 21:27:30 BST 2013 thanks for your help cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/ ________________________________________ From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 06 August 2013 19:30 To: Soto, David Cc: freesurfer@nmr.mgh.harvard.edu Subject: RE: [Freesurfer] trac-all inquiry I see, you're using the old version of tracula (from freesurfer 5.1). In that version, you had to define the number of low-b images in the configuration file. I strongly recommend updating to freesurfer 5.3. A lot of things have improved in tracula since then. Also, in the future please attach any log files as separate attachments instead of pasting them into the body of your email - this causes the body of the email to exceed the limit allowable on the list. Thanks, a.y 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 see - as said the diffusion output.nii from MRIConverter http://lcni.uoregon.edu/~jolinda/MRIConvert/ [to not confound it with mri_converter) is not read by Freeview and mri_converter does not like it either --------------------------------------------------------------------------------------- MD00071523-2:RSDTI_WMGUI/ACH_AMO/diff] dsoto% mri_convert output.nii data.mgz mri_convert output.nii data.mgz $Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $ reading from output.nii... nifti1Read(): unsupported slice timing pattern 5 in /Users/dsoto/Documents/fMRI/RSDTI_WMGUI/ACH_AMO/diff/output.nii No such file or directory ---------------------------------------------------------------------------------------
NOW, I find that if I use FSL and run bet with a fractional intensity threshold of 0, I get an output file which is read by Freeview- which should allow me to proceed with all the necessary preprocessing steps in trac-all
would this be fine? I dont think the bet I run will affect the image
cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/
________________________________________ From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 09 August 2013 23:15 To: Soto, David Cc: freesurfer@nmr.mgh.harvard.edu Subject: RE: [Freesurfer] trac-all inquiry
When you apply a rotation to the DWIs (as eddy_correct does), you need to apply the same rotation to the corresponding gradient vectors. See for example: Leemans, A., Jones, D. K., Jun 2009. The B-matrix must be rotated when correcting for subject motion in DTI data. Magn Reson Med 61 (6), 1336–49.
If you don't want to pass the dicoms to trac-all directly, you can use mri_convert to convert from dicom to nifti.
On Fri, 9 Aug 2013, Soto, David wrote:
hi - am afraid not because I am feeding to trac-all already eddycorrected images then in the config file I have
# Perform registration-based eddy-current compensation? # Default: 1 (yes) set doeddy = 0 # Rotate diffusion gradient vectors to match eddy-current compensation? # Only used if doeddy = 1 # Default: 1 (yes)
is this critical??
unfortunately, this is the only way I manage to get it to work as said my diffusion outputs from mriconverter are not read by FS, only through mediation of some FSL operation on the files, then FS likes those.
I could start from scratch using dicoms but would prefer not to as the data is already well organised
cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/
From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 09 August 2013 22:44 To: Soto, David Subject: Re: [Freesurfer] trac-all inquiry
Are you rotating the gradient vectors accordingly? This is done in trac-all after running eddy_correct.
On Fri, 9 Aug 2013, Soto, David wrote:
Hi Anastasia, stuff is running smoothly at last one quick question, is there any 'disadvantage' in using FSL to do the eddy correct and then feed those images to trace-all ? cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/
On 9 Aug 2013, at 15:33, David Soto dsoto@imperial.ac.uk wrote:
hi, for some reason FS does not like the nii file from Mriconverter, ( I saw a post about this http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg19526.html ) but does like the nii.gz outputs from FSL... I'll try to debug the bepostx error thanks! ds http://www1.imperial.ac.uk/medicine/people/d.soto/On 09/08/13 14:26, Anastasia Yendiki wrote:
There is no reason to conevrt to .mnc. You should use your original .nii, if that shows up correctly in freeview. As for the bedpostx error, this is an Ubuntu issue that has come to my attention very recently. In Ubuntu /bin/sh is not a bash shell any more. To get around this, you'll have to edit the first line of the scripts $FREESURFER_HOME/bin/bedpostx_mgh and $FREESURFER_HOME/bin/fsl_sub_mgh. You'll have to replace "/bin/sh" with "/bin/bash" on the first line of those two scripts. On Fri, 9 Aug 2013, David Soto wrote: hi- I tried to convert from nii to mnc becos that is what i did when I did recon-all but I also tried with nii at the beggining and got the same issues. In fact in my last post (pasted below again)the input was a nii file could you please check the stuff below? thanks! ds Hi, further to my prior email I made some progress. I noted that nii2mnc does not seem to work on the diffusion output.nii that I got from Mriconverter as the output.mnc brain has parts chopped in Freeview. (I think there may be something funny about this, as the recon-all does like the T1 output form Mriconverter) HENCE I tried use the output of eddycorrect from FSL (which I already run for other thing) Then I created a new folder where i placed the output of FSL eddycorrect and in the configuration file I did (i) set dcmlist = (fsleddycorrectoutput.nii.gz) (ii) turned 'set doeddy = 0' then run it trac-all -c traculatest.txt -prep -log trac_from_fsleddy it seemed to complete without errors (log attached)n and I checked the preprocessing outputs in Freeview (FA, masks and aparc+asegs) and all seemed fine. However when I attempt the next stage in trac-all i.e. trac-all -c traculatest.txt -bedp -log trac_from_fsleddy_bedp it fails saying the following /usr/local/freesurfer/bin/bedpostx_mgh: 131: /usr/local/freesurfer/bin/bedpostx_mgh: Syntax error: "(" unexpected the log is also attached. any advise appreciated! cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/ http://www1.imperial.ac.uk/medicine/people/d.soto/ On 09/08/13 14:02, Anastasia Yendiki wrote: Why are you converting from .nii to .mnc? Why are you not using the .nii directly? On Fri, 9 Aug 2013, David Soto wrote: hi - thanks for the feedback weirdly, the nii2mnc transform of the diffusion data falters, I get a part of the brain chopped have no idea why this is the case, as it worked fine before for the T1 for recon-all...I am using Ubuntu 12.04 anyway am trying to sort this out now, if you have any advise that would much appreciated!! cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/ On 08/08/13 17:03, Anastasia Yendiki wrote: Hi David - The fact that it's taking so many tries to initialize the left ILF tells me that something has gone wrong with the data, either with the T1 to DWI registration, or with the mask, or something like that. Have you looked at any of the output files of the pre-processing? The FA map, the aparc+aseg, etc? a.y On Wed, 7 Aug 2013, Soto, David wrote: Hi Anastasia, I checked the becs and bvals files, there was a bug in the transposition of the columns into 3 rows in the bvecs. But i still have problems.. I rerun trac-all -prep and seemed fine but ended with a Segmentation fault (core dumped) which however is not present in the last line of the trac-all.log (Attached). Writing output files to/home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dlabel/mni/lh.ilf_AS_avg33_mn i_bbr_* Writing spline volume to/home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dlabel/mni/lh.ilf_AS_avg33_mn i_bbr_cpts_5.nii.gz Segmentation fault (core dumped) Just in case I tried trac-all -bedp complains like these below, any advise appreciated, cheers - ds /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/diffree/tracula02ST.txt -bedp INFO: SUBJECTS_DIR is /home/dsoto/Documents/fmri/rsdtianawmgui INFO: Diffusion root is /home/dsoto/Documents/fmri/rsdtianawmgui Actual FREESURFER_HOME /usr/local/freesurfer WARN: Running FSL's bedbost locally - this might take a while WARN: It is recommended to run this step on a cluster bedpostx_mgh -n 2 /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri /usr/local/freesurfer/bin/bedpostx_mgh: 131: /usr/local/freesurfer/bin/bedpostx_mgh: Syntax error: "(" unexpected http://www1.imperial.ac.uk/medicine/people/d.soto/ ________________________________________ From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 07 August 2013 17:22 To: Soto, David Cc: freesurfer@nmr.mgh.harvard.edu Subject: RE: [Freesurfer] trac-all inquiry Hi David - Every time you run trac-all, the results get appended to this file, so you need to look for error messages only in the more recent invocation of trac-all. The first error there seems to be: Error: bvecs and bvals don't have the same number of entries Do you have the same number of b-values and gradient vectors and volumes in your DWI series? a.y On Tue, 6 Aug 2013, Soto, David wrote: hi I upgraded to FS 5.3 but still encountering issues with trac-all prep. The log is attached, things I noted after inspecting it 1) INFO: FreeSurfer build stamps do not match Subject Stamp: freesurfer-Linux-centos4_x86_64-stable-pub-v5.1.0 Current Stamp: freesurfer-Linux-centos4_x86_64-stable-pub-v5.3.0 2) Error: input image /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri/lowb not valid 3) Image Exception : #22 :: ERROR: Could not open image /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri/lowb_brain 4) Image Exception : #22 :: ERROR: Could not open image /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dlabel/diff/White-Matter++. 5) ERROR: Could not read /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri/dtifit_FA.nii.gz but despite all this it says: trac-preproc finished without error at Tue Aug 6 21:27:30 BST 2013 thanks for your help cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/ ________________________________________ From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 06 August 2013 19:30 To: Soto, David Cc: freesurfer@nmr.mgh.harvard.edu Subject: RE: [Freesurfer] trac-all inquiry I see, you're using the old version of tracula (from freesurfer 5.1). In that version, you had to define the number of low-b images in the configuration file. I strongly recommend updating to freesurfer 5.3. A lot of things have improved in tracula since then. Also, in the future please attach any log files as separate attachments instead of pasting them into the body of your email - this causes the body of the email to exceed the limit allowable on the list. Thanks, a.y 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 didn't mean run mri_convert on the nifti output of another program. I meant run mri_convert directly on the original dicom to convert it to nifti: mri_convert yourimage.dcm yourimage.nii.gz
On Fri, 9 Aug 2013, Soto, David wrote:
I see - as said the diffusion output.nii from MRIConverter http://lcni.uoregon.edu/~jolinda/MRIConvert/ [to not confound it with mri_converter) is not read by Freeview and mri_converter does not like it either
MD00071523-2:RSDTI_WMGUI/ACH_AMO/diff] dsoto% mri_convert output.nii data.mgz mri_convert output.nii data.mgz $Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $ reading from output.nii... nifti1Read(): unsupported slice timing pattern 5 in /Users/dsoto/Documents/fMRI/RSDTI_WMGUI/ACH_AMO/diff/output.nii No such file or directory
NOW, I find that if I use FSL and run bet with a fractional intensity threshold of 0, I get an output file which is read by Freeview- which should allow me to proceed with all the necessary preprocessing steps in trac-all
would this be fine? I dont think the bet I run will affect the image
cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/
From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 09 August 2013 23:15 To: Soto, David Cc: freesurfer@nmr.mgh.harvard.edu Subject: RE: [Freesurfer] trac-all inquiry
When you apply a rotation to the DWIs (as eddy_correct does), you need to apply the same rotation to the corresponding gradient vectors. See for example: Leemans, A., Jones, D. K., Jun 2009. The B-matrix must be rotated when correcting for subject motion in DTI data. Magn Reson Med 61 (6), 1336–49.
If you don't want to pass the dicoms to trac-all directly, you can use mri_convert to convert from dicom to nifti.
On Fri, 9 Aug 2013, Soto, David wrote:
hi - am afraid not because I am feeding to trac-all already eddycorrected images then in the config file I have
# Perform registration-based eddy-current compensation? # Default: 1 (yes) set doeddy = 0 # Rotate diffusion gradient vectors to match eddy-current compensation? # Only used if doeddy = 1 # Default: 1 (yes)
is this critical??
unfortunately, this is the only way I manage to get it to work as said my diffusion outputs from mriconverter are not read by FS, only through mediation of some FSL operation on the files, then FS likes those.
I could start from scratch using dicoms but would prefer not to as the data is already well organised
cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/
From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 09 August 2013 22:44 To: Soto, David Subject: Re: [Freesurfer] trac-all inquiry
Are you rotating the gradient vectors accordingly? This is done in trac-all after running eddy_correct.
On Fri, 9 Aug 2013, Soto, David wrote:
Hi Anastasia, stuff is running smoothly at last one quick question, is there any 'disadvantage' in using FSL to do the eddy correct and then feed those images to trace-all ? cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/
On 9 Aug 2013, at 15:33, David Soto dsoto@imperial.ac.uk wrote:
hi, for some reason FS does not like the nii file from Mriconverter, ( I saw a post about this http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg19526.html ) but does like the nii.gz outputs from FSL... I'll try to debug the bepostx error thanks! ds http://www1.imperial.ac.uk/medicine/people/d.soto/On 09/08/13 14:26, Anastasia Yendiki wrote:
There is no reason to conevrt to .mnc. You should use your original .nii, if that shows up correctly in freeview. As for the bedpostx error, this is an Ubuntu issue that has come to my attention very recently. In Ubuntu /bin/sh is not a bash shell any more. To get around this, you'll have to edit the first line of the scripts $FREESURFER_HOME/bin/bedpostx_mgh and $FREESURFER_HOME/bin/fsl_sub_mgh. You'll have to replace "/bin/sh" with "/bin/bash" on the first line of those two scripts. On Fri, 9 Aug 2013, David Soto wrote: hi- I tried to convert from nii to mnc becos that is what i did when I did recon-all but I also tried with nii at the beggining and got the same issues. In fact in my last post (pasted below again)the input was a nii file could you please check the stuff below? thanks! ds Hi, further to my prior email I made some progress. I noted that nii2mnc does not seem to work on the diffusion output.nii that I got from Mriconverter as the output.mnc brain has parts chopped in Freeview. (I think there may be something funny about this, as the recon-all does like the T1 output form Mriconverter) HENCE I tried use the output of eddycorrect from FSL (which I already run for other thing) Then I created a new folder where i placed the output of FSL eddycorrect and in the configuration file I did (i) set dcmlist = (fsleddycorrectoutput.nii.gz) (ii) turned 'set doeddy = 0' then run it trac-all -c traculatest.txt -prep -log trac_from_fsleddy it seemed to complete without errors (log attached)n and I checked the preprocessing outputs in Freeview (FA, masks and aparc+asegs) and all seemed fine. However when I attempt the next stage in trac-all i.e. trac-all -c traculatest.txt -bedp -log trac_from_fsleddy_bedp it fails saying the following /usr/local/freesurfer/bin/bedpostx_mgh: 131: /usr/local/freesurfer/bin/bedpostx_mgh: Syntax error: "(" unexpected the log is also attached. any advise appreciated! cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/ http://www1.imperial.ac.uk/medicine/people/d.soto/ On 09/08/13 14:02, Anastasia Yendiki wrote: Why are you converting from .nii to .mnc? Why are you not using the .nii directly? On Fri, 9 Aug 2013, David Soto wrote: hi - thanks for the feedback weirdly, the nii2mnc transform of the diffusion data falters, I get a part of the brain chopped have no idea why this is the case, as it worked fine before for the T1 for recon-all...I am using Ubuntu 12.04 anyway am trying to sort this out now, if you have any advise that would much appreciated!! cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/ On 08/08/13 17:03, Anastasia Yendiki wrote: Hi David - The fact that it's taking so many tries to initialize the left ILF tells me that something has gone wrong with the data, either with the T1 to DWI registration, or with the mask, or something like that. Have you looked at any of the output files of the pre-processing? The FA map, the aparc+aseg, etc? a.y On Wed, 7 Aug 2013, Soto, David wrote: Hi Anastasia, I checked the becs and bvals files, there was a bug in the transposition of the columns into 3 rows in the bvecs. But i still have problems.. I rerun trac-all -prep and seemed fine but ended with a Segmentation fault (core dumped) which however is not present in the last line of the trac-all.log (Attached). Writing output files to/home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dlabel/mni/lh.ilf_AS_avg33_mn i_bbr_* Writing spline volume to/home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dlabel/mni/lh.ilf_AS_avg33_mn i_bbr_cpts_5.nii.gz Segmentation fault (core dumped) Just in case I tried trac-all -bedp complains like these below, any advise appreciated, cheers - ds /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/diffree/tracula02ST.txt -bedp INFO: SUBJECTS_DIR is /home/dsoto/Documents/fmri/rsdtianawmgui INFO: Diffusion root is /home/dsoto/Documents/fmri/rsdtianawmgui Actual FREESURFER_HOME /usr/local/freesurfer WARN: Running FSL's bedbost locally - this might take a while WARN: It is recommended to run this step on a cluster bedpostx_mgh -n 2 /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri /usr/local/freesurfer/bin/bedpostx_mgh: 131: /usr/local/freesurfer/bin/bedpostx_mgh: Syntax error: "(" unexpected http://www1.imperial.ac.uk/medicine/people/d.soto/ ________________________________________ From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 07 August 2013 17:22 To: Soto, David Cc: freesurfer@nmr.mgh.harvard.edu Subject: RE: [Freesurfer] trac-all inquiry Hi David - Every time you run trac-all, the results get appended to this file, so you need to look for error messages only in the more recent invocation of trac-all. The first error there seems to be: Error: bvecs and bvals don't have the same number of entries Do you have the same number of b-values and gradient vectors and volumes in your DWI series? a.y On Tue, 6 Aug 2013, Soto, David wrote: hi I upgraded to FS 5.3 but still encountering issues with trac-all prep. The log is attached, things I noted after inspecting it 1) INFO: FreeSurfer build stamps do not match Subject Stamp: freesurfer-Linux-centos4_x86_64-stable-pub-v5.1.0 Current Stamp: freesurfer-Linux-centos4_x86_64-stable-pub-v5.3.0 2) Error: input image /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri/lowb not valid 3) Image Exception : #22 :: ERROR: Could not open image /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri/lowb_brain 4) Image Exception : #22 :: ERROR: Could not open image /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dlabel/diff/White-Matter++. 5) ERROR: Could not read /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri/dtifit_FA.nii.gz but despite all this it says: trac-preproc finished without error at Tue Aug 6 21:27:30 BST 2013 thanks for your help cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/ ________________________________________ From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 06 August 2013 19:30 To: Soto, David Cc: freesurfer@nmr.mgh.harvard.edu Subject: RE: [Freesurfer] trac-all inquiry I see, you're using the old version of tracula (from freesurfer 5.1). In that version, you had to define the number of low-b images in the configuration file. I strongly recommend updating to freesurfer 5.3. A lot of things have improved in tracula since then. Also, in the future please attach any log files as separate attachments instead of pasting them into the body of your email - this causes the body of the email to exceed the limit allowable on the list. Thanks, a.y 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.
Thanks Anastasia, understood - the issue is that would be very time consuming at this stage for several reasons.. I found the issue with MRIConverter can be solved just by doing fslmaths on the diffusion output image fslmaths output data This should not change the diffusion image yet is fine for processing in FS cheers d.s. http://www1.imperial.ac.uk/medicine/people/d.soto/
On 10 Aug 2013, at 00:43, Anastasia Yendiki <ayendiki@nmr.mgh.harvard.edumailto:ayendiki@nmr.mgh.harvard.edu> wrote:
I didn't mean run mri_convert on the nifti output of another program. I meant run mri_convert directly on the original dicom to convert it to nifti: mri_convert yourimage.dcm yourimage.nii.gz
On Fri, 9 Aug 2013, Soto, David wrote:
I see - as said the diffusion output.nii from MRIConverter http://lcni.uoregon.edu/~jolinda/MRIConvert/ [to not confound it with mri_converter) is not read by Freeview and mri_converter does not like it either --------------------------------------------------------------------------------------- MD00071523-2:RSDTI_WMGUI/ACH_AMO/diff] dsoto% mri_convert output.nii data.mgz mri_convert output.nii data.mgz $Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $ reading from output.nii... nifti1Read(): unsupported slice timing pattern 5 in /Users/dsoto/Documents/fMRI/RSDTI_WMGUI/ACH_AMO/diff/output.nii No such file or directory ---------------------------------------------------------------------------------------
NOW, I find that if I use FSL and run bet with a fractional intensity threshold of 0, I get an output file which is read by Freeview- which should allow me to proceed with all the necessary preprocessing steps in trac-all
would this be fine? I dont think the bet I run will affect the image
cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/
________________________________________ From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 09 August 2013 23:15 To: Soto, David Cc: freesurfer@nmr.mgh.harvard.edu Subject: RE: [Freesurfer] trac-all inquiry
When you apply a rotation to the DWIs (as eddy_correct does), you need to apply the same rotation to the corresponding gradient vectors. See for example: Leemans, A., Jones, D. K., Jun 2009. The B-matrix must be rotated when correcting for subject motion in DTI data. Magn Reson Med 61 (6), 1336–49.
If you don't want to pass the dicoms to trac-all directly, you can use mri_convert to convert from dicom to nifti.
On Fri, 9 Aug 2013, Soto, David wrote:
hi - am afraid not because I am feeding to trac-all already eddycorrected images then in the config file I have
# Perform registration-based eddy-current compensation? # Default: 1 (yes) set doeddy = 0 # Rotate diffusion gradient vectors to match eddy-current compensation? # Only used if doeddy = 1 # Default: 1 (yes)
is this critical??
unfortunately, this is the only way I manage to get it to work as said my diffusion outputs from mriconverter are not read by FS, only through mediation of some FSL operation on the files, then FS likes those.
I could start from scratch using dicoms but would prefer not to as the data is already well organised
cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/
________________________________________ From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 09 August 2013 22:44 To: Soto, David Subject: Re: [Freesurfer] trac-all inquiry
Are you rotating the gradient vectors accordingly? This is done in trac-all after running eddy_correct.
On Fri, 9 Aug 2013, Soto, David wrote:
Hi Anastasia, stuff is running smoothly at last one quick question, is there any 'disadvantage' in using FSL to do the eddy correct and then feed those images to trace-all ? cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/
On 9 Aug 2013, at 15:33, David Soto dsoto@imperial.ac.uk wrote:
hi, for some reason FS does not like the nii file from Mriconverter, ( I saw a post about this http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg19526.html ) but does like the nii.gz outputs from FSL...
I'll try to debug the bepostx error
thanks!
ds
http://www1.imperial.ac.uk/medicine/people/d.soto/ On 09/08/13 14:26, Anastasia Yendiki wrote:
There is no reason to conevrt to .mnc. You should use your original .nii, if that shows up correctly in freeview.
As for the bedpostx error, this is an Ubuntu issue that has come to my attention very recently. In Ubuntu /bin/sh is not a bash shell any more. To get around this, you'll have to edit the first line of the scripts $FREESURFER_HOME/bin/bedpostx_mgh and $FREESURFER_HOME/bin/fsl_sub_mgh. You'll have to replace "/bin/sh" with "/bin/bash" on the first line of those two scripts.
On Fri, 9 Aug 2013, David Soto wrote:
hi- I tried to convert from nii to mnc becos that is what i did when I did recon-all
but I also tried with nii at the beggining and got the same issues. In fact in my last post (pasted below again)the input was a nii file could you please check the stuff below? thanks! ds
Hi, further to my prior email I made some progress. I noted that nii2mnc does not seem to work on the diffusion output.nii that I got from Mriconverter as the output.mnc brain has parts chopped in Freeview.
(I think there may be something funny about this, as the recon-all does like the T1 output form Mriconverter)
HENCE I tried use the output of eddycorrect from FSL (which I already run for other thing) Then I created a new folder where i placed the output of FSL eddycorrect and in the configuration file I did (i) set dcmlist = (fsleddycorrectoutput.nii.gz) (ii) turned 'set doeddy = 0'
then run it trac-all -c traculatest.txt -prep -log trac_from_fsleddy
it seemed to complete without errors (log attached)n and I checked the preprocessing outputs in Freeview (FA, masks and aparc+asegs) and all seemed fine.
However when I attempt the next stage in trac-all i.e. trac-all -c traculatest.txt -bedp -log trac_from_fsleddy_bedp it fails saying the following /usr/local/freesurfer/bin/bedpostx_mgh: 131: /usr/local/freesurfer/bin/bedpostx_mgh: Syntax error: "(" unexpected
the log is also attached.
any advise appreciated!
cheers ds http://www1.imperial.ac.uk/medicine/people/d.soto/ http://www1.imperial.ac.uk/medicine/people/d.soto/ On 09/08/13 14:02, Anastasia Yendiki wrote:
Why are you converting from .nii to .mnc? Why are you not using the .nii directly?
On Fri, 9 Aug 2013, David Soto wrote:
hi - thanks for the feedback
weirdly, the nii2mnc transform of the diffusion data falters, I get a part of the brain chopped have no idea why this is the case, as it worked fine before for the T1 for recon-all...I am using Ubuntu 12.04
anyway am trying to sort this out now, if you have any advise that would much appreciated!! cheers ds
http://www1.imperial.ac.uk/medicine/people/d.soto/ On 08/08/13 17:03, Anastasia Yendiki wrote:
Hi David - The fact that it's taking so many tries to initialize the left ILF tells me that something has gone wrong with the data, either with the T1 to DWI registration, or with the mask, or something like that. Have you looked at any of the output files of the pre-processing? The FA map, the aparc+aseg, etc?
a.y
On Wed, 7 Aug 2013, Soto, David wrote:
Hi Anastasia, I checked the becs and bvals files, there was a bug in the transposition of the columns into 3 rows in the bvecs. But i still have problems.. I rerun trac-all -prep and seemed fine but ended with a Segmentation fault (core dumped) which however is not present in the last line of the trac-all.log (Attached). Writing output files to/home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dlabel/mni/lh.ilf_AS_avg33_mn i_bbr_* Writing spline volume to/home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dlabel/mni/lh.ilf_AS_avg33_mn i_bbr_cpts_5.nii.gz Segmentation fault (core dumped) Just in case I tried trac-all -bedp complains like these below, any advise appreciated, cheers - ds /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/diffree/tracula02ST.txt -bedp INFO: SUBJECTS_DIR is /home/dsoto/Documents/fmri/rsdtianawmgui INFO: Diffusion root is /home/dsoto/Documents/fmri/rsdtianawmgui Actual FREESURFER_HOME /usr/local/freesurfer WARN: Running FSL's bedbost locally - this might take a while WARN: It is recommended to run this step on a cluster bedpostx_mgh -n 2 /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri /usr/local/freesurfer/bin/bedpostx_mgh: 131: /usr/local/freesurfer/bin/bedpostx_mgh: Syntax error: "(" unexpected http://www1.imperial.ac.uk/medicine/people/d.soto/
________________________________________ From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 07 August 2013 17:22 To: Soto, David Cc: freesurfer@nmr.mgh.harvard.edu Subject: RE: [Freesurfer] trac-all inquiry
Hi David - Every time you run trac-all, the results get appended to this file, so you need to look for error messages only in the more recent invocation of trac-all. The first error there seems to be:
Error: bvecs and bvals don't have the same number of entries
Do you have the same number of b-values and gradient vectors and volumes in your DWI series?
a.y
On Tue, 6 Aug 2013, Soto, David wrote:
hi
I upgraded to FS 5.3 but still encountering issues with trac-all prep.
The log is attached, things I noted after inspecting it
1) INFO: FreeSurfer build stamps do not match Subject Stamp: freesurfer-Linux-centos4_x86_64-stable-pub-v5.1.0 Current Stamp: freesurfer-Linux-centos4_x86_64-stable-pub-v5.3.0
2) Error: input image /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri/lowb not valid 3) Image Exception : #22 :: ERROR: Could not open image /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri/lowb_brain 4) Image Exception : #22 :: ERROR: Could not open image /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dlabel/diff/White-Matter++. 5) ERROR: Could not read /home/dsoto/Documents/fmri/rsdtianawmgui/02ST/dmri/dtifit_FA.nii.gz but despite all this it says: trac-preproc finished without error at Tue Aug 6 21:27:30 BST 2013
thanks for your help
cheers ds
http://www1.imperial.ac.uk/medicine/people/d.soto/
________________________________________ From: Anastasia Yendiki [ayendiki@nmr.mgh.harvard.edu] Sent: 06 August 2013 19:30 To: Soto, David Cc: freesurfer@nmr.mgh.harvard.edu Subject: RE: [Freesurfer] trac-all inquiry
I see, you're using the old version of tracula (from freesurfer 5.1). In that version, you had to define the number of low-b images in the configuration file. I strongly recommend updating to freesurfer 5.3. A lot of things have improved in tracula since then.
Also, in the future please attach any log files as separate attachments instead of pasting them into the body of your email - this causes the body of the email to exceed the limit allowable on the list.
Thanks, a.y
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