Matlab has a powerful Image Processing Toolbox, which includes image segmentation and registration. For MRI processing purpose and within the scope of this website, I will not cover all aspects of using Matlab for image processing. Instead, I will involve in applying this toolbox for MRI image segmentation, registration and 3D reconstruction.
For MRI and fMRI image analsysis, in some situations, I need to extract biomarkers to predict disease progression. In other cases, I want to detect differences between the healthy brain and brain under disease conditions. To address these questions, I take advantage of Statistical Analysis Toolbox which includes machine learning methods for my study.
Matlab version R2019a offers an example to use deep learning for 3D MRI image segmentation. The data for the example can also be downloaded freely.