SliceWidget change background volume through code

Hi. As the title suggests, I want to be able to change the volume being viewed inside a single SliceWidget through code.

I can change the volume here but I was wondering if it is possible to do it through code?
image

You can find the answer here
https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#iterate-over-current-visible-slice-views-and-set-foreground-and-background-images

1 Like