Hi Folks,
I would like to create binary masks for any given structure in aseg.mgz and aparc+aseg.mgz. I would then also like to map the masks back to native space.
I think, I should use mri_binarize followed by mri_convert as shown in the two examples below:
Example 1: a. mri_binarize --i mri/aseg.mgz --match 10 --o deep-gm-rois/lh-thalamus.mgz b. mri_convert -rl mri/orig/001.mgz -rt nearest deep-gm-rois/lh-thalamus.mgz deep-gm-rois/lh-thalamus.nii
Example 2: a. mri_binarize --i mri/aparc+aseg.mgz --match 1022 --o ctx-gm-rois/lh-postcentral.mgz b. mri_convert -rl mri/orig/001.mgz -rt nearest ctx-gm-rois/lh-postcentral.mgz ctx-gm-rois/lh-postcentral.nii
Ques 1: Is the best approach for this task ?
I noticed in the FAQ that mri_vol2vol is recommended for conversion from freesurfer space to anantomical space.
Ques 2: Is it better to use mri_vol2vol than mri_convert with the reslice option ? Thanks Mehul
I think either should work, though I am more comfortable with mri_vol2vol. Depending on what you are doing you might want to use mri_label2vol. This can convert the aseg.mgz directly to the native anatomical space. The main difference is that it will resolve boundary voxels by voting. With your method, you will have some voxels that will be in more than one label, which may or may not be a problem depending on what you are doing.
doug
Mehul Sampat wrote:
Hi Folks,
I would like to create binary masks for any given structure in aseg.mgz and aparc+aseg.mgz. I would then also like to map the masks back to native space.
I think, I should use mri_binarize followed by mri_convert as shown in the two examples below:
Example 1: a. mri_binarize --i mri/aseg.mgz --match 10 --o deep-gm-rois/lh-thalamus.mgz b. mri_convert -rl mri/orig/001.mgz -rt nearest deep-gm-rois/lh-thalamus.mgz deep-gm-rois/lh-thalamus.nii
Example 2: a. mri_binarize --i mri/aparc+aseg.mgz --match 1022 --o ctx-gm-rois/lh-postcentral.mgz b. mri_convert -rl mri/orig/001.mgz -rt nearest ctx-gm-rois/lh-postcentral.mgz ctx-gm-rois/lh-postcentral.nii
Ques 1: Is the best approach for this task ?
I noticed in the FAQ that mri_vol2vol is recommended for conversion from freesurfer space to anantomical space.
Ques 2: Is it better to use mri_vol2vol than mri_convert with the reslice option ? Thanks Mehul
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Thanks Doug.
Using mri_label2vol is a good idea and I will use this approach. Now to create the individual binary masks I just need to use mri_label2vol, followed by mri_binarize:
For example:
a. mri_label2vol --seg aparc+aseg.mgz --regheader rawavg.mgz --o aparc+aseg-in-rawavg.mgz --temp aparc+aseg.mgz b. mri_binarize --i aparc+aseg-in-rawavg.mgz --match 1022 --o lh-postcentral.nii
Also, when I looked at the help, I first thought I could do the same thing with mri_annotation2label followed by mri_label2vol .
for example:
a. mri_annotation2label --subject bert --hemi lh --annotation aparc --outdir labels b. mri_label2vol --label ../labels/lh.postcentral.label --regheader rawavg.mgz --o lh-postcentral.nii --temp aparc+aseg.mgz
But when I checks the results, (from using mri_annotation2label followed by mri_label2vol), the individual binary mask looks incorrect Did I make an error in the second approach ?
Thanks Mehul
On Tue, Jul 13, 2010 at 2:41 PM, Douglas N Greve greve@nmr.mgh.harvard.eduwrote:
I think either should work, though I am more comfortable with mri_vol2vol. Depending on what you are doing you might want to use mri_label2vol. This can convert the aseg.mgz directly to the native anatomical space. The main difference is that it will resolve boundary voxels by voting. With your method, you will have some voxels that will be in more than one label, which may or may not be a problem depending on what you are doing.
doug
Mehul Sampat wrote:
Hi Folks,
I would like to create binary masks for any given structure in aseg.mgz and aparc+aseg.mgz. I would then also like to map the masks back to native space.
I think, I should use mri_binarize followed by mri_convert as shown in the two examples below:
Example 1: a. mri_binarize --i mri/aseg.mgz --match 10 --o deep-gm-rois/lh-thalamus.mgz b. mri_convert -rl mri/orig/001.mgz -rt nearest deep-gm-rois/lh-thalamus.mgz deep-gm-rois/lh-thalamus.nii
Example 2: a. mri_binarize --i mri/aparc+aseg.mgz --match 1022 --o ctx-gm-rois/lh-postcentral.mgz b. mri_convert -rl mri/orig/001.mgz -rt nearest ctx-gm-rois/lh-postcentral.mgz ctx-gm-rois/lh-postcentral.nii
Ques 1: Is the best approach for this task ?
I noticed in the FAQ that mri_vol2vol is recommended for conversion from freesurfer space to anantomical space.
Ques 2: Is it better to use mri_vol2vol than mri_convert with the reslice option ? Thanks Mehul
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
Hi Mehul,
Mehul Sampat wrote:
Thanks Doug.
Using mri_label2vol is a good idea and I will use this approach. Now to create the individual binary masks I just need to use mri_label2vol, followed by mri_binarize:
For example:
a. mri_label2vol --seg aparc+aseg.mgz --regheader rawavg.mgz --o aparc+aseg-in-rawavg.mgz --temp aparc+aseg.mgz
The template here should be rawavg.mgz, I think.
b. mri_binarize --i aparc+aseg-in-rawavg.mgz --match 1022 --o lh-postcentral.nii
Also, when I looked at the help, I first thought I could do the same thing with mri_annotation2label followed by mri_label2vol .
for example:
a. mri_annotation2label --subject bert --hemi lh --annotation aparc --outdir labels b. mri_label2vol --label ../labels/lh.postcentral.label --regheader rawavg.mgz --o lh-postcentral.nii --temp aparc+aseg.mgz
Again, use rawavg.mgz as the temp. Also you should be able to use mri_label2vol directly on the annotation (with --annot).
doug
But when I checks the results, (from using mri_annotation2label followed by mri_label2vol), the individual binary mask looks incorrect Did I make an error in the second approach ?
Thanks Mehul
On Tue, Jul 13, 2010 at 2:41 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu mailto:greve@nmr.mgh.harvard.edu> wrote:
I think either should work, though I am more comfortable with mri_vol2vol. Depending on what you are doing you might want to use mri_label2vol. This can convert the aseg.mgz directly to the native anatomical space. The main difference is that it will resolve boundary voxels by voting. With your method, you will have some voxels that will be in more than one label, which may or may not be a problem depending on what you are doing. doug Mehul Sampat wrote: Hi Folks, I would like to create binary masks for any given structure in aseg.mgz and aparc+aseg.mgz. I would then also like to map the masks back to native space. I think, I should use mri_binarize followed by mri_convert as shown in the two examples below: Example 1: a. mri_binarize --i mri/aseg.mgz --match 10 --o deep-gm-rois/lh-thalamus.mgz b. mri_convert -rl mri/orig/001.mgz -rt nearest deep-gm-rois/lh-thalamus.mgz deep-gm-rois/lh-thalamus.nii Example 2: a. mri_binarize --i mri/aparc+aseg.mgz --match 1022 --o ctx-gm-rois/lh-postcentral.mgz b. mri_convert -rl mri/orig/001.mgz -rt nearest ctx-gm-rois/lh-postcentral.mgz ctx-gm-rois/lh-postcentral.nii Ques 1: Is the best approach for this task ? I noticed in the FAQ that mri_vol2vol is recommended for conversion from freesurfer space to anantomical space. Ques 2: Is it better to use mri_vol2vol than mri_convert with the reslice option ? Thanks Mehul ------------------------------------------------------------------------ _______________________________________________ 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@nmr.mgh.harvard.edu