Hi Doug,
except Paul was saying the mni305.cor.mgz does not show up correctly in freeview as well. Doesn't freeview handle header orientation information properly?
--Thomas
On Wed, Oct 2, 2013 at 1:05 AM, Douglas N Greve greve@nmr.mgh.harvard.edu wrote:
Hi Paul, IMHO this is not a problem with the FreeSurfer output it is a problem with the visualization tools you are using. Have you contacted the developers? I think the data are fine and the information in the header is sufficient for a visualization tool to orient it properly (as freeview and tkmedit do). I know that fslview will not reorient but puts little letters on the side of the image to tell you what the orientation is. I think they also have tools to reorient so that it is displayed more reasonably. Have you looked into that? doug
ps. You can try using the reorder feature in mri_convert, but it will be trial and error.
On 10/01/2013 11:55 AM, Paul Beach wrote:
Ah! Yes. I changed directories to my subjects_dir and the command worked.
I then re-tried my original mri_vol2vol script. / / /mri_vol2vol --mov $SUBJECTS_DIR/mni305.nii.gz / /--targ FSL_MNI152_FreeSurferConformed_1mm.nii.gz / /--reg $FREESURFER_HOME/subjects/fsaverage/mri.2mm/reg.2mm.mni152.dat / /--inv --o FSL_MNI305_2mm.nii.gz/ / / Unfortunately I'm getting the same mis-orientation result in AFNI, freeview, and fslview.
On Tue, Oct 1, 2013 at 11:47 AM, Thomas Yeo <ythomas@csail.mit.edu mailto:ythomas@csail.mit.edu> wrote:
Oh I see. You probably don't have write access to the current directory (which I assume to be//extern/research/tools/freesurfer-5.3.0/subjects/fsaverage/mri.2mm/)/, so it can't write out mni305.nii.gz. Write out mni305.nii.gz to another directory.
--Thomas On Tue, Oct 1, 2013 at 11:41 PM, Paul Beach <pabeach1@gmail.com <mailto:pabeach1@gmail.com>> wrote: I'm getting the same error, despite doing just that. :-/ /[beachpau@gauss mri.2mm]$ mri_convert/extern/research/tools/freesurfer-5.3.0/subjects/fsaverage/mri.2mm/mni305.cor.mgz mni305.nii.gz/ /mri_convert
/extern/research/tools/freesurfer-5.3.0/subjects/fsaverage/mri.2mm/mni305.cor.mgz mni305.nii.gz / /$Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $/ /reading from
/extern/research/tools/freesurfer-5.3.0/subjects/fsaverage/mri.2mm/mni305.cor.mgz.../ /TR=0.00, TE=0.00, TI=0.00, flip angle=0.00/ /i_ras = (-1, 0, 0)/ /j_ras = (0, 0, -1)/ /k_ras = (0, 1, 0)/ /writing to mni305.nii.gz.../ /niiWrite(): error opening file mni305.nii.gz/ /ERROR: failure writing mni305.nii.gz/
On Tue, Oct 1, 2013 at 11:38 AM, Thomas Yeo <ythomas@csail.mit.edu <mailto:ythomas@csail.mit.edu>> wrote: Hi Paul, You have to give it the full path: /mri_convert///extern/research/tools/freesurfer-5.3.0/subjects/fsaverage/mri.2mm/mni305.cor.mgz mni305.nii.gz/ / / /--Thomas/
On Tue, Oct 1, 2013 at 11:28 PM, Paul Beach <pabeach1@gmail.com <mailto:pabeach1@gmail.com>> wrote: The mri_convert command did not work... / / /[beachpau@gauss mri.2mm]$ mri_convert mni305.cor.mgz mni305.nii.gz/ /mri_convert mni305.cor.mgz mni305.nii.gz / /$Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $/ /reading from mni305.cor.mgz.../ /TR=0.00, TE=0.00, TI=0.00, flip angle=0.00/ /i_ras = (-1, 0, 0)/ /j_ras = (0, 0, -1)/ /k_ras = (0, 1, 0)/ /writing to mni305.nii.gz.../ /niiWrite(): error opening file mni305.nii.gz/ /ERROR: failure writing mni305.nii.gz/ On Tue, Oct 1, 2013 at 11:23 AM, Thomas Yeo <ythomas@csail.mit.edu <mailto:ythomas@csail.mit.edu>> wrote: Hi Paul, Ok. Do a "mri_convert mni305.cor.mgz mni305.nii.gz". How does mni305.cor.nii.gz look in AFNI and fslview? --Thomas On Tue, Oct 1, 2013 at 11:20 PM, Paul Beach <pabeach1@gmail.com <mailto:pabeach1@gmail.com>> wrote: Thomas, 1) this cannot be loaded into AFNI or fslview - in freeview it looks fine 2) strangely FSLview of this is mis-oriented, but Freeview and AFNI look fine I'm not sure if that clarifies anything, though. On Tue, Oct 1, 2013 at 11:13 AM, Thomas Yeo <ythomas@csail.mit.edu <mailto:ythomas@csail.mit.edu>> wrote: Hi Paul, Just to clarify, 1) If you load "mni305.cor.mgz" ONLY, does it look mis-oriented in your other software? 2) If you load "FSL_MNI152_FreeSurferConformed_1mm.nii.gz"ONLY, does it look mis-oriented in your other software?
--Thomas On Tue, Oct 1, 2013 at 10:38 PM, Paul Beach <pabeach1@gmail.com <mailto:pabeach1@gmail.com>> wrote: Hi Thomas, Thank you for the advice. I ran: /tkmedit FSL_MNI305_2mm.nii.gz \/extern/research/PI/training/beachpau/Beach_FreeSurfer_data/fsaverage/mri.2mm/mni305.cor.mgz/ / / and tkmedit opened the transformed subject.
This is what I see: Inline image 1 So in tkmedit it is oriented properly. However, I utilize AFNI just as much as Freesurfer in viewing results (my functional data is not ran through fsfast). So, not having things oriented properly in other viewers is problematic. On Tue, Oct 1, 2013 at 10:28 AM, Thomas Yeo <ythomas@csail.mit.edu <mailto:ythomas@csail.mit.edu>> wrote: That's strange.FSL_MNI152_FreeSurferConformed_1mm.nii.gz should correspond exactly to norm.mgz obtained from running
$FSLDIR/data/standard/MNI152_T1_1mm_brain.nii.gz through recon-all (FS4.5).
So Doug's command should work as well. Just to confirm, can you run >> freeviewFSL_MNI152_FreeSurferConformed_1mm.nii.gz
$FSLDIR/data/standard/MNI152_T1_1mm_brain.nii.gz
The two templates should be exactly overlapping. --Thomas On Tue, Oct 1, 2013 at 9:40 PM, Paul Beach <pabeach1@gmail.com <mailto:pabeach1@gmail.com>> wrote: Doug, Unfortunately I cannot load this volume into tkmedit as this is not a subject that has been ran through Freesurfer - it's the downloadable FSL-based T1 volume from the "Yeo_JNeurophysiol11_MNI152" package available on the Freesurfer website. I'm trying to convert this and subsequent functional networks to MNI305 for connectivity analysis. However, I did open up the results in FSLview and Freeview. I have attached screen shots of each, respectively. FSLview Inline image 1 Freeview Inline image 2 Again, these images are resultant from the following script: /mri_vol2vol --mov/extern/research/tools/freesurfer-5.3.0/subjects/fsaverage/mri.2mm/mni305.cor.mgz / /--targ
FSL_MNI152_FreeSurferConformed_1mm.nii.gz / /--reg
$FREESURFER_HOME/subjects/fsaverage/mri.2mm/reg.2mm.mni152.dat / /--inv --o FSL_MNI305_2mm.nii.gz/
Thanks, Paul On Mon, Sep 30, 2013 at 7:46 PM, Douglas N Greve <greve@nmr.mgh.harvard.edumailto:greve@nmr.mgh.harvard.edu> wrote:
View it in tkmedit to see if it is really a problem with your vol2vol command. doug On 09/30/2013 07:33 PM, Paul Beach wrote: No. That was just a general example of how the image looks - from a stock google image of an FSL brain (I'm not in the lab and so cannot put up actual images). I've been using AFNI to view them. On Mon, Sep 30, 2013 at 7:23 PM, Douglas N Greve <greve@nmr.mgh.harvard.edumailto:greve@nmr.mgh.harvard.edu
<mailto:greve@nmr.mgh.harvard.edu
mailto:greve@nmr.mgh.harvard.edu>> wrote:
Is this in tkmedit? On 09/30/2013 06:59 PM, Paul Beach wrote: Hi Doug, Sorry, I should have been more specific. I meant for when one looks at the resulting transformation in a sagittal view. More specifically... Instead of this: Inline image 1 It looks more like this (though more like a 70degree shift than 90): Inline image 2 The other views are obviously affected as well. Performing a dataset "nudge" using afni generally "corrects" this problem, but I'd like to prevent it from happening in the first place. I'm suspicious that this is occurring because I'm using '/mni305.cor.mgz/' instead of '/mni305.2mm.nii.gz/' for the 'mov' command. However, I don't have the latter file anywhere in my Freesurfer directory. The former file is the closest thing I could find. Thoughts? Paul On Mon, Sep 30, 2013 at 5:52 PM, Douglas N Greve<greve@nmr.mgh.harvard.edu
mailto:greve@nmr.mgh.harvard.edu
<mailto:greve@nmr.mgh.harvard.edu
mailto:greve@nmr.mgh.harvard.edu>
<mailto:greve@nmr.mgh.harvard.edu
mailto:greve@nmr.mgh.harvard.edu
<mailto:greve@nmr.mgh.harvard.edu
mailto:greve@nmr.mgh.harvard.edu>>> wrote:
what do you mean the frontal lobe is pointing straight up? On 09/30/2013 02:32 PM, Paul Beach wrote: > Freesurfer experts, > > I'm attempting to utilize an archived e-mail's contents to resample > data in MNI152 to 305. > > The script I'm using is as follows: > /mri_vol2vol \/ > /--mov >/extern/research/tools/freesurfer-5.3.0/subjects/fsaverage/mri.2mm/mni305.cor.mgz > / > /--targ
FSL_MNI152_FreeSurferConformed_1mm.nii.gz / > /--reg
$FREESURFER_HOME/subjects/fsaverage/mri.2mm/reg.2mm.mni152.dat / > /--inv --o FSL_MNI305_2mm.nii.gz/ > / > / > / > / > This series of commands is based on the following suggestion from Doug > in a previously archived e-mail exchange from someone attempting to do > something similar: > />> To go from mni152 to the MNI305 2mm space, use/ > />>/ > />> mri_vol2vol --mov mni305.2mm.nii.gz / > />> --targ
$FSLDIR/data/standard/MNI152_T1_2mm.nii.gz / > />> --reg >
$FREESURFER_HOME/subjects/fsaverage/mri.2mm/reg.2mm.mni152.dat / > />> --inv --o output.mni305.2mm.nii.gz/ > />>/ > />> This will resample MNI152_T1_2mm.nii.gz (or anything in that > space) to the/ > />> mni305 2mm space./ > > > However, this changing the orientation of my data - essentially all > images are being rotated 90degrees so the frontal lobe is pointed > straight up. > > Are there any suggestions to ameliorate this problem? > > Thanks! > -- > Paul Beach > DO/PhD candidate - Year VI > Michigan State University > - College of Osteopathic Medicine > - Neuroscience Program > - Bozoki Lab: Neurology/Radiology > > >
> Freesurfer mailing list >Freesurfer@nmr.mgh.harvard.edu
mailto:Freesurfer@nmr.mgh.harvard.edu
<mailto:Freesurfer@nmr.mgh.harvard.edu
mailto:Freesurfer@nmr.mgh.harvard.edu>
<mailto:Freesurfer@nmr.mgh.harvard.edu
mailto:Freesurfer@nmr.mgh.harvard.edu
<mailto:Freesurfer@nmr.mgh.harvard.edu
mailto:Freesurfer@nmr.mgh.harvard.edu>>
>https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edumailto:greve@nmr.mgh.harvard.edu
<mailto:greve@nmr.mgh.harvard.edu
mailto:greve@nmr.mgh.harvard.edu>
<mailto:greve@nmr.mgh.harvard.edu
mailto:greve@nmr.mgh.harvard.edu
<mailto:greve@nmr.mgh.harvard.edu
mailto:greve@nmr.mgh.harvard.edu>> Phone Number: 617-724-2358 tel:617-724-2358 <tel:617-724-2358 tel:617-724-2358> <tel:617-724-2358 tel:617-724-2358 <tel:617-724-2358 tel:617-724-2358>> Fax: 617-726-7422 tel:617-726-7422 <tel:617-726-7422 tel:617-726-7422> <tel:617-726-7422 tel:617-726-7422
<tel:617-726-7422 <tel:617-726-7422>>> Bugs:surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop:
https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html
http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html
http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing:ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
Freesurfer mailing listFreesurfer@nmr.mgh.harvard.edu
mailto:Freesurfer@nmr.mgh.harvard.edu
<mailto:Freesurfer@nmr.mgh.harvard.edu
mailto:Freesurfer@nmr.mgh.harvard.edu>
<mailto:Freesurfer@nmr.mgh.harvard.edu
mailto:Freesurfer@nmr.mgh.harvard.edu
<mailto:Freesurfer@nmr.mgh.harvard.edu
mailto: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 athttp://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.
-- Paul Beach DO/PhD candidate - Year VI Michigan State University - College of Osteopathic Medicine - Neuroscience Program - Bozoki Lab: Neurology/Radiology -- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edumailto:greve@nmr.mgh.harvard.edu
<mailto:greve@nmr.mgh.harvard.edu
mailto:greve@nmr.mgh.harvard.edu> Phone Number: 617-724-2358 tel:617-724-2358 <tel:617-724-2358 tel:617-724-2358> Fax: 617-726-7422 tel:617-726-7422 <tel:617-726-7422 tel:617-726-7422>
Bugs:surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop:
https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html
http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html Outgoing:
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
--Paul Beach DO/PhD candidate - Year VI Michigan State University - College of Osteopathic Medicine - Neuroscience Program - Bozoki Lab: Neurology/Radiology
--Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu
mailto:greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 tel:617-724-2358 Fax: 617-726-7422 tel:617-726-7422
Bugs:surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop:
https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html Outgoing:
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
--Paul Beach DO/PhD candidate - Year VI Michigan State University - College of Osteopathic Medicine - Neuroscience Program - Bozoki Lab: Neurology/Radiology
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edumailto: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 athttp://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