# Fade In Between Images

**URL:** <https://discourse.slicer.org/t/fade-in-between-images/2355>\
**Category:** Support\
**Created:** [March 19, 2018, 5:29am UTC](https://discourse.slicer.org/t/fade-in-between-images/2355 "2018-03-19T05:29:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![asheu](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@asheu](https://discourse.slicer.org/u/asheu)\
**Post date:** [March 19, 2018, 5:29am UTC](https://discourse.slicer.org/t/fade-in-between-images/2355/1 "2018-03-19T05:29:02Z")

</div>

Hi there,

Was wondering if there was any existing module in Slicer that allow us to load 2 data sets and then fade in and out between the data sets?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![brhoom](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/brhoom/32/1228_2.png) [@brhoom](https://discourse.slicer.org/u/brhoom)\
**Post date:** [March 19, 2018, 8:22am UTC](https://discourse.slicer.org/t/fade-in-between-images/2355/2 "2018-03-19T08:22:08Z")

</div>

you can blend two volumes using these steps as this [video](https://mtixnat.uni-koblenz.de/owncloud/index.php/s/HxzYWoaIRZ4BxwD) shows. The two volumes should be aligned first if you want to see them in the same location. The slider controls the influence of each volume e.g. .5 means equal blending.

If you want to do it programmatically, it is just matrix addition e.g. imageC= imageA + imageB.

---

<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:** [March 19, 2018, 2:30pm UTC](https://discourse.slicer.org/t/fade-in-between-images/2355/3 "2018-03-19T14:30:33Z")

</div>

You can also fade between foreground/background volume by holding down Ctrl-LeftClick-MouseMove up/down. Or, hit ‘T’ key to show/hide foreground volume.

You can also find “Reveal cursor” feature usable in Compare Volumes module.

---

<div class="post-metadata">

**Author:** ![asheu](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@asheu](https://discourse.slicer.org/u/asheu)\
**Post date:** [March 19, 2018, 10:51pm UTC](https://discourse.slicer.org/t/fade-in-between-images/2355/4 "2018-03-19T22:51:39Z")

</div>

thanks a lot for the responses!

@lassoan is it possible to pull out the specific slider widget that controls the fading in and fading out and allows us to select the different volumes as the foreground and background? for loadable modules, i was able to create a widget representation and then pull specific widgets from the UI, is this also the case for the opacity model?

thanks a lot!

edit: i think the better way to phrase it is that i know i need to access the MRML scene over here:

> <https://github.com/Slicer/Slicer/blob/48cdc292056274112aca1d1fd4204d97729248fd/Libs/MRML/Widgets/Resources/UI/qMRMLSliceControllerWidget.ui>

but do not know where it lies in the slicer documentation.

---

<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:** [March 20, 2018, 6:00pm UTC](https://discourse.slicer.org/t/fade-in-between-images/2355/5 "2018-03-20T18:00:31Z")

</div>

See [examples in the script repository](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Manipulate_a_Slice_View) and the [Slicer API documentation](http://apidocs.slicer.org/master/classes.html).
