Hi, I'll appreciate some help with the following issue. I need to define an ROI in a whole brain volume to be used as a mask in PyMVPA. That means having a whole brain .nii file with '1' within the ROI and '0' in every other voxel. Is there a way to define a functional ROI in a whole brain volume, in a similar way to what I get when running funcroi with an annotation from aparc for a specific hemi? Or alternatively, is there a way to convert the aparc based ROI for a single hemi surface into a whole brain volume?
Best, Tomer
Hi Tomer
if you binarize the aparc+aseg.mgz with mri_binarize that should be pretty close. Do you need it in the functional geometry? If so, you can use mri_vol2vol to convert it (with a register.dat created by bbregister)
cheers Bruce
On Sat, 7 Apr 2012, Tomer Livne wrote:
Hi, I'll appreciate some help with the following issue. I need to define an ROI in a whole brain volume to be used as a mask in PyMVPA. That means having a whole brain .nii file with '1' within the ROI and '0' in every other voxel. Is there a way to define a functional ROI in a whole brain volume, in a similar way to what I get when running funcroi with an annotation from aparc for a specific hemi? Or alternatively, is there a way to convert the aparc based ROI for a single hemi surface into a whole brain volume? Best, Tomer
Hi Bruce,
Thanks for the quick response. I got lost with the mri_binarize step, could you please explain to me how to find the value for the '--match' for different structures related to the aparc+aseg.mgz file?
Many thanks, Tomer
Hi Tomer
if you binarize the aparc+aseg.mgz with mri_binarize that should be pretty close. Do you need it in the functional geometry? If so, you can use mri_vol2vol to convert it (with a register.dat created by bbregister)
cheers Bruce
On Sat, 7 Apr 2012, Tomer Livne wrote:
Hi, I'll appreciate some help with the following issue. I need to define an ROI in a whole brain volume to be used as a mask in PyMVPA. That means having a whole brain .nii file with '1' within the ROI and '0' in every other voxel. Is there a way to define a functional ROI in a whole brain volume, in a similar way to what I get when running funcroi with an annotation from aparc for a specific hemi? Or alternatively, is there a way to convert the aparc based ROI for a single hemi surface into a whole brain volume? Best, Tomer
Hi Tomer
don't use match - that would be for specific values. Instead specify a range via:
mri_binarize --min 1 --max 256 --i aparc+aseg.mgz --o aparc+aseg.mask.mgz
cheers Bruce
On Sat, 7 Apr 2012, tomer@nmr.mgh.harvard.edu wrote:
Hi Bruce,
Thanks for the quick response. I got lost with the mri_binarize step, could you please explain to me how to find the value for the '--match' for different structures related to the aparc+aseg.mgz file?
Many thanks, Tomer
Hi Tomer
if you binarize the aparc+aseg.mgz with mri_binarize that should be pretty close. Do you need it in the functional geometry? If so, you can use mri_vol2vol to convert it (with a register.dat created by bbregister)
cheers Bruce
On Sat, 7 Apr 2012, Tomer Livne wrote:
Hi, I'll appreciate some help with the following issue. I need to define an ROI in a whole brain volume to be used as a mask in PyMVPA. That means having a whole brain .nii file with '1' within the ROI and '0' in every other voxel. Is there a way to define a functional ROI in a whole brain volume, in a similar way to what I get when running funcroi with an annotation from aparc for a specific hemi? Or alternatively, is there a way to convert the aparc based ROI for a single hemi surface into a whole brain volume? Best, Tomer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Hi Bruce,
I seem to be missing something, sorry. How would I define this range? Also, how can I combine this mask with the functional results (obtained by running 'selxavg3-sess -s sj -analysis X.lh ...)? What I'll need eventually is a mask constrained both by anatomical and functional considerations (preferably with automatic anatomical segmentation as achieved by funcroi).
Thanks again, Tomer
Hi Tomer
don't use match - that would be for specific values. Instead specify a range via:
mri_binarize --min 1 --max 256 --i aparc+aseg.mgz --o aparc+aseg.mask.mgz
cheers Bruce
On Sat, 7 Apr 2012, tomer@nmr.mgh.harvard.edu wrote:
Hi Bruce,
Thanks for the quick response. I got lost with the mri_binarize step, could you please explain to me how to find the value for the '--match' for different structures related to the aparc+aseg.mgz file?
Many thanks, Tomer
Hi Tomer
if you binarize the aparc+aseg.mgz with mri_binarize that should be pretty close. Do you need it in the functional geometry? If so, you can use mri_vol2vol to convert it (with a register.dat created by bbregister)
cheers Bruce
On Sat, 7 Apr 2012, Tomer Livne wrote:
Hi, I'll appreciate some help with the following issue. I need to define an ROI in a whole brain volume to be used as a mask in PyMVPA. That means having a whole brain .nii file with '1' within the ROI and '0' in every other voxel. Is there a way to define a functional ROI in a whole brain volume, in a similar way to what I get when running funcroi with an annotation from aparc for a specific hemi? Or alternatively, is there a way to convert the aparc based ROI for a single hemi surface into a whole brain volume? Best, Tomer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
If you want a simple brain mask, you can use brainmask.mgz. If you want to create a mask for a particular anatomical ROI, then you can use mri_binarize with --match. You can get a list of indicies from $FREESURFER_HOME/FreeSurferColorLUT.txt. I'm not sure what you are asking in terms of your selxavg3 question.
doug
On 4/7/12 1:04 PM, tomer@nmr.mgh.harvard.edu wrote:
Hi Bruce,
I seem to be missing something, sorry. How would I define this range? Also, how can I combine this mask with the functional results (obtained by running 'selxavg3-sess -s sj -analysis X.lh ...)? What I'll need eventually is a mask constrained both by anatomical and functional considerations (preferably with automatic anatomical segmentation as achieved by funcroi).
Thanks again, Tomer
Hi Tomer
don't use match - that would be for specific values. Instead specify a range via:
mri_binarize --min 1 --max 256 --i aparc+aseg.mgz --o aparc+aseg.mask.mgz
cheers Bruce
On Sat, 7 Apr 2012, tomer@nmr.mgh.harvard.edu wrote:
Hi Bruce,
Thanks for the quick response. I got lost with the mri_binarize step, could you please explain to me how to find the value for the '--match' for different structures related to the aparc+aseg.mgz file?
Many thanks, Tomer
Hi Tomer
if you binarize the aparc+aseg.mgz with mri_binarize that should be pretty close. Do you need it in the functional geometry? If so, you can use mri_vol2vol to convert it (with a register.dat created by bbregister)
cheers Bruce
On Sat, 7 Apr 2012, Tomer Livne wrote:
Hi, I'll appreciate some help with the following issue. I need to define an ROI in a whole brain volume to be used as a mask in PyMVPA. That means having a whole brain .nii file with '1' within the ROI and '0' in every other voxel. Is there a way to define a functional ROI in a whole brain volume, in a similar way to what I get when running funcroi with an annotation from aparc for a specific hemi? Or alternatively, is there a way to convert the aparc based ROI for a single hemi surface into a whole brain volume?
Best, Tomer
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
Hi Doug,
Thanks for the FreeSurferColorLUT.txt link, that solved the anatomical issue. I am trying to further limit this anatomical mask to voxels that were significant in the analysis of the functional data (performed on a surface, e.g. lh).
Thanks, Tomer
If you want a simple brain mask, you can use brainmask.mgz. If you want to create a mask for a particular anatomical ROI, then you can use mri_binarize with --match. You can get a list of indicies from $FREESURFER_HOME/FreeSurferColorLUT.txt. I'm not sure what you are asking in terms of your selxavg3 question.
doug
On 4/7/12 1:04 PM, tomer@nmr.mgh.harvard.edu wrote:
Hi Bruce,
I seem to be missing something, sorry. How would I define this range? Also, how can I combine this mask with the functional results (obtained by running 'selxavg3-sess -s sj -analysis X.lh ...)? What I'll need eventually is a mask constrained both by anatomical and functional considerations (preferably with automatic anatomical segmentation as achieved by funcroi).
Thanks again, Tomer
Hi Tomer
don't use match - that would be for specific values. Instead specify a range via:
mri_binarize --min 1 --max 256 --i aparc+aseg.mgz --o aparc+aseg.mask.mgz
cheers Bruce
On Sat, 7 Apr 2012, tomer@nmr.mgh.harvard.edu wrote:
Hi Bruce,
Thanks for the quick response. I got lost with the mri_binarize step, could you please explain to me how to find the value for the '--match' for different structures related to the aparc+aseg.mgz file?
Many thanks, Tomer
Hi Tomer
if you binarize the aparc+aseg.mgz with mri_binarize that should be pretty close. Do you need it in the functional geometry? If so, you can use mri_vol2vol to convert it (with a register.dat created by bbregister)
cheers Bruce
On Sat, 7 Apr 2012, Tomer Livne wrote:
Hi, I'll appreciate some help with the following issue. I need to define an ROI in a whole brain volume to be used as a mask in PyMVPA. That means having a whole brain .nii file with '1' within the ROI and '0' in every other voxel. Is there a way to define a functional ROI in a whole brain volume, in a similar way to what I get when running funcroi with an annotation from aparc for a specific hemi? Or alternatively, is there a way to convert the aparc based ROI for a single hemi surface into a whole brain volume?
Best, Tomer
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 mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
First, convert the annotation to a segmentation, something like
mri_annotation2label --subject subjectname --hemi lh --seg lh.aparc.mgh
Then binarize the segmentation and mask with your functional:
mri_binarize --i lh.aparc.mgh --match segid --mask sig.mgh --mask-thresh 2 --o seg.masked.mgh
Then run mri_label2vol on seg.masked.mgh to get the masked segmentation in the volume
doug
On 04/07/2012 01:28 PM, tomer@nmr.mgh.harvard.edu wrote:
Hi Doug,
Thanks for the FreeSurferColorLUT.txt link, that solved the anatomical issue. I am trying to further limit this anatomical mask to voxels that were significant in the analysis of the functional data (performed on a surface, e.g. lh).
Thanks, Tomer
If you want a simple brain mask, you can use brainmask.mgz. If you want to create a mask for a particular anatomical ROI, then you can use mri_binarize with --match. You can get a list of indicies from $FREESURFER_HOME/FreeSurferColorLUT.txt. I'm not sure what you are asking in terms of your selxavg3 question.
doug
On 4/7/12 1:04 PM, tomer@nmr.mgh.harvard.edu wrote:
Hi Bruce,
I seem to be missing something, sorry. How would I define this range? Also, how can I combine this mask with the functional results (obtained by running 'selxavg3-sess -s sj -analysis X.lh ...)? What I'll need eventually is a mask constrained both by anatomical and functional considerations (preferably with automatic anatomical segmentation as achieved by funcroi).
Thanks again, Tomer
Hi Tomer
don't use match - that would be for specific values. Instead specify a range via:
mri_binarize --min 1 --max 256 --i aparc+aseg.mgz --o aparc+aseg.mask.mgz
cheers Bruce
On Sat, 7 Apr 2012, tomer@nmr.mgh.harvard.edu wrote:
Hi Bruce,
Thanks for the quick response. I got lost with the mri_binarize step, could you please explain to me how to find the value for the '--match' for different structures related to the aparc+aseg.mgz file?
Many thanks, Tomer
Hi Tomer
if you binarize the aparc+aseg.mgz with mri_binarize that should be pretty close. Do you need it in the functional geometry? If so, you can use mri_vol2vol to convert it (with a register.dat created by bbregister)
cheers Bruce
On Sat, 7 Apr 2012, Tomer Livne wrote:
> Hi, I'll appreciate some help with the following issue. > I need to define an ROI in a whole brain volume to be used as a mask > in > PyMVPA. That means > having a whole brain .nii file with '1' within the ROI and '0' in > every > other voxel. > Is there a way to define a functional ROI in a whole brain volume, > in > a > similar way to what I > get when running funcroi with an annotation from aparc for a > specific > hemi? Or alternatively, > is there a way to convert the aparc based ROI for a single hemi > surface into a whole brain > volume? > > > Best, > Tomer > > > >
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 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
Thanks Doug,
I'll try that.
Tomer
On Apr 12, 2012, at 2:04 PM, Douglas N Greve wrote:
First, convert the annotation to a segmentation, something like
mri_annotation2label --subject subjectname --hemi lh --seg lh.aparc.mgh
Then binarize the segmentation and mask with your functional:
mri_binarize --i lh.aparc.mgh --match segid --mask sig.mgh --mask-thresh 2 --o seg.masked.mgh
Then run mri_label2vol on seg.masked.mgh to get the masked segmentation in the volume
doug
On 04/07/2012 01:28 PM, tomer@nmr.mgh.harvard.edu wrote:
Hi Doug,
Thanks for the FreeSurferColorLUT.txt link, that solved the anatomical issue. I am trying to further limit this anatomical mask to voxels that were significant in the analysis of the functional data (performed on a surface, e.g. lh).
Thanks, Tomer
If you want a simple brain mask, you can use brainmask.mgz. If you want to create a mask for a particular anatomical ROI, then you can use mri_binarize with --match. You can get a list of indicies from $FREESURFER_HOME/FreeSurferColorLUT.txt. I'm not sure what you are asking in terms of your selxavg3 question.
doug
On 4/7/12 1:04 PM, tomer@nmr.mgh.harvard.edu wrote:
Hi Bruce,
I seem to be missing something, sorry. How would I define this range? Also, how can I combine this mask with the functional results (obtained by running 'selxavg3-sess -s sj -analysis X.lh ...)? What I'll need eventually is a mask constrained both by anatomical and functional considerations (preferably with automatic anatomical segmentation as achieved by funcroi).
Thanks again, Tomer
Hi Tomer
don't use match - that would be for specific values. Instead specify a range via:
mri_binarize --min 1 --max 256 --i aparc+aseg.mgz --o aparc+aseg.mask.mgz
cheers Bruce
On Sat, 7 Apr 2012, tomer@nmr.mgh.harvard.edu wrote:
Hi Bruce,
Thanks for the quick response. I got lost with the mri_binarize step, could you please explain to me how to find the value for the '--match' for different structures related to the aparc+aseg.mgz file?
Many thanks, Tomer
> Hi Tomer > > if you binarize the aparc+aseg.mgz with mri_binarize that should be > pretty > close. Do you need it in the functional geometry? If so, you can use > mri_vol2vol to convert it (with a register.dat created by bbregister) > > cheers > Bruce > > > On Sat, 7 Apr 2012, Tomer Livne wrote: > >> Hi, I'll appreciate some help with the following issue. >> I need to define an ROI in a whole brain volume to be used as a mask >> in >> PyMVPA. That means >> having a whole brain .nii file with '1' within the ROI and '0' in >> every >> other voxel. >> Is there a way to define a functional ROI in a whole brain volume, >> in >> a >> similar way to what I >> get when running funcroi with an annotation from aparc for a >> specific >> hemi? Or alternatively, >> is there a way to convert the aparc based ROI for a single hemi >> surface into a whole brain >> volume? >> >> >> Best, >> Tomer >> >> >> >> _______________________________________________ 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 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
-- 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
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu