Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkInteractionEventHandler.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 mitkInteractionEventHandler_h
14 #define mitkInteractionEventHandler_h
15 
16 #include <itkLightObject.h>
17 #include <itkObjectFactory.h>
18 
19 #include <mitkCommon.h>
20 #include <mitkEventConfig.h>
21 #include <mitkPropertyList.h>
22 #include <MitkCoreExports.h>
23 
24 #include <string>
25 
26 namespace us
27 {
28  class Module;
29 }
30 
31 namespace mitk
32 {
49  class InteractionEvent;
50  class MITKCORE_EXPORT InteractionEventHandler : public itk::Object
51  {
52  public:
54 
69  bool SetEventConfig(const std::string &filename, const us::Module *module = nullptr);
70 
82  bool SetEventConfig(const EventConfig &config);
83 
89 
102  bool AddEventConfig(const std::string &filename, const us::Module *module = nullptr);
103 
115  bool AddEventConfig(const EventConfig &config);
116 
117  protected:
120 
124  PropertyList::Pointer GetAttributes() const;
125 
126  std::string MapToEventVariant(InteractionEvent *interactionEvent);
127 
132  virtual void ConfigurationChanged();
133 
134  private:
135  EventConfig m_EventConfig;
136  };
137 
138 } /* namespace mitk */
139 #endif
#define MITKCORE_EXPORT
Configuration Object for Statemachines.
Base class for all objects that handle mitk::InteractionEvents.
std::string MapToEventVariant(InteractionEvent *interactionEvent)
mitkClassMacroItkParent(InteractionEventHandler, itk::Object)
PropertyList::Pointer GetAttributes() const
bool AddEventConfig(const EventConfig &config)
This method extends the configuration. The configuration from the EventConfig object is loaded and on...
bool AddEventConfig(const std::string &filename, const us::Module *module=nullptr)
This method extends the configuration.
virtual void ConfigurationChanged()
bool SetEventConfig(const EventConfig &config)
Loads a configuration from an EventConfig object.
bool SetEventConfig(const std::string &filename, const us::Module *module=nullptr)
Loads a configuration from an XML resource.
EventConfig GetEventConfig() const
Returns the current configuration.
Base class for all interaction events in MITK.
Represents a CppMicroServices module.
Definition: usModule.h:70
Find image slices visible on a given plane.