Medical Imaging Interaction Toolkit  2023.12.00
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 (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 
21 #include <MitkTestingHelperExports.h>
22 
23 class vtkRenderWindow;
24 class vtkRenderer;
25 
26 namespace mitk
27 {
50  class MITKTESTINGHELPER_EXPORT InteractionTestHelper
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(AnatomicalPlane 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 
142 
143  };
144 }
145 
146 #endif
mitk::InteractionTestHelper::m_Events
mitk::XML2EventParser::EventContainerType m_Events
Definition: mitkInteractionTestHelper.h:135
mitkRenderWindow.h
mitk::InteractionTestHelper::m_DisplayActionEventBroadcast
DisplayActionEventBroadcast::Pointer m_DisplayActionEventBroadcast
Definition: mitkInteractionTestHelper.h:141
mitkDataStorage.h
mitkXML2EventParser.h
mitk::RenderWindow
mitkRenderWindow integrates the MITK rendering mechanism into VTK and is NOT QT dependent
Definition: mitkRenderWindow.h:31
itk::SmartPointer< Self >
mitk::InteractionTestHelper::m_InteractionFilePath
std::string m_InteractionFilePath
Definition: mitkInteractionTestHelper.h:137
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::XML2EventParser::EventContainerType
std::vector< mitk::InteractionEvent::Pointer > EventContainerType
Definition: mitkXML2EventParser.h:64
mitk::AnatomicalPlane
AnatomicalPlane
Definition: mitkAnatomicalPlanes.h:18
mitk::InteractionTestHelper::m_DataStorage
DataStorage::Pointer m_DataStorage
Definition: mitkInteractionTestHelper.h:140
mitk::InteractionTestHelper
Creates everything needed to load and playback interaction events.
Definition: mitkInteractionTestHelper.h:50
mitk::InteractionTestHelper::m_RenderWindowList
RenderWindowListType m_RenderWindowList
Definition: mitkInteractionTestHelper.h:139
mitkDisplayActionEventBroadcast.h
mitk::InteractionTestHelper::RenderWindowListType
std::vector< RenderWindow::Pointer > RenderWindowListType
Definition: mitkInteractionTestHelper.h:87
mitk::InteractionTestHelper::GetRenderWindowList
const RenderWindowListType & GetRenderWindowList()
Definition: mitkInteractionTestHelper.h:89