I think you can use option ‘--excludeid segid’ to exclude the given segmentation id(s) from report.

 

See https://surfer.nmr.mgh.harvard.edu/fswiki/mri_segstats

 

 

From: Simone Cauzzo <cauzzo.simone@gmail.com>
Sent: Wednesday, March 18, 2026 11:59 AM
To: freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] Re: use of a custom annot for mri_segstats

 

        External Email - Use Caution        

Thank you very much

I updated my code with an mri_surf2surf call that projects the annot to subject space.

It is working now. Nonetheless, I'm having troubles in masking out some vertices.

Since the QSM map had to be eroded in some points, the pial surface might meet voxels where the QSM map is null. These vertices are getting a zero value, and this is influencing my statistics.

I would like to mask out the zero vertices from the summary statistics computed by mri_segstats.

This is my current call

 

mri_segstats --annot sub hemi ....annot \

             --i []/surf/${hemi}.Xpara.${proF}.mgh \

             --sum []/stats/${hemi}.Xpara.${proF}.${annotFL}.stats

 

I tried using --maskthresh 0.0001 , and still I obtain in my statistics 0 as minimum for some ROIs, for example

 

# ColHeaders  Index SegId NVertices Area_mm2 StructName Mean StdDev Min Max Range  

201 200      1388      949.8  17networks_RH_VisCent_Striate      0.0324     0.0318     0.0000     0.2042     0.2042 

 

So it looks like the zero vertices are not being excluded.

Is there a way to exclude zero vertices? Thanks 

 

Simone Cauzzo