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-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Yasmine Salman <yasmine.salman@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