You can use use mri_binarize with --min 0.5 and it will take all labels with value 1 and greater. You can create a bounding box with mri_mask with the -bb option

On 5/4/2021 11:53 AM, Arman Avesta wrote:

        External Email - Use Caution        

Hi gang,

I have downloaded head MRIs of 1000 subjects from ADNI, together with their FreeSurfer generated aparc+aseg.mgz files. I'm using them in a 3D deep learning network. These MRIs are 256 x 256 x 256, which is too large for GPU training. Therefore, I'm trying to pre-process the volumes by putting a bounding box around the brain, crop the image, and then resize it to a smaller size (e.g. 64 * 100 * 100).

To put the bounding box around the brain, I need the brain mask. I don't have access to the brainmasks of these subjects, so I'm trying to use mri_extract_label to make brainmasks for them.

Is there a way to tell mri_extract_label to put together all labels in one volume?

Best regards,

Arman



Arman Avesta, MD
Radiology Resident & PhD Student
Yale School of Medicine & Yale Graduate School of Arts and Sciences

Email: arman.avesta@yale.edu


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