You can use mri_segstats, eg,
mri_segstats --seg seg.mgz --sum summary.txt
If the seg.mgz has an embedded color table that lists all the segmentatons, then the names will appear in the summary. If you have such a color table you can pass it with --ctab

On 10/18/2023 10:34 AM, Iglesias Gonzalez, Juan E. wrote:

Hi Jasmine,

This is tricky because the “absorption” happens at the discrete segmentation level (rather than using the soft probabilities).

At that point, you’re probably better off counting voxels and multiplying by their volume.

Doug: is there a way to do this with FreeSurfer programs, as opposed to using eg Matlab or Python?

If not, you could run something like this in Matlab:

addpath /path/to/freesurfer/matlab; mri = MRIread(segmentation_file); volume = sum(mri.vol(:)==label_of_interest) * det(mri.vox2ras0)

Cheers,

/E

--

Juan Eugenio Iglesias

http://www.jeiglesias.com

*From: *freesurfer-boun...@nmr.mgh.harvard.edu <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Yasmine Salman <yasmine.sal...@uclouvain.be>
*Date: *Wednesday, October 18, 2023 at 5:22 AM
*To: *freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edu>
*Subject: *[Freesurfer] HBT/FS60/CA segmentation

*        External Email - Use Caution *

Dear Freesurfer Developpers,

When I look at the FreeSurfer documentation on hippocampal segmentation, I see that it is possible to obtain different segmentations in addition to the 'traditionnal ' freesurfer 7 one:

- HBT: the hippocampus is subdivided into head, body and tail.

- FS60: it mimics the FreeSurfer 6.0 hippocampal module, i.e. there is no head/body subdivision for the hippocampus.

no head/body subdivision for hippocampal sub-regions.

- CA: the "internal" labels (GC-ML-DG and molecular layer) are absorbed by the CA subfields.

When I run the command line: segmentHA_T1.sh bert

I get files: hipposubfields.lh.T1.v21.stats which contain the volumes of the freesurfer 7 segmentation but not the other segmentations. I would like to generate a .stat file (one/subject) of segmentation type 'CA' , how can I do this?

Thank you,

Best,

Yasmine

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
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 Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
<https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 

Reply via email to