You can load the segmentation as both a segmentation and an input volume in tkmedit, eg
tkmedit subject orig.mgz -aux gmroi_volume.nii.gz -seg gmroi_volume.nii.gz
You can then see the number of each of your segmentations in the Aux field when you click on your segmentation. There's probably an easier way, but I can't remember the series of commands you ran to get gmroi. Send them if you want a better way. doug
On 02/27/2013 04:21 PM, Paul Beach wrote:
Well, what I've been doing is using a 3dcalc command to call forth regions that are part of the segmented parcellations of each subject. These, of course, are regions that are found in the LUT. The 3dcalc command calls them forth by using their LUT number.
For example, when in a given subject's Afni folder, I can use this command: 3dcalc -a gmroi_volume.nii.gz -expr 'equals(a,1026)' -prefix ROI_FS_lh.rACC.nii.gz
It then gives me, in Afni space, the rostral anterior cingulate on that subject's brain. I can then run my normal correlation analysis scripts on this region.
However, for the regions that I added into the automatic parcellations/segmentation (through your help) I don't have a number to call them forward as they are not in the LUT. SO, I'm left with the question as to whether there is another way to get them out of the aparc.aseg file that doesn't require me to make a new LUT (i.e.appending the new regions into it). If there isn't a way, then how does one go about making changes to the LUT and getting Freesurfer to then associate those changes with the aparc.aseg file.
Hopefully that all made sense.
Paul
On Tue, Feb 26, 2013 at 5:41 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu mailto:greve@nmr.mgh.harvard.edu> wrote:
Hi Paul, I'm not sure I understand. What does 3dcalc have to do with the LUT? doug On 02/25/2013 05:13 PM, Paul Beach wrote: Hi Doug. Thank you for the e-mail. I do, actually, have a 'next step' problem. I've been able to get ROIs drawn in tksurfer into an augmented aparc+aseg file of an averaged subject. Now I need to be able to get those ROIs, which are not part of the color LUT, into Afni space. For ROIs that are already in the LUT, getting them to Afni is no problem, I simply use a 3dcalc command that utilizes their place in the LUT. However, I have the problem of needing to export the newly parcellated and segmented ROIs that aren't in the Freesurfer LUT to Afni space. Is there a way to do this short of creating a new "spot" for them in our LUT? If not, how does one go about adding ROIs to the LUT and/or creating a LUT specific to my needs (since the Wiki suggests not fussing with the original LUT)? Thanks, Paul On Mon, Feb 25, 2013 at 11:28 AM, 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>>> wrote: Hi Paul, do you still have a problem that needs to be solved? doug On 02/18/2013 04:39 PM, Paul Beach wrote: > Thank you for forwarding this. > > I realize I need to further clarify my issue as well. > > With the help of Doug Greve I've taken hand made ROIs in tksurfer, > repackaged them into a new annotation, and repackaged that into a new > aseg file for an average subject. Now (and this is where I'm stuck) > I'm trying to take those newly minted ROIs, place them onto individual > subjects' brains and THEN send them to Afni for each of those subjects > (before doing seed correlation analysis). > > Previously I had been using mri_label2label to place the averaged > subject ROI into single subjects' folders and then mri_label2vol to > get them ready to send to Afni. However, this method was not producing > ROIs that covered the extent of a region's gray matter. Thus, Doug's > solution of re-annotating and re-segmenting. > > Hopefully that makes things a bit easier. > > > Thanks again for your help! > Paul > > > On Mon, Feb 18, 2013 at 3:13 PM, Bruce Fischl > <fischl@nmr.mgh.harvard.edu <mailto:fischl@nmr.mgh.harvard.edu> <mailto:fischl@nmr.mgh.harvard.edu <mailto:fischl@nmr.mgh.harvard.edu>> <mailto:fischl@nmr.mgh.harvard.edu <mailto:fischl@nmr.mgh.harvard.edu> <mailto:fischl@nmr.mgh.harvard.edu <mailto:fischl@nmr.mgh.harvard.edu>>>> wrote: > > Hi Paul > > we usually call those labels and have an ascii label file format. > Not sure how to get that into AFNI, but I'm zure Ziad (ccd) knows. > > cheers > Bruce > > On Mon, 18 Feb 2013, Paul Beach wrote: > > Hi there, > Through the help of the Freesurfer Q&A staff I've been able to > get ROIs > drawn in tksurfer into an augmented aparc+aseg file of an > averaged subject. > I need to be able to get those ROIs, which are not part of the > color LUT, > into Afni space. > > For ROIs that are already in the LUT, getting them to Afni is > no problem, I > simply use a 3dcalc command. However, I have the problem of > needing to > export newly parcellated and segmented ROIs that aren't in the > Freesurfer > LUT to Afni space. > > Is there a way to do this short of creating a new "spot" for > them in our > LUT? If not, how does one go about adding ROIs to the LUT > and/or creating a > LUT specific to my needs (since the Wiki suggests not fussing > with the > original LUT)? > > > Thanks, > Paul > -- > > > > > > 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 > > > _______________________________________________ > 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>> > 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> <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: 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>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- 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 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: 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
Not sure if you've done this, but if you run AFNI's @SUMA_Make_Spec_FS command it will convert all .mgz files to .nii. These can then be loaded as an overlay in AFNI. If you open the @SUMA_Make_Spec_FS command in a text editor, there is a line (387 in my editor) to edit which files to convert, and you can add any newly created files to that line, but the standard files are already there (e.g., aparc+aseg). Each ROI in AFNI will have a unique overlay value. You can find out what are the specific values by loading in the GUI and clicking on the ROI, then reading the overlay value (lower right of GUI if I recall).
Anthony
On 2/27/13 4:59 PM, Douglas N Greve wrote:
You can load the segmentation as both a segmentation and an input volume in tkmedit, eg
tkmedit subject orig.mgz -aux gmroi_volume.nii.gz -seg gmroi_volume.nii.gz
You can then see the number of each of your segmentations in the Aux field when you click on your segmentation. There's probably an easier way, but I can't remember the series of commands you ran to get gmroi. Send them if you want a better way. doug
On 02/27/2013 04:21 PM, Paul Beach wrote:
Well, what I've been doing is using a 3dcalc command to call forth regions that are part of the segmented parcellations of each subject. These, of course, are regions that are found in the LUT. The 3dcalc command calls them forth by using their LUT number.
For example, when in a given subject's Afni folder, I can use this command: 3dcalc -a gmroi_volume.nii.gz -expr 'equals(a,1026)' -prefix ROI_FS_lh.rACC.nii.gz
It then gives me, in Afni space, the rostral anterior cingulate on that subject's brain. I can then run my normal correlation analysis scripts on this region.
However, for the regions that I added into the automatic parcellations/segmentation (through your help) I don't have a number to call them forward as they are not in the LUT. SO, I'm left with the question as to whether there is another way to get them out of the aparc.aseg file that doesn't require me to make a new LUT (i.e.appending the new regions into it). If there isn't a way, then how does one go about making changes to the LUT and getting Freesurfer to then associate those changes with the aparc.aseg file.
Hopefully that all made sense.
Paul
On Tue, Feb 26, 2013 at 5:41 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu mailto:greve@nmr.mgh.harvard.edu> wrote:
Hi Paul, I'm not sure I understand. What does 3dcalc have to do with the LUT? doug On 02/25/2013 05:13 PM, Paul Beach wrote: Hi Doug. Thank you for the e-mail. I do, actually, have a 'next step' problem. I've been able to get ROIs drawn in tksurfer into an augmented aparc+aseg file of an averaged subject. Now I need to be able to get those ROIs, which are not part of the color LUT, into Afni space. For ROIs that are already in the LUT, getting them to Afni is no problem, I simply use a 3dcalc command that utilizes their place in the LUT. However, I have the problem of needing to export the newly parcellated and segmented ROIs that aren't in the Freesurfer LUT to Afni space. Is there a way to do this short of creating a new "spot" for them in our LUT? If not, how does one go about adding ROIs to the LUT and/or creating a LUT specific to my needs (since the Wiki suggests not fussing with the original LUT)? Thanks, Paul On Mon, Feb 25, 2013 at 11:28 AM, 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>>> wrote: Hi Paul, do you still have a problem that needs to be solved? doug On 02/18/2013 04:39 PM, Paul Beach wrote: > Thank you for forwarding this. > > I realize I need to further clarify my issue as well. > > With the help of Doug Greve I've taken hand made ROIs in tksurfer, > repackaged them into a new annotation, and repackaged that into a new > aseg file for an average subject. Now (and this is where I'm stuck) > I'm trying to take those newly minted ROIs, place them onto individual > subjects' brains and THEN send them to Afni for each of those subjects > (before doing seed correlation analysis). > > Previously I had been using mri_label2label to place the averaged > subject ROI into single subjects' folders and then mri_label2vol to > get them ready to send to Afni. However, this method was not producing > ROIs that covered the extent of a region's gray matter. Thus, Doug's > solution of re-annotating and re-segmenting. > > Hopefully that makes things a bit easier. > > > Thanks again for your help! > Paul > > > On Mon, Feb 18, 2013 at 3:13 PM, Bruce Fischl > <fischl@nmr.mgh.harvard.edu <mailto:fischl@nmr.mgh.harvard.edu> <mailto:fischl@nmr.mgh.harvard.edu <mailto:fischl@nmr.mgh.harvard.edu>> <mailto:fischl@nmr.mgh.harvard.edu <mailto:fischl@nmr.mgh.harvard.edu> <mailto:fischl@nmr.mgh.harvard.edu <mailto:fischl@nmr.mgh.harvard.edu>>>> wrote: > > Hi Paul > > we usually call those labels and have an ascii label file format. > Not sure how to get that into AFNI, but I'm zure Ziad (ccd) knows. > > cheers > Bruce > > On Mon, 18 Feb 2013, Paul Beach wrote: > > Hi there, > Through the help of the Freesurfer Q&A staff I've been able to > get ROIs > drawn in tksurfer into an augmented aparc+aseg file of an > averaged subject. > I need to be able to get those ROIs, which are not part of the > color LUT, > into Afni space. > > For ROIs that are already in the LUT, getting them to Afni is > no problem, I > simply use a 3dcalc command. However, I have the problem of > needing to > export newly parcellated and segmented ROIs that aren't in the > Freesurfer > LUT to Afni space. > > Is there a way to do this short of creating a new "spot" for > them in our > LUT? If not, how does one go about adding ROIs to the LUT > and/or creating a > LUT specific to my needs (since the Wiki suggests not fussing > with the > original LUT)? > > > Thanks, > Paul > -- > > > > > > 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 > > > _______________________________________________ > 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>> > 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> <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: 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>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- 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 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: 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
freesurfer@nmr.mgh.harvard.edu