Hi Freesurfers,
Is there a tool to flip the orientation of surface data to the opposite hemisphere? We are working with stroke patients, and I would like to do analysis of the contralesional hemisphere of all the patients. However, this requires putting them on the same hemisphere for ttests, etc. I saw an earlier thread online about a program for flipping in the works, I was just wondering if this is now possible? Thank you!
Kelsi
Try these instructions. You won't actually need to do the download and install in you're local, but you will need to use the dev env.
doug
------------------------------------------------------------------------------------ Download these files ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/surfreg ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/xhemireg ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mris_preproc ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/fsaverage_sym.tar.gz
# Copy surfreg and xhemireg into $FREESURFER_HOME/bin # Copy mris_preproc into $FREESURFER_HOME/bin after making a backup # Untar fsaverage_sym.tar.gz into your $SUBJECTS_DIR cd $SUBJECTS_DIR tar xvfz fsaverage_sym.tar.gz
--------------------------------------------------------- To apply an existing atlas (eg, fsaverage_sym) to an anatomical analysis
# Reg to atlas (1-2 hours per subject) # Creates $subject/xhemi # Creates lh.fsaverage_sym.sphere.reg in $subject and $subject/xhemi foreach subject (subjectlist) surfreg --s $subject --t fsaverage_sym --lh surfreg --s $subject --t fsaverage_sym --lh --xhemi end
# Create a stack of subjects mris_preproc --target fsaverage_sym --hemi lh --xhemi --paired-diff \ --srcsurfreg fsaverage_sym.sphere.reg \ --meas thickness \ --out lh.lh-rh.thickness.sm00.mgh \ --s subj1 --s subj2 ...
# Smooth mris_fwhm --s fsaverage_sym --hemi lh --cortex --smooth-only --fwhm 5\ --i lh.lh-rh.thickness.sm00.mgh --o lh.lh-rh.thickness.sm05.mgh
# Analyze mri_glmfit --y lh.lh-rh.thickness.sm05.mgh --glmdir glm.lh.lh-rh.thickness.sm05 \ --osgm --surf fsaverage_sym lh
# View tksurfer fsaverage_sym lh inflated -aparc -overlay glm.lh.lh-rh.thickness.sm05/osgm/sig.mgh
kelsi wrote:
Hi Freesurfers,
Is there a tool to flip the orientation of surface data to the opposite hemisphere? We are working with stroke patients, and I would like to do analysis of the contralesional hemisphere of all the patients. However, this requires putting them on the same hemisphere for ttests, etc. I saw an earlier thread online about a program for flipping in the works, I was just wondering if this is now possible? Thank you!
Kelsi
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Dear Doug,
I would like to the same thing that Kelsi (as I read the post) asked about: For patients with a lesion in one hemisphere, I want to compare the hemispheres with lesions to the contralateral hemispheres without lesions.
I think that your answer below is a recipe for comparing right and left hemispheres within subjects. In my case half of the patients have a lesion in the right hemisphere and the other half have a lesion in the left hemisphere.
I guess I should register all of the hemispheres to the left hemisphere of fsaverage_sym, but how do I set up the analysis for doing a paired comparison of hemispheres with lesion vs hemispheres without?
All the best, Anders
2011/11/14 Douglas N Greve greve@nmr.mgh.harvard.edu
Try these instructions. You won't actually need to do the download and install in you're local, but you will need to use the dev env.
doug
Download these files ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/surfreg ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/xhemireg ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mris_preproc
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/fsaverage_sym.tar.gz
# Copy surfreg and xhemireg into $FREESURFER_HOME/bin # Copy mris_preproc into $FREESURFER_HOME/bin after making a backup # Untar fsaverage_sym.tar.gz into your $SUBJECTS_DIR cd $SUBJECTS_DIR tar xvfz fsaverage_sym.tar.gz
To apply an existing atlas (eg, fsaverage_sym) to an anatomical analysis
# Reg to atlas (1-2 hours per subject) # Creates $subject/xhemi # Creates lh.fsaverage_sym.sphere.reg in $subject and $subject/xhemi foreach subject (subjectlist) surfreg --s $subject --t fsaverage_sym --lh surfreg --s $subject --t fsaverage_sym --lh --xhemi end
# Create a stack of subjects mris_preproc --target fsaverage_sym --hemi lh --xhemi --paired-diff \ --srcsurfreg fsaverage_sym.sphere.reg \ --meas thickness \ --out lh.lh-rh.thickness.sm00.mgh \ --s subj1 --s subj2 ...
# Smooth mris_fwhm --s fsaverage_sym --hemi lh --cortex --smooth-only --fwhm 5\ --i lh.lh-rh.thickness.sm00.mgh --o lh.lh-rh.thickness.sm05.mgh
# Analyze mri_glmfit --y lh.lh-rh.thickness.sm05.mgh --glmdir glm.lh.lh-rh.thickness.sm05 \ --osgm --surf fsaverage_sym lh
# View tksurfer fsaverage_sym lh inflated -aparc -overlay glm.lh.lh-rh.thickness.sm05/osgm/sig.mgh
kelsi wrote:
Hi Freesurfers,
Is there a tool to flip the orientation of surface data to the opposite hemisphere? We are working with stroke patients, and I would like to do analysis of the contralesional hemisphere of all the patients. However, this requires putting them on the same hemisphere for ttests, etc. I saw an earlier thread online about a program for flipping in the works, I was just wondering if this is now possible? Thank you!
Kelsi
Freesurfer mailing list 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.edu 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
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 Anders,
Run mris_preproc twice :
# For the left-lesioned subjects mris_preproc --target fsaverage_sym --hemi lh --xhemi --paired-diff \ --srcsurfreg fsaverage_sym.sphere.reg \ --meas thickness \ --out LeftLesionSubjects.lh.lh-rh.thickness.sm00.mgh \ --s Lsubj1 --s Lsubj2 ...
# For the right lesioned subjects mris_preproc --target fsaverage_sym --hemi lh --xhemi --paired-diff \ --srcsurfreg fsaverage_sym.sphere.reg \ --meas thickness \ --out RightLesionSubects.lh.lh-rh.thickness.sm00.mgh \ --s Rsubj1 --s Rsubj2 ...
You need to change the sign of the RightLesionSubjects:
fscalc RightLesionSubects.lh.lh-rh.thickness.sm00.mgh mul -1 \ -o RightLesionSubects.lh.rh-lh.thickness.sm00.mgh
Now put them together: mri_concat LeftLesionSubjects.lh.lh-rh.thickness.sm00.mgh \ RightLesionSubects.lh.rh-lh.thickness.sm00.mgh \ -o All.lh.Lesion-Healthy.thickness.sm00.mgh
then proceed replacing lh.lh-rh.thickness.sm00.mgh with All.lh.Lesion-Healthy.thickness.sm00.mgh
doug
On 12/04/2012 12:22 PM, Anders Hougaard wrote:
Dear Doug,
I would like to the same thing that Kelsi (as I read the post) asked about: For patients with a lesion in one hemisphere, I want to compare the hemispheres with lesions to the contralateral hemispheres without lesions.
I think that your answer below is a recipe for comparing right and left hemispheres within subjects. In my case half of the patients have a lesion in the right hemisphere and the other half have a lesion in the left hemisphere.
I guess I should register all of the hemispheres to the left hemisphere of fsaverage_sym, but how do I set up the analysis for doing a paired comparison of hemispheres with lesion vs hemispheres without?
All the best, Anders
2011/11/14 Douglas N Greve <greve@nmr.mgh.harvard.edu mailto:greve@nmr.mgh.harvard.edu>
Try these instructions. You won't actually need to do the download and install in you're local, but you will need to use the dev env. doug ------------------------------------------------------------------------------------ Download these files ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/surfreg ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/xhemireg ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mris_preproc ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/fsaverage_sym.tar.gz # Copy surfreg and xhemireg into $FREESURFER_HOME/bin # Copy mris_preproc into $FREESURFER_HOME/bin after making a backup # Untar fsaverage_sym.tar.gz into your $SUBJECTS_DIR cd $SUBJECTS_DIR tar xvfz fsaverage_sym.tar.gz --------------------------------------------------------- To apply an existing atlas (eg, fsaverage_sym) to an anatomical analysis # Reg to atlas (1-2 hours per subject) # Creates $subject/xhemi # Creates lh.fsaverage_sym.sphere.reg in $subject and $subject/xhemi foreach subject (subjectlist) surfreg --s $subject --t fsaverage_sym --lh surfreg --s $subject --t fsaverage_sym --lh --xhemi end # Create a stack of subjects mris_preproc --target fsaverage_sym --hemi lh --xhemi --paired-diff \ --srcsurfreg fsaverage_sym.sphere.reg \ --meas thickness \ --out lh.lh-rh.thickness.sm00.mgh \ --s subj1 --s subj2 ... # Smooth mris_fwhm --s fsaverage_sym --hemi lh --cortex --smooth-only --fwhm 5\ --i lh.lh-rh.thickness.sm00.mgh --o lh.lh-rh.thickness.sm05.mgh # Analyze mri_glmfit --y lh.lh-rh.thickness.sm05.mgh --glmdir glm.lh.lh-rh.thickness.sm05 \ --osgm --surf fsaverage_sym lh # View tksurfer fsaverage_sym lh inflated -aparc -overlay glm.lh.lh-rh.thickness.sm05/osgm/sig.mgh kelsi wrote: > Hi Freesurfers, > > Is there a tool to flip the orientation of surface data to the > opposite hemisphere? We are working with stroke patients, and I would > like to do analysis of the contralesional hemisphere of all the > patients. However, this requires putting them on the same hemisphere > for ttests, etc. I saw an earlier thread online about a program for > flipping in the works, I was just wondering if this is now possible? > Thank you! > > Kelsi > ------------------------------------------------------------------------ > > _______________________________________________ > Freesurfer mailing list > 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.edu <mailto:greve@nmr.mgh.harvard.edu> Phone Number: 617-724-2358 Fax: 617-726-7422 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting> FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html> _______________________________________________ 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.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu