I have a scripted module that looks like this.
In the example shown, the user has zoomed in on both the red and the yellow slices, and the red & yellow slice slider positions are off center.
The user is about to display a different image by choosing that image from the dropdown menu. Image selection from the dropdown menu prompts my scripted module to call
slicer.util.setSliceViewerLayers(background=self.inputSelector.currentNodeID)
so that the image chosen by the user will be displayed. However, it appears that this line of code automatically resets the zoom and slice slider positions to their default values.
Is there any way I can call
slicer.util.setSliceViewerLayers(background=self.inputSelector.currentNodeID)
without resetting zoom and slider positions, so that the user doesn’t lose track of the region they have zoomed into whenever they switch images?
Thanks,
Rohan