# MIP in 3 directions

**URL:** https://discourse.itk.org/t/mip-in-3-directions/4559
**Category:** Beginner Questions
**Tags:** python, simpleitk
**Created:** [November 8, 2021, 8:54am UTC](https://discourse.itk.org/t/mip-in-3-directions/4559 "2021-11-08T08:54:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Aleena\_Suhail](https://discourse.itk.org/user_avatar/discourse.itk.org/aleena_suhail/32/2335_2.png) [@Aleena\_Suhail](https://discourse.itk.org/u/Aleena_Suhail)
#### Post date: [November 8, 2021, 8:54am UTC](https://discourse.itk.org/t/mip-in-3-directions/4559/1 "2021-11-08T08:54:58Z")

</div>

How can I generated MIP of brain mra in 3 directions xyz using simpleitk

---

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [November 8, 2021, 1:47pm UTC](https://discourse.itk.org/t/mip-in-3-directions/4559/2 "2021-11-08T13:47:03Z")

</div>

Hello @Aleena_Suhail,

The filter you are looking for is [MaximumProjectionImageFilter](https://simpleitk.org/doxygen/latest/html/classitk_1_1simple_1_1MaximumProjectionImageFilter.html). 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](https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks/blob/master/Python/05_Results_Visualization.ipynb)).

```auto
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])

```
