How can I generated MIP of brain mra in 3 directions xyz using simpleitk
The filter you are looking for is MaximumProjectionImageFilter. Be aware that the resulting image is still 3D with the third dimension size of 1. Code below makes it 2D.
Note that in most cases the projection along the z axis (x-y plane) is the only one which is isotropic. For display purposes you may need to make the result isotropic (see
make_isotropic function in this Jupyter notebook).
import SimpleITK as sitk image = sitk.ReadImage('training_001_mr_T1.mha') sitk.Show(sitk.MaximumProjection(image, 0)[0,:,:]) sitk.Show(sitk.MaximumProjection(image, 1)[:,0,:]) sitk.Show(sitk.MaximumProjection(image, 2)[:,:,0])