Thank you so much for your help Paul! I was wondering if I could get a little 
more specific help with the .ctab file. Would I just add my ROI to the existing 
FreesurferColorLUT.txt (named something different of course) or would I start a 
new one from scratch?

Thanks again!

Tara

----- Original Message -----
From: "Paul Beach" <pabea...@gmail.com>
To: "Freesurfer support list" <freesurfer@nmr.mgh.harvard.edu>, misko...@uwm.edu
Sent: Thursday, June 5, 2014 12:26:00 PM
Subject: Re: [Freesurfer] Freesurfer Surface based ROI to AFNI?


Hi Tara, 


I do this regularly, though I don't define my Freesurfer ROIs/labels in QDEC. 


The following will do the process into individual subject space 


First : 
mri_label2label --srclabel path_to_label/label.label --trgsubject {$subj} 
--regmethod surface --hemi hemisphere 


Do this for as many labels as you have... 


Then : 
Create a color table file (.ctab file) for each hemisphere that contains your 
ROIs. Take a look at the FreesurferColorLUT.txt file for help with that. The 
first entry should be the Freesurfer defined medial wall, which you can get 
from each subject's aparc.annot via mri_annotation2label. 


Then create an annotation file using your .ctab file and your ROIs - one for 
each hemisphere 


mris_label2annot --s {$subj} --ldir-default --h hemisphere --ctab 
hemisphere.ctab_file_name.txt --annot name_for_your_annotation_file \ 

--l hemi.FS_medial_wall.label \ 

--l hemi.ROI1.label \ 
--l hemi.ROI2.label \ 

--l hemi.ROI3.label \ 

... 


Then create a segmentation file from the annotation file 


mri_aparc2aseg --s {$subj} --annot 
annotion_you_created_without_hemi_designation --o 
segmentation_file_name+aseg.mgz 



Then make a gmroi_vol file from which you can extract your ROIs 



mri_label2vol --seg segmentation_file_name+aseg.mgz --regheader 
segmentation_file_name+aseg.mgz --o you_gmroi_volume.nii.gz --temp orig/001.mgz 


Copy the gmroi_vol to your subject's afni directory 


Use 3dcalc to extract individual ROIs from the gmroi_volume. The number you put 
in depends on your .ctab file order. The first ROI would be 1001. Like the 
ColorLUT, the first digit being '1' is typically for L. hemi, while '2' would 
be for the R. hemi. 


3dcalc -a your_gmroi_volume.nii.gz -expr 'equals(a,####)' -prefix 
ROI_name.nii.gz 





You can then do your AFNI-based analyses with your ROIs. 


Hopefully that's all clear. Let me know if I can help in another way. 




Cheers, 
Paul 





On Thu, Jun 5, 2014 at 12:13 PM, Tara Ann Miskovich < misko...@uwm.edu > wrote: 


Hi all, 

I am wondering if any one has any experience with converting a freesurfer 
surface based ROI created in QDEC into a format I could use on functional data 
in afni. 

Thank you, 

Tara 

_______________________________________________ 
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. 





-- 

Paul Beach 
DO/PhD candidate - Year VI 
Michigan State University 
- College of Osteopathic Medicine 
- Neuroscience Program 
- MSU Co gnitive and Ge riatric N eurology T eam ( CoGeNT ) 
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to