[vtkusers] Problem with vtkInteractorStyleImage

Mercusyo gregory.baert at inserm.fr
Mon Jan 4 09:49:47 EST 2016


Hello,

I tried to inherit from vtkInteractorStyleTrackballCamera, this work fine
like in the VTK documentation.
But we would like to use the window/level functionnality in this new
application.
I add the ShwoMessage("bla bla bla") function in the MouseInteractorStyle1
event, the message appear correctly when I clicked on left/right buttons.
However the window/level functionnality as described in the documentation
does not work ... the vtkInteractorStyleImage::OnLeftButtonDown(); it seems
like vtkInteractorStyleImage::OnRightButtonDown(); don't go back eventon
vtkInteractorStyleImage class.
 
class MouseInteractorStyle1 : public vtkInteractorStyleImage
{
public:
	static MouseInteractorStyle1* New();
	vtkTypeMacro(MouseInteractorStyle1, vtkInteractorStyleImage);

	virtual void OnLeftButtonDown()
	{
		// Forward events
		ShowMessage("Left button!");
		vtkInteractorStyleImage::OnLeftButtonDown();
	}

	virtual void OnRightButtonDown()
	{
		ShowMessage("Right button!");
	  // Forward events
	  vtkInteractorStyleImage::OnRightButtonDown();
	}
};



--
View this message in context: http://vtk.1045678.n5.nabble.com/Problem-with-vtkInteractorStyleImage-tp5735629p5735760.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list