|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Configuration Object for Statemachines. More...
#include <mitkEventConfig.h>
Public Types | |
| typedef itk::SmartPointer< InteractionEvent > | EventType |
Public Member Functions | |
| EventConfig () | |
| Constructs an invalid EventConfig object. More... | |
| EventConfig (const EventConfig &other) | |
| Copy constructor. More... | |
| EventConfig (const std::string &filename, const us::Module *module=nullptr) | |
| Construct an EventConfig object based on a XML configuration file. More... | |
| EventConfig (std::istream &inputStream) | |
| Construct an EventConfig object based on a XML configuration file. More... | |
| EventConfig (const std::vector< PropertyList::Pointer > &configDescription) | |
| Construct an EventConfig object based on a vector of mitk::PropertyLists. More... | |
| EventConfig & | operator= (const EventConfig &other) |
| Copy assignment operator. More... | |
| ~EventConfig () | |
| Destructor. More... | |
| bool | IsValid () const |
| Checks whether this EventConfig object is valid. More... | |
| bool | AddConfig (const std::string &filename, const us::Module *module=nullptr) |
| This method extends this configuration. More... | |
| bool | AddConfig (const EventConfig &config) |
| This method extends this configuration. More... | |
| void | ClearConfig () |
| Reset this EventConfig object, rendering it invalid. More... | |
| PropertyList::Pointer | GetAttributes () const |
| Returns the attributes defined in the configuration file. More... | |
| std::string | GetMappedEvent (const EventType &interactionEvent) const |
| Get the mapped event variant name for a given interaction event. More... | |
Configuration Object for Statemachines.
Reads given config file, which translates specific user inputs (InteractionEvents) into EventVariants that can be processed by the StateMachine. Refer to How to create a Config-File .
Definition at line 46 of file mitkEventConfig.h.
Definition at line 49 of file mitkEventConfig.h.
| mitk::EventConfig::EventConfig | ( | ) |
Constructs an invalid EventConfig object.
Call LoadConfig to create a valid configuration object.
| mitk::EventConfig::EventConfig | ( | const EventConfig & | other | ) |
Copy constructor.
| other | The EventConfig object to copy from. |
| mitk::EventConfig::EventConfig | ( | const std::string & | filename, |
| const us::Module * | module = nullptr |
||
| ) |
Construct an EventConfig object based on a XML configuration file.
Uses the specified resource file containing an XML event configuration to construct an EventConfig object. If the resource is invalid, the created EventConfig object will also be invalid.
| filename | The resource name relative to the Interactions resource folder. |
| module | The module containing the resource. Defaults to the Mitk module. |
| mitk::EventConfig::EventConfig | ( | std::istream & | inputStream | ) |
Construct an EventConfig object based on a XML configuration file.
Uses the specified istream referring to a file containing an XML event configuration to construct an EventConfig object. If the resource is invalid, the created EventConfig object will also be invalid.
| inputStream | std::ifstream to XML configuration file. |
| mitk::EventConfig::EventConfig | ( | const std::vector< PropertyList::Pointer > & | configDescription | ) |
Construct an EventConfig object based on a vector of mitk::PropertyLists.
Constructs the EventObject based on a description provided by vector of property values, where each mitk::PropertyList describes one Event.
Example
| mitk::EventConfig::~EventConfig | ( | ) |
Destructor.
| bool mitk::EventConfig::AddConfig | ( | const EventConfig & | config | ) |
This method extends this configuration.
The configuration from the EventConfig object is loaded and only the ones conflicting are replaced by the new one. This way several configurations can be combined.
| config | The EventConfig object whose configuration should be added. |
true if the configuration was successfully added, false otherwise.| bool mitk::EventConfig::AddConfig | ( | const std::string & | filename, |
| const us::Module * | module = nullptr |
||
| ) |
This method extends this configuration.
The configuration from the resource provided is loaded and only the ones conflicting are replaced by the new one. This way several configuration files can be combined.
| filename | The resource name relative to the Interactions resource folder. |
| module | The module containing the resource. Defaults to the Mitk module. |
true if the configuration was successfully added, false otherwise.| void mitk::EventConfig::ClearConfig | ( | ) |
Reset this EventConfig object, rendering it invalid.
| PropertyList::Pointer mitk::EventConfig::GetAttributes | ( | ) | const |
Returns the attributes defined in the configuration file.
Returns a PropertyList that contains the properties set in the configuration file. All properties are stored as strings.
| std::string mitk::EventConfig::GetMappedEvent | ( | const EventType & | interactionEvent | ) | const |
Get the mapped event variant name for a given interaction event.
Checks if the config object has a definition for the given event. If it has, the corresponding variant name is returned, else an empty string is returned.
| interactionEvent | The interaction event to look up. |
| bool mitk::EventConfig::IsValid | ( | ) | const |
Checks whether this EventConfig object is valid.
true if a configuration was successfully loaded, false otherwise. | EventConfig& mitk::EventConfig::operator= | ( | const EventConfig & | other | ) |
Copy assignment operator.