Great, thanks!

On Mon, Apr 11, 2011 at 6:59 AM, Douglas N Greve <greve@nmr.mgh.harvard.edu> wrote:
In version 5 there is actually already a flag for this in bbregister. Try running it with --spm-nii.
doug

Tyler Seibert wrote:
Thanks, Doug and Michael--that did the trick! What is the status of this issue for newer versions of FreeSurfer  (e.g., 5.0)?

Tyler

On Tue, Mar 29, 2011 at 8:17 AM, Douglas Greve <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>> wrote:


   As Michael says, with spm8 you have to use nifti. When 4.5 was
   written, spm8 was not around (or not used much), so this was never
   a problem. One way you can get around it is to modify your copy of
   spmregister (in $FREESURFER_HOME/bin). There is a line in there
   that indicates the format to use

   set fmt = img # Format for temporary volumes

   Try changing this to:

   set fmt = nii # Format for temporary volumes


   doug




   On 3/29/11 2:15 AM, Tyler Seibert wrote:
   Hi Michael,

   Thank you for your help! I tried the --spm-nii option you
   suggested, but it causes an error:

       ERROR: Flag --spm-nii unrecognized.


   Also, that option is not listed in the output of bbregister
   --help on my system (I am using version 4.5, build-stamp.txt:
   freesurfer-Linux-centos4_x86_64-stable-pub-v4.5.0). Is the
   --spm-nii option only available on some other version?

   Tyler

   On Mon, Mar 28, 2011 at 8:07 PM, Michael Waskom <mwaskom@mit.edu
   <mailto:mwaskom@mit.edu>> wrote:

       Hi Tyler,

       Doug can correct me if I'm wrong, but I believe if you use
       the --spm-nii option it will fix this.

       Cheers,
       Michael

       On Mon, Mar 28, 2011 at 1:47 PM, Tyler Seibert
       <tseibert@ucsd.edu <mailto:tseibert@ucsd.edu>> wrote:

           Screenshot2 attached


           ---------- Forwarded message ----------
           From: *Tyler Seibert* <tseibert@ucsd.edu
           <mailto:tseibert@ucsd.edu>>
           Date: Thu, Mar 17, 2011 at 4:02 PM
           Subject: bbregister bug? with init-spm option--flips left
           and right
           To: freesurfer@nmr.mgh.harvard.edu
           <mailto:freesurfer@nmr.mgh.harvard.edu>


           Hello,

           I hope this is the correct email list--this is my first
           time posting (just subscribed).

           I have been using bbregister to calculate a tranformation
           matrix between a T2 image (T2brain.nii.gz) and the
           subject's T1.mgz for subsequent use with mri_vol2surf. I
           have found that the init-fsl option frequently gives very
           poor registrations (e.g., registered T2 is rotated 30+
           degrees from T1). The init-spm option seemed to be
           working great. However, upon close inspection, I became
           suspicious this option was actually flipping the T2 so
           that the left hemisphere became right and vice versa. I
           am using FreeSurfer version 4.5 and have spm8 referenced
           in my matlab path.

           I used a directory ~/bbreg_test in my home directory for
           the test (linux), which consisted simply of running
           bbregister with init-fsl and init-spm options. The
           attached log file (log.txt) contains the commands I used.
           The terminal output from each test was saved in text
           files as well, also attached.

           I have also attached two screenshots of the tkregister2
           output for these tests. In each screenshot the far left
           image is the registered T2 using init-spm, and the far
           right image is the registered T2 using init-fsl. As the
           init-fsl version is clearly wrong, the middle image in
           each screenshot is the init-fsl output again, but
           manually rotated several degrees to the left to better
           emphasize the mirror-image relationship between the
           init-spm (far left) and init-fsl (middle and far right)
           output images.

           Please let me know if there is anything further you need
           from me to investigate this or if there is any insight
           you can give me as far as how to avoid this error. I
           noticed at line 209 of the spm_test.txt log file there is
           a message stating that RAS coordinate system is assumed
           (see below, where I have copied lines 208-213 for
           convenience). This may very well be the problem, as the
           T2brain.nii.gz volume is in LAS, according to mri_info
           output. However, I do not see where I can override this
           RAS assumption.

               >> >> >> >> >> >> >> >> >>
               /home/tylers/apps/spm8/spm_coreg.m
               >> >> >> >> >> INFO: Assuming RAS coordinate system
               >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>
               >> using
               /home/tylers/bbreg_test/init-spm/tmp.bbregister.15515/spmregister/refvol.spmregister.img
               as the target image
               >> using
               /home/tylers/bbreg_test/init-spm/tmp.bbregister.15515/spmregister/movvol.spmregister.img
               as the source image
               >> >> >> >> >> >> >> >> >> >> >> >> >> >>


           Thank you,

           --             Tyler Seibert

           Dept. of Bioengineering
           Medical Scientist Training Program
           University of California, San Diego



           --             Tyler Seibert

           Dept. of Bioengineering
           Medical Scientist Training Program
           University of California, San Diego


           _______________________________________________
           Freesurfer mailing list
           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 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.






   --     Tyler Seibert

   Dept. of Bioengineering
   Medical Scientist Training Program
   University of California, San Diego

         _______________________________________________
   Freesurfer mailing list
   Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu>

   _______________________________________________
   Freesurfer mailing list
   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 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.




--
Tyler

--
Douglas N. Greve, Ph.D.
MGH-NMR Center Phone Number: 617-724-2358 Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html




--
Tyler Seibert

Dept. of Bioengineering
Medical Scientist Training Program
University of California, San Diego