Hi Doug
Here are more detailed versions of my first two questions.
1) I used tkmedit to look at the mean_func produced by a gfeat analysis of one subject's three functional runs overlayed onto the anatomical image produced by recon-all on that same subject(bert/mri/orig.mgz). The registration matrix I used was the anat2std.dat that was produced by running reg-feat2anat on all three of the feat analyses from the individual runs. When I did this I saw that the mean_func image was outside the boundaries of the anatomical image. Correspondingly, when I overlayed the zstat.nii.gz from the gfeat analysis onto the anatomical image I had activation outside of the anatomical image brain.
2) Originally, I ran BBR on a subject that I had run Recon-all for. I used BBR to register the example_func.nii.gz to the bert/mri/orig.mgz. I had BBR output an fsl.mat. I then used ApplyXFM in fsl to apply BBR's fsl.mat to register the example_func.nii.gz onto a T1 image that had been created by converting bert/mri/brainmask.mgz into niftii with mri_convert. I tried it again, this time converting the orig.mgz to niftii. In both cases the example_func in T1 space image produced by ApplyXFM is rotated about 90 degrees and also inverted. This is viewed in fslview, The corresponding T1 images created by mri_convert are not. What can I do to allow me to use BBR's fsl.mat within ApplyXFM?
Dear FS experts,
I'm sorry to pester but I am still having trouble trying to integrate registration matrices produced by BBR into my FSL processing stream. I ran BBR on a subject that I had run Recon-all for. I used BBR to register the example_func.nii.gz to the bert/mri/orig.mgz. I had BBR output an fsl.mat. I then used ApplyXFM in fsl to apply BBR's fsl.mat to register the example_func.nii.gz onto a T1 image that had been created by converting bert/mri/brainmask.mgz into niftii with mri_convert. I tried it again, this time converting the orig.mgz to niftii. In both cases the example_func in T1 space image produced by ApplyXFM is rotated about 90 degrees and also inverted. I've attached a screenchot from fslview.
Thank you for your help,
Noam
Hi, I have run into the same problem. I have managed to partially diagnose it, got some workarounds, but no real solutions. I would greatly appreciate FreeSurfer team for some feedback.
So it's all about orientations. FreeSurfer internally uses LPI and FSL (Especially FSLView) uses RAS. Try converting orig or brain mgz from mri folder of your FreeSurfer preprocessed subejcts into nifti using mri_convert (without any extra options). In FSLView they will look rotated as in your screenshot.
When BBRegister runs the registration it creates not only transformation form EPI to T1 but also from RAS to LPI orientation. This is why your output images look rotated (but they are aligned with the output of the mgz to nifti conversion mentioned above).
The workaround is to run fslreorient2std on the registered volumes. This will fix the apparent rotation visible in FSLView. However, in my case this translation matrix is one of many I am trying to combine. At the moment I need to apply a transformation, resample to do the LPI->RAS conversion and apply another transformation and resample again. I was wondering (here are the questions to FreeSurfer team):
1. Is my description of the problem accurate? 2. Is there a way to force BBRegister to output its transformation matrix having RAS space as a target? 3. Is there a way to apply some kind of a fix (LPI->RAS) to the transformation matrix?
Best, Chris
On 6 September 2011 23:23, noam Schneck noam.schneck@gmail.com wrote:
Dear FS experts,
I'm sorry to pester but I am still having trouble trying to integrate registration matrices produced by BBR into my FSL processing stream. I ran BBR on a subject that I had run Recon-all for. I used BBR to register the example_func.nii.gz to the bert/mri/orig.mgz. I had BBR output an fsl.mat. I then used ApplyXFM in fsl to apply BBR's fsl.mat to register the example_func.nii.gz onto a T1 image that had been created by converting bert/mri/brainmask.mgz into niftii with mri_convert. I tried it again, this time converting the orig.mgz to niftii. In both cases the example_func in T1 space image produced by ApplyXFM is rotated about 90 degrees and also inverted. I've attached a screenchot from fslview.
Thank you for your help, Noam
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 Chris, I don't really see this as a problem for FreeSurfer or BBR as much as it is a problem with FSLView not being able to re-orient images so that they don't show up upside-down. If you have two matrices (one to convert to T1 space, the other to the reoriented space), you can merge the matrices together so that you don't have multiple resampling steps. You can do the merge by multiplying them together. The order is important, but I think you would have M = M2*M1 where M1 takes you to the T1 space and M2 does the rotation. doug
On 10/09/2012 04:03 AM, Chris Filo Gorgolewski wrote:
Hi, I have run into the same problem. I have managed to partially diagnose it, got some workarounds, but no real solutions. I would greatly appreciate FreeSurfer team for some feedback.
So it's all about orientations. FreeSurfer internally uses LPI and FSL (Especially FSLView) uses RAS. Try converting orig or brain mgz from mri folder of your FreeSurfer preprocessed subejcts into nifti using mri_convert (without any extra options). In FSLView they will look rotated as in your screenshot.
When BBRegister runs the registration it creates not only transformation form EPI to T1 but also from RAS to LPI orientation. This is why your output images look rotated (but they are aligned with the output of the mgz to nifti conversion mentioned above).
The workaround is to run fslreorient2std on the registered volumes. This will fix the apparent rotation visible in FSLView. However, in my case this translation matrix is one of many I am trying to combine. At the moment I need to apply a transformation, resample to do the LPI->RAS conversion and apply another transformation and resample again. I was wondering (here are the questions to FreeSurfer team):
- Is my description of the problem accurate?
- Is there a way to force BBRegister to output its transformation
matrix having RAS space as a target? 3. Is there a way to apply some kind of a fix (LPI->RAS) to the transformation matrix?
Best, Chris
On 6 September 2011 23:23, noam Schnecknoam.schneck@gmail.com wrote:
Dear FS experts,
I'm sorry to pester but I am still having trouble trying to integrate registration matrices produced by BBR into my FSL processing stream. I ran BBR on a subject that I had run Recon-all for. I used BBR to register the example_func.nii.gz to the bert/mri/orig.mgz. I had BBR output an fsl.mat. I then used ApplyXFM in fsl to apply BBR's fsl.mat to register the example_func.nii.gz onto a T1 image that had been created by converting bert/mri/brainmask.mgz into niftii with mri_convert. I tried it again, this time converting the orig.mgz to niftii. In both cases the example_func in T1 space image produced by ApplyXFM is rotated about 90 degrees and also inverted. I've attached a screenchot from fslview.
Thank you for your help, Noam
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 Noam, sorry, this one slipped through the cracks (would not have seen it except for Chris' email today). The problem with your data is not that the brain is upside down but that the letters (AP, LR, SI) are not appropriate. I just tried this procedure on my data and could not replicate this problem. When you load the brainmask.nii.gz into fslview, are the letters still wrong? What was the flirt command line that ApplyXFM generated? doug
On 09/06/2011 05:23 PM, noam Schneck wrote:
Dear FS experts,
I'm sorry to pester but I am still having trouble trying to integrate registration matrices produced by BBR into my FSL processing stream. I ran BBR on a subject that I had run Recon-all for. I used BBR to register the example_func.nii.gz to the bert/mri/orig.mgz. I had BBR output an fsl.mat. I then used ApplyXFM in fsl to apply BBR's fsl.mat to register the example_func.nii.gz onto a T1 image that had been created by converting bert/mri/brainmask.mgz into niftii with mri_convert. I tried it again, this time converting the orig.mgz to niftii. In both cases the example_func in T1 space image produced by ApplyXFM is rotated about 90 degrees and also inverted. I've attached a screenchot from fslview.
Thank you for your help, Noam
freesurfer@nmr.mgh.harvard.edu