[vtkusers] vtkRenderWindowInteractor and mouse events

Gib Bogle g.bogle at auckland.ac.nz
Thu Aug 15 14:34:08 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
What I didn't realize immediately is that doing this:

vtkSmartPointer<vtkInteractorStyle> style = 
vtkSmartPointer<vtkInteractorStyle>::New();
renderWindowInteractor->setInteractorStyle(style);

removes all the vtkInteractor behaviour.  I just want to stop the 
left-button-down-and-mouse-moved effects.



More information about the vtkusers mailing list