Medical Imaging Interaction Toolkit  2018.4.99-1640525a
Medical Imaging Interaction Toolkit
mitkInteractionTestHelper.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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkInteractionTestHelper_h
14 #define mitkInteractionTestHelper_h
15 
16 #include <mitkDataStorage.h>
17 #include <mitkMouseModeSwitcher.h>
18 #include <mitkRenderWindow.h>
19 #include <mitkXML2EventParser.h>
20 
22 
23 class vtkRenderWindow;
24 class vtkRenderer;
25 
26 namespace mitk
27 {
52  {
53  public:
59  InteractionTestHelper(const std::string &interactionXmlFilePath);
60 
61  // unregisters all render windows and its renderers.
62  virtual ~InteractionTestHelper();
63 
66  mitk::DataStorage::Pointer GetDataStorage();
67 
72  void AddNodeToStorage(mitk::DataNode::Pointer node);
73 
77  void PlaybackInteraction();
78 
86  void SetTimeStep(int newTimeStep);
87 
88  typedef std::vector<mitk::RenderWindow::Pointer> RenderWindowListType;
89 
90  const RenderWindowListType &GetRenderWindowList() { return m_RenderWindowList; }
96  RenderWindow *GetRenderWindowByName(const std::string &name);
97 
103  RenderWindow *GetRenderWindowByDefaultViewDirection(mitk::SliceNavigationController::ViewDirection viewDirection);
104 
110  RenderWindow *GetRenderWindow(unsigned int index);
111 
117  void AddDisplayPlaneSubTree();
118 
119  void Set3dCameraSettings();
120 
121  protected:
126  void Initialize(const std::string &interactionXmlFilePath);
127 
132  void LoadInteraction();
133 
134  mitk::XML2EventParser::EventContainerType m_Events; // List with loaded interaction events
135 
137 
138  RenderWindowListType m_RenderWindowList;
141  };
142 } // namespace mitk
143 #endif
void AddDisplayPlaneSubTree()
mitk::DataStorage::Pointer m_DataStorage
DataCollection - Class to facilitate loading/accessing structured data.
std::vector< mitk::RenderWindow::Pointer > RenderWindowListType
mitk::XML2EventParser::EventContainerType m_Events
ViewDirection
Possible view directions, Original will uses the PlaneGeometry instances in a SlicedGeometry3D provid...
const RenderWindowListType & GetRenderWindowList()
Creates everything needed to load and playback interaction events.
mitk::MouseModeSwitcher::Pointer m_MouseModeSwitcher
mitkRenderWindow integrates the MITK rendering mechanism into VTK and is NOT QT dependent ...
#define MITKTESTINGHELPER_EXPORT
std::vector< mitk::InteractionEvent::Pointer > EventContainerType