Hi Paul, this mostly looks right. I think the problem may be that you are including the unknown label on the command line. I think that mris_label2annot will ignore the 0 inthe ctab file, which means that it assign the first label passed (lh.unknown.label) to the the first non-zero ROI in the ctab file (banksts). Try that and see if it works. doug
On 01/30/2013 03:03 PM, Paul Beach wrote: > Hi Doug, > > I've been attempting to utilize the programs suggested by you to > create manual labels (ROIs) on the cortical surface of tksurfer to be > able to export certain ones to AFNI. The problem I was having > originally was that the cortical ribbon was not fully covered by > surface drawn labels that were changed to volumes by MRI_label2vol. > > You suggested first using mri_annotation2label to extract the labels > within the aparc.annot files (left and right hemispheres), putting my > created labels into the same folder (replacing, for example, the > "insula" label with anterior, middle, and posterior insula labels) > and then using mris_label2annotation to make a new annotated file to > be sent into a re-ran mri_aparc2aseg. > > The problem I'm running into now, after extracting all the labels, > putting in my own, and running mris_label2annotis that the resultant > annotation's labels are highly out of place and disorganized. For > example, the label for the cuneus is where the corpus callosum is. > > I'm wondering if this has something to do with the order of labels in > the mris_label2annot script of possibly with my .ctab file. The latter > was created based on what I found here > <https://surfer.nmr.mgh.harvard.edu/fswiki/tksurfer_labeledit> on the > Freesurfer wiki. I simply added my six manual labels/ROIs at the end. > I tried to use their GWFSAnnotToLUT > <https://surfer.nmr.mgh.harvard.edu/fswiki/tksurfer_labeledit?action=AttachFile&do=view&target=GWFSAnnotToLUT> > program, > but could not get it to work, so I'm not sure if the .ctab file > accurately represents tksurfer's Lookup Table. > > I'm also not sure if it has something to do with overlapping vertices > of different labels. For example, will leaving the "insula" label in > mess things up when I also try to include the anterior, middle, and > posterior insula labels? If so, would simply removing labels that > overlap, vertex-wise, help? > > I have attached the setup of the .ctab file as well as my > mris_label2annot script. > > > Thanks for your advice, > Paul > > > On Tue, Jan 22, 2013 at 2:52 PM, Paul Beach <pabea...@gmail.com > <mailto:pabea...@gmail.com>> wrote: > > Thanks for your help! > > > > On Tue, Jan 22, 2013 at 11:12 AM, Douglas N Greve > <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote: > > mri_annotation2label breaks them appart > mris_label2annot puts them back together again > doug > > On 01/22/2013 11:09 AM, Paul Beach wrote: > > Hi Doug, > > Thank you for this. However, can you give me a hint as to > how I can go about breaking apart the aparc.annot files > into their constituent label files? Are there a particular > commands for doing this and eventually recombining the > labels into the overall aparc.annot file? > > > Thanks! > > > > On Wed, Jan 16, 2013 at 3:15 PM, Douglas N Greve > <gr...@nmr.mgh.harvard.edu > <mailto:gr...@nmr.mgh.harvard.edu> > <mailto:gr...@nmr.mgh.harvard.edu > <mailto:gr...@nmr.mgh.harvard.edu>>> wrote: > > > The "annotation" is the name we give to a surface > segmentation > (eg, lh.aparc.annot). You can break lh.aparc.annot > into its > constituent label files. You can then replace the > insula label > file with posterior and anterior labels that you > create. You can > then recombine the labels back into a new annotation. > Once you > have the new annotation, you can run mri_aparc2aseg to > map the > annotation into the volume. This method will do better > at filling > in the cortical ribbon than mri_surf2vol or mri_label2vol. > > doug > > > > On 01/16/2013 01:25 PM, Paul Beach wrote: > > Hi Doug, > > Thanks a lot for the reply. I'm relatively new to > freesurfer > and it's great to see such a helpful community. > > I'm a little fuzzy on what you mean with your second > suggestion, related to the manual ROI > creation/export to AFNI. > Could you explain a bit more about creating "a new > annotation > and then run mri_aparc2aseg." > > First, I'm not sure what you mean by "new annotation." > > Second, my understanding is that mri_aparc2aseg > normally deals > with ROIs in the LUT. However, looking at the wiki > for this > command, it seems as though I can utilize my > created label > using the "--annot argName" option. > How does this look: > mri_aparc2aseg --s [subj] --annot lh.aIns.label > --o lh.aIns_aparc > > > Cheers, > Paul > > > > On Wed, Jan 16, 2013 at 10:56 AM, Douglas N Greve > <gr...@nmr.mgh.harvard.edu > <mailto:gr...@nmr.mgh.harvard.edu> > <mailto:gr...@nmr.mgh.harvard.edu > <mailto:gr...@nmr.mgh.harvard.edu>> > <mailto:gr...@nmr.mgh.harvard.edu > <mailto:gr...@nmr.mgh.harvard.edu> > > <mailto:gr...@nmr.mgh.harvard.edu > <mailto:gr...@nmr.mgh.harvard.edu>>>> wrote: > > Hi Paul, > > On 01/16/2013 10:27 AM, Paul Beach wrote: > > Hello, > > > > I have two issues, currently. > > > > First, I was wondering if it would be > possible to create > separate > > FSAverage brains for different subject > groups. I am > working with > > healthy seniors and various stages of > Alzheimer's > disease, so > doing so > > would be very helpful from the perspective > of not > conflating the > > differences in neuroanatomy between the > these groups. > One idea > we had > > was to create separate HOME directories for > each group, > but we > wanted > > to know if there was an easier way. I can't find > anything in the > > interwebs about this. > You can create your own fsaverage subject using > make_average_subject. > Note that when you run recon-all it registers > to the standard > fsaverage > space. If you want to register to a different > space, you > will need to > re-run mris_register. Once you do this, you > will not be > able to > compare > groups. > > > > Second, I utilize some ROIs that are not > specified by FS > (such as > > secondary somatosensory cortex and anterior > vs. posterior > insula). My > > means of getting around this was to use > FSAverage and > tksurfer to > > hand-draw them, save them as '.label' files, > map them to > individual > > subjects, and export them to AFNI since much > of our > correlation > > analysis is done on that platform. However, > I've noticed > that when I > > view these hand-drawn ROIs in AFNI they only > show up at the > border of > > the gray and white matter, rather than > filling the > entirety of the > > gray matter. Note that this problem does not > occur for > ROIs in the > > look up table (like the caudal ACC). > Exporting these to AFNI > gives you > > a nice ROI that fills all the gray matter in > the defined > region. > Try using --proj frac 0 1 .1 with > mri_label2vol. Or you > can create > a new > annotation and then run mri_aparc2aseg. The > 2nd method > works a little > better since the 1st method can leave some holes. > > doug > > > > _Code I'm using_: > > For the latter problem, what I first use is > mri_label2label to > map the > > fsaverage-based ROI onto individual > subjects, for > example with the > > left anterior insula, before using > mri_label2vol: > > *mri_label2label --srclabel lh.aIns.label > --srcsubject > fsaverage > > --trglabel lh.aIns.label --trgsubject [subj] > --regmethod > surface > > --hemi lh* > > > > *mri_label2vol --label > ../label/lh.aIns.label --regheader > > aparc+aseg.mgz --o gmroi_volume.nii.gz > --temp orig/001.mgz* > > > > > > Then I copy the new volume file to their > AFNI folder, > rename it, and > > run my correlation analysis on them. > > > > Note, that for those ROIs that are in the > look up table > (those > > parcellated by freesurfer) I simply use > mri_label2vol before > > extracting them using 3dcalc (for example, > the caudal > anterior > > cingulate)... > > *mri_label2vol --seg aparc+aseg.mgz --regheader > aparc+aseg.mgz --o > > gmroi_volume.nii.gz --temp orig/001.mgz* > > > > *3dcalc -a gmroi_volume.nii.gz -expr > 'equals(a,1002)' > -prefix > > ROI_FS_lh.caudalACC.nii.gz* > > > > > > > > tl:dr > > Is it possible to "easily" create multiple > FSAverages > based on > > selected subjects (in my case, subject > groups separated by > disease state)? > > > > and > > > > Does anyone have any advice on how to get > hand-drawn > surface-based > > ROIs from Freesurfer's tksurfer into AFNI > that full > cover the > entirety > > of the gray matter? > > > > > > Cheers and thanks! > > -- > > Paul Beach > > > > > > > > _______________________________________________ > > 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 > gr...@nmr.mgh.harvard.edu > <mailto:gr...@nmr.mgh.harvard.edu> > <mailto:gr...@nmr.mgh.harvard.edu > <mailto:gr...@nmr.mgh.harvard.edu>> > <mailto:gr...@nmr.mgh.harvard.edu > <mailto:gr...@nmr.mgh.harvard.edu> > > <mailto:gr...@nmr.mgh.harvard.edu > <mailto:gr...@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: > 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 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 > > > 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 V > Michigan State University > - College of Osteopathic Medicine - OMS V > - Neuroscience Program > - Bozoki Lab: Neurology/Radiology > - President: American Physician Scientist > Association, MSU COM > Chapter > > > -- Douglas N. Greve, Ph.D. > MGH-NMR Center > gr...@nmr.mgh.harvard.edu > <mailto:gr...@nmr.mgh.harvard.edu> > <mailto:gr...@nmr.mgh.harvard.edu > <mailto:gr...@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: > 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 V > Michigan State University > - College of Osteopathic Medicine - OMS V > - Neuroscience Program > - Bozoki Lab: Neurology/Radiology > - President: American Physician Scientist Association, MSU > COM Chapter > > > -- > Douglas N. Greve, Ph.D. > MGH-NMR Center > gr...@nmr.mgh.harvard.edu <mailto:gr...@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: 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 V > Michigan State University > - College of Osteopathic Medicine - OMS V > - Neuroscience Program > - Bozoki Lab: Neurology/Radiology > - President: American Physician Scientist Association, MSU COM Chapter > > > > > -- > Paul Beach > DO/PhD candidate - Year V > Michigan State University > - College of Osteopathic Medicine - OMS V > - Neuroscience Program > - Bozoki Lab: Neurology/Radiology > - President: American Physician Scientist Association, MSU COM Chapter -- Douglas N. Greve, Ph.D. MGH-NMR Center gr...@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 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/ _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer