Diffusion.ProcessDiffusion Brain MaskingCreates a brain mask from a diffusion weighted image volume. The mask can be used during diffusion tensor estimation or tractography seeding.
The brain mask is computed by averaging all baseline (non-diffusion-weighted) images, applying the Otsu thresholding algorithm to segment tissue voxels, and then removing small unconnected regions.