Hi Aaron,

 

I think you can do this using mri_binarize (https://surfer.nmr.mgh.harvard.edu/fswiki/mri_binarize).

‘—min’ and ‘—max’ let you specify the intensity range of the voxels you would like include. Use ‘—binval’ specify the value to set for those voxels.

 

Hope this helps.

 

Best,

 

Yujing

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Aaron Tanenbaum
Sent: Wednesday, December 14, 2022 12:51 PM
To: Freesurfer <Freesurfer@nmr.mgh.harvard.edu>
Subject: [Freesurfer] create a mgz with one value

 

        External Email - Use Caution        

Hello,

I am trying to generate a mgz with identical header and dimensions as another mgz file. However I would like all voxels to be set to one value. What is the best way to do this?

 

Thank you