Medical Imaging Interaction Toolkit  2023.12.99-7a59bd54
Medical Imaging Interaction Toolkit
mitkXML2EventParser.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 mitkXML2EventParser_h
14 #define mitkXML2EventParser_h
15 
16 #include <MitkCoreExports.h>
17 
18 #include "mitkPropertyList.h"
19 
20 #include <vtkXMLParser.h>
21 
22 #include "mitkInteractionEvent.h"
23 
24 namespace us
25 {
26  class Module;
27 }
28 
29 namespace mitk
30 {
38  class MITKCORE_EXPORT XML2EventParser : public vtkXMLParser
39  {
40  public:
51  XML2EventParser(const std::string &filename, const us::Module *module = nullptr);
52 
62  XML2EventParser(std::istream &inputStream);
63 
64  typedef std::vector<mitk::InteractionEvent::Pointer> EventContainerType;
65 
66  EventContainerType GetInteractions() { return m_InteractionList; }
67  ~XML2EventParser() override{};
68 
69  protected:
73  void StartElement(const char *elementName, const char **atts) override;
74 
78  void EndElement(const char *elementName) override;
79 
80  std::string ReadXMLStringAttribute(const std::string &name, const char **atts);
81  bool ReadXMLBooleanAttribute(const std::string &name, const char **atts);
82 
83  private:
84  PropertyList::Pointer m_EventPropertyList;
85 
86  EventContainerType m_InteractionList;
87  };
88 
89 } // namespace mitk
90 
91 #endif
mitkInteractionEvent.h
mitk::XML2EventParser::~XML2EventParser
~XML2EventParser() override
Definition: mitkXML2EventParser.h:67
us
Definition: mitkAbstractFileReader.h:29
itk::SmartPointer< Self >
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
MitkCoreExports.h
us::Module
Definition: usModule.h:78
mitkPropertyList.h
mitk::XML2EventParser
Definition: mitkXML2EventParser.h:38
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15
mitk::XML2EventParser::GetInteractions
EventContainerType GetInteractions()
Definition: mitkXML2EventParser.h:66