Interactor issue

Hi, i’m trying to update this code (build for 3DSlicer 3.6) for 3DSlicer 4.10.2 but i have some issues with the interactor. I want to observe the “LeftButtonReleaseEvent” when i press only on the Red Slice Viewer (in 3DSlicer).

self.RedSliceInteractor=slicer.ApplicationGUI.GetMainSliceGUI(“Red”).GetSliceViewer().GetRenderWidget().GetRenderWindowInteractor() self.RedSliceLeftButtonReleaseTag=self.RedSliceInteractor.AddObserver(“LeftButtonReleaseEvent”,self.HandleClickInRedSlice)

This is the first part of the function that i call above:

def HandleClickInRedSlice(self):
if not self.Selecting:
return
coordinates = self.RedSliceInteractor.GetLastEventPosition()
ctrlKey = self.RedSliceInteractor.GetControlKey()

So i want to obatin also the coordinates of the point where i clicked and i i pressed the Ctrl key.
Can you help me?

A post was merged into an existing topic: Interactor from old version to 4.10.2