Yes, you can do this in a few steps. Use mri_binarize to convert the 
ribbon.mgz into a binary mask of just the cortex (use the --match 
option). Then use mri_binarize with aseg.mgz to get the hippocampus (17 
for left, see $FREESURFER_HOME/FreeSurferColorLUT.txt). Then add them 
together with fscalc. Then use mri_mask with brain.mgz as the input and 
the result from above as the mask.

doug



octavian lie wrote:
> Dear Bruce and Doug,
>  
> I want to clarify what I need. 
> I would need to export to nii.gz a brain volume which has to be :
> - T1,
> - contain gray and white matter inside the pial surface, without 
> white-gray segmentation (the source analysis program downstream in the 
> pipeline needs to complete this step in order to function). 
> - in addition to the pial contents, it should contain 
> hippocampi/amygdala as per aseg process, but exclude cerebellum
> - the volume inside the pial surface has to be "real", not binary.(if 
> binary, gray should be darker than white, and not sure if this would 
> work with the source analysis program I run).
>  
> If I try to export volumes such as brain.mgz, or brain.finalsurf.mgz, 
> the extra dura/scalp *outside* of the pial surface (red line, fig) is 
> also exported. Again, I am working at editing the pial surface to 
> remove extra dura inside the red line; this is a work in progress, 
> including customizing early recon-all steps/ implenting Andre's 
> protocols. My problem is how to exclude tissues* outside* the pial 
> surface/ red line, except hippocampi/amygdala.
> Can I create a  pial/hippocampal mask excluding everything outside the 
> red line/hippocampal/amygdalar volumes, which then I could align to a 
> "real" brain, such as brain.mgz to get the brain inside the calculate 
> pial surface? If so, how you would proceed?
>  
> Thank you for your suggestions.
>
> See also my previous message:
>  
>  
> Dear All,
>  
> I am increasingly fascinated by freesurfer.
> Here is a rookie issue: I use a source imaging program that is rather 
> simple-minded in its MRI processing steps. To be able to use the
> inverse solution tools of that program, I need to use 2 volumes:
> - a head MRI to be used to electrode coregistration 
> - a skull-stripped brain MR without cerebellum, including both the 
> gray and white matter; the program needs to perform its own white
> matter extraction to generate the gray matter volume to be used as 
> source space.
> - both MRs have to be subject to the same transforms, if any, and have 
> to have the same origin and coordinate systems (like real
> head/brain pairs).
>  
> So first, I am in the search of the "best" brain extraction possible, 
> with as little dura included as possible. Besides trying to
> implement Andre's dura protocols, and editing the pial surface for 
> brainmask.mgz, then running the rest of the recon-all steps, I need
> to be able to export in nii.gz format a volume having its pial surface 
> as calculated by freesurfer.
> When exporting brain.finalsurfs.mgz with mri_convert, it looks that 
> the calculated pial surface (red line) as visualized with tkmedit subjid
> brain.finalsurfs.mgz -surfs is ignored in the nii.gz file. When the 
> output nii volume is imported  in programs such as Bioimage Suite,
> I essentially see what looks like the outside (surface) brainmask.mgz 
> volume as in tekmedit but not accounting for the calculated pial
> surface. How can I export brain.finalsurfs.mgz with its calculated 
> pial surface as a nii volume? In other words, I would need a
> ribbon.mgz type volume to include the white matter on the inside. I 
> suppose it comes down to adding options to the mri_convert
> brain.finalsurfs.mgz step after surfaces have been generated, but I 
> would need some guidance
> Please advise.
>  
>  
> Octavian.
>  
>
>
>
>
>     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.
>
>

-- 
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

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to