I have managed to use the mri_extract_label to pull individual ROI's from the wmparc.mgz file and it works perfectly for my need. I'm wondering if it is possible to script this command to create individual ROI images for all non-zero regions in one step? Essentially I would like to be able to use the index value from the wmparc.stats file and then name each file according to the StructName column. If anyone has a working backbone to start off, or any helpful suggestions are greatly appreciated.
Best, Ben -- Benjamin Pruce, R.A. Psychological and Brain Sciences Indiana University Bloomington, IN 47401
Hi Ben,
I would do it in matlab I guess, although mri_extract_label will take multiple labels on the commandline and extract each one of them.
cheers Bruce On Thu, 28 Jan 2010, Pruce, Benjamin wrote:
I have managed to use the mri_extract_label to pull individual ROI's from the wmparc.mgz file and it works perfectly for my need. I'm wondering if it is possible to script this command to create individual ROI images for all non-zero regions in one step? Essentially I would like to be able to use the index value from the wmparc.stats file and then name each file according to the StructName column. If anyone has a working backbone to start off, or any helpful suggestions are greatly appreciated.
Best, Ben -- Benjamin Pruce, R.A. Psychological and Brain Sciences Indiana University Bloomington, IN 47401
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
You could also run mri_segstats on the wmparc to generate a stats file (use --non-empty). This lists all the non-empty segments it find. If you pass it the FreeSurferLUT.txt as the ctab, then it lists the names as well as the index number. You could then write a script to loop through the indices, extract the ROI, and save it in a file named for the segmentation.
doug
Bruce Fischl wrote:
Hi Ben,
I would do it in matlab I guess, although mri_extract_label will take multiple labels on the commandline and extract each one of them.
cheers Bruce On Thu, 28 Jan 2010, Pruce, Benjamin wrote:
I have managed to use the mri_extract_label to pull individual ROI's from the wmparc.mgz file and it works perfectly for my need. I'm wondering if it is possible to script this command to create individual ROI images for all non-zero regions in one step? Essentially I would like to be able to use the index value from the wmparc.stats file and then name each file according to the StructName column. If anyone has a working backbone to start off, or any helpful suggestions are greatly appreciated.
Best, Ben -- Benjamin Pruce, R.A. Psychological and Brain Sciences Indiana University Bloomington, IN 47401
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu