[vtkusers] vtkRenderWindowInteractor and mouse events

Gib Bogle g.bogle at auckland.ac.nz
Thu Aug 15 13:30:23 EDT 2013


On 16/08/2013 5:15 a.m., David Doria wrote:
> On Thu, Aug 15, 2013 at 12:43 PM, Gib Bogle <g.bogle at auckland.ac.nz> wrote:
>> As I posted previously, I'm trying to find out how to suppress a behaviour
>> of the interactor (which I observer using QVTKWidget) when viewing 2D
>> images, i.e. with vtkInteractorStyleImage.  When the mouse is dragged with
>> left button pressed the image intensities are changed.  I have not been able
>> to locate where this is being done, so now I'm looking into catching
>> MouseMove events when the left button is down.
> You could create a subclass of the InteractorStyle and implement
>
> virtual void OnLeftButtonDown ()
> virtual void OnLeftButtonUp ()
>
> to do nothing. (i.e. void OnLeftButtonDown () {} )
>
> David
I'll try to figure out how to do that.  Meanwhile I just added 
->SetInteractorStyle() to the test code and now LeftButtonReleaseEvent is 
detected.  The CommandSubclass example does not set the interactor style.  I 
presume it is using default settings, which for some reason do not send the 
button release event.



More information about the vtkusers mailing list