Medical Imaging Interaction Toolkit  2021.02.99-e55a5d2f
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>
18 #include <mitkRenderWindow.h>
19 #include <mitkXML2EventParser.h>
20 
22 
23 class vtkRenderWindow;
24 class vtkRenderer;
25 
26 namespace mitk
27 {
51  {
52  public:
58  InteractionTestHelper(const std::string &interactionXmlFilePath);
59 
60  // unregisters all render windows and its renderers.
61  virtual ~InteractionTestHelper();
62 
65  DataStorage::Pointer GetDataStorage();
66 
71  void AddNodeToStorage(DataNode::Pointer node);
72 
76  void PlaybackInteraction();
77 
85  void SetTimeStep(int newTimeStep);
86 
87  typedef std::vector<RenderWindow::Pointer> RenderWindowListType;
88 
89  const RenderWindowListType &GetRenderWindowList() { return m_RenderWindowList; }
95  RenderWindow *GetRenderWindowByName(const std::string &name);
96 
102  RenderWindow *GetRenderWindowByDefaultViewDirection(SliceNavigationController::ViewDirection viewDirection);
103 
109  RenderWindow *GetRenderWindow(unsigned int index);
110 
116  void AddDisplayPlaneSubTree();
117 
118  void Set3dCameraSettings();
119 
120  protected:
125  void Initialize(const std::string &interactionXmlFilePath);
129  void InitializeDisplayActionEventHandling();
133  void LoadInteraction();
134 
135  mitk::XML2EventParser::EventContainerType m_Events; // List with loaded interaction events
136 
138 
139  RenderWindowListType m_RenderWindowList;
142 
143  };
144 }
145 
146 #endif // namespace mitk
std::vector< RenderWindow::Pointer > RenderWindowListType
DataCollection - Class to facilitate loading/accessing structured data.
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.
mitkRenderWindow integrates the MITK rendering mechanism into VTK and is NOT QT dependent ...
#define MITKTESTINGHELPER_EXPORT
std::vector< mitk::InteractionEvent::Pointer > EventContainerType
DisplayActionEventBroadcast::Pointer m_DisplayActionEventBroadcast