Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkVtkEventAdapter.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKVTKEVENTADAPTER_H_
18 #define MITKVTKEVENTADAPTER_H_
19 
21 #include "mitkMouseMoveEvent.h"
22 #include "mitkMousePressEvent.h"
23 #include "mitkMouseReleaseEvent.h"
24 #include "mitkMouseWheelEvent.h"
25 
26 #include "vtkRenderWindowInteractor.h"
27 
28 //##Documentation
29 //## @brief Generates MITK events from VTK
30 //##
31 //## This class is the NON-QT dependent pendant to QmitkEventAdapter.
32 //## It provides static functions to set up MITK events from VTK source data
33 //##
34 //## @ingroup Interaction
35 
36 namespace mitk
37 {
38  class BaseRenderer;
39 
41  {
42  public:
45  static mitk::MousePressEvent::Pointer AdaptMousePressEvent(mitk::BaseRenderer *sender,
46  unsigned long vtkCommandEventId,
47  vtkRenderWindowInteractor *rwi);
48  static mitk::MouseMoveEvent::Pointer AdaptMouseMoveEvent(mitk::BaseRenderer *sender,
49  unsigned long vtkCommandEventId,
50  vtkRenderWindowInteractor *rwi);
51  static mitk::MouseReleaseEvent::Pointer AdaptMouseReleaseEvent(mitk::BaseRenderer *sender,
52  unsigned long vtkCommandEventId,
53  vtkRenderWindowInteractor *rwi);
54  static mitk::MouseWheelEvent::Pointer AdaptMouseWheelEvent(mitk::BaseRenderer *sender,
55  unsigned long vtkCommandEventId,
56  vtkRenderWindowInteractor *rwi);
57  static mitk::InteractionKeyEvent::Pointer AdaptInteractionKeyEvent(mitk::BaseRenderer *sender,
58  unsigned long vtkCommandEventId,
59  vtkRenderWindowInteractor *rwi);
60 
65  static std::map<BaseRenderer *, int> buttonStateMap;
66  };
67 }
68 
69 #endif /*QMITKEVENTADAPTER_H_*/
#define MITKCORE_EXPORT
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
static std::map< BaseRenderer *, int > buttonStateMap