Hi, all
I saw a script here, which could change the Red slice.
Suppose there is a CT data of 512 slices. I want to scroll from slice 0 to slice 511 automatically, is it possible to implement that using a python script?
Here is a try to move 2 times in Red slice, but the GUI is not updated immediately. I want to know how to update the GUI.
import time
layoutManager = slicer.app.layoutManager()
red = layoutManager.sliceWidget("Red")
redLogic = red.sliceLogic()
# Print current slice offset position
print(redLogic.GetSliceOffset())
# Change slice position
redLogic.SetSliceOffset(-400)
print('move first')
time.sleep(1.0)
redLogic.SetSliceOffset(-500)
print('move sceond')