Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkEventRecorder.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 mitkEventRecorder_h
14 #define mitkEventRecorder_h
15 
16 #include <iostream>
18 #include <MitkCoreExports.h>
19 
20 namespace mitk
21 {
53  {
54  public:
57 
59  ~EventRecorder() override;
60 
69  void Notify(InteractionEvent *interactionEvent, bool) override;
70 
78  void SetEventIgnoreList(std::vector<std::string> list);
79 
86 
90  void StopRecording();
91 
97  bool IsActive() { return m_Active; }
98 
104  void SetOutputFile(std::string filename) { m_FileName = filename; }
105  private:
109  std::vector<std::string> m_IgnoreList;
110 
114  bool m_Active;
115  std::string m_FileName;
116 
117  std::ofstream m_FileStream;
118  };
119 }
120 #endif
#define MITKCORE_EXPORT
Observer that enables recording of all user interaction with the render windows and storing it in an ...
void Notify(InteractionEvent *interactionEvent, bool) override
Callback that receives new interaction events.
void StopRecording()
Stop recording and close the output file.
void SetOutputFile(std::string filename)
Set the output file path for recording.
void StartRecording()
Start recording events to the output file.
void SetEventIgnoreList(std::vector< std::string > list)
Set a list of event names to ignore during recording.
EventRecorder()
Constructor.
bool IsActive()
Check whether the recorder is currently active.
~EventRecorder() override
Destructor. Closes any open file stream.
Base class for all interaction events in MITK.
Find image slices visible on a given plane.
Interface for observing all InteractionEvents dispatched through the system.