Fade In Between Images

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!

you can blend two volumes using these steps as this video 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.


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.


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:

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

See examples in the script repository and the Slicer API documentation.