# Maximum Intensity Projection

**URL:** <https://discourse.slicer.org/t/maximum-intensity-projection/11823>\
**Category:** Support\
**Created:** [June 2, 2020, 7:31am UTC](https://discourse.slicer.org/t/maximum-intensity-projection/11823 "2020-06-02T07:31:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ada](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ada/32/15944_2.png) [@ada](https://discourse.slicer.org/u/ada)\
**Post date:** [June 2, 2020, 7:31am UTC](https://discourse.slicer.org/t/maximum-intensity-projection/11823/1 "2020-06-02T07:31:03Z")

</div>

Hello all,

I would like to create my own scripted module in Slicer3D.  
Is it possible to create a button and apply the “Maximum intensity projection” algorithm available in “Volume rendering” on 3D volume using Python (with the same opacity) ?  
Thank you for your help,  
Best

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 2, 2020, 7:46pm UTC](https://discourse.slicer.org/t/maximum-intensity-projection/11823/2 "2020-06-02T19:46:22Z")

</div>

All features of Slicer are available using Python scripting. Most parameters are stored in nodes of the MRML scene and you can find the relevant class by searching in full text of Slicer source code (search for some text that is shown on screen to find the corresponding widget class, then check which MRML nodes are modified there).

For example, you can choose a raycast technique using [vtkMRMLViewNode.SetRaycastTechnique](http://apidocs.slicer.org/master/classvtkMRMLViewNode.html#a8ed1dd0f05e9be1942d14405ac2322d8):

```
viewNode = slicer.util.getNode('View1')
viewNode.SetRaycastTechnique(slicer.vtkMRMLViewNode.MaximumIntensityProjection)

```

You can find many examples of commonly needed code snippets in the [script repository](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository).

---

<div class="post-metadata">

**Author:** ![ada](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ada/32/15944_2.png) [@ada](https://discourse.slicer.org/u/ada)\
**Post date:** [June 3, 2020, 1:48pm UTC](https://discourse.slicer.org/t/maximum-intensity-projection/11823/3 "2020-06-03T13:48:14Z")

</div>

It works well !  
Thank you so much.
