Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
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 mitkInteractionTestHelper_h
18 #define mitkInteractionTestHelper_h
19 
20 #include <mitkDataStorage.h>
21 #include <mitkMouseModeSwitcher.h>
22 #include <mitkRenderWindow.h>
23 #include <mitkXML2EventParser.h>
24 
26 
27 class vtkRenderWindow;
28 class vtkRenderer;
29 
30 namespace mitk
31 {
56  {
57  public:
63  InteractionTestHelper(const std::string &interactionXmlFilePath);
64 
65  // unregisters all render windows and its renderers.
66  virtual ~InteractionTestHelper();
67 
71 
76  void AddNodeToStorage(mitk::DataNode::Pointer node);
77 
81  void PlaybackInteraction();
82 
90  void SetTimeStep(int newTimeStep);
91 
92  typedef std::vector<mitk::RenderWindow::Pointer> RenderWindowListType;
93 
94  const RenderWindowListType &GetRenderWindowList() { return m_RenderWindowList; }
100  RenderWindow *GetRenderWindowByName(const std::string &name);
101 
107  RenderWindow *GetRenderWindowByDefaultViewDirection(mitk::SliceNavigationController::ViewDirection viewDirection);
108 
114  RenderWindow *GetRenderWindow(unsigned int index);
115 
121  void AddDisplayPlaneSubTree();
122 
123  void Set3dCameraSettings();
124 
125  protected:
130  void Initialize(const std::string &interactionXmlFilePath);
131 
136  void LoadInteraction();
137 
138  mitk::XML2EventParser::EventContainerType m_Events; // List with loaded interaction events
139 
141 
142  RenderWindowListType m_RenderWindowList;
145  };
146 } // namespace mitk
147 #endif
void AddDisplayPlaneSubTree()
mitk::DataStorage::Pointer m_DataStorage
DataCollection - Class to facilitate loading/accessing structured data.
static mitk::DataStorage::Pointer GetDataStorage()
std::vector< mitk::RenderWindow::Pointer > RenderWindowListType
mitk::XML2EventParser::EventContainerType m_Events
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
ViewDirection
Possible view directions, Original will uses the PlaneGeometry instances in a SlicedGeometry3D provid...