Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
vtkPointSetXMLParser.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 _VTK_POINT_SET_XML_READER__H_
14 #define _VTK_POINT_SET_XML_READER__H_
15 
16 #include <MitkLegacyIOExports.h>
17 #include <list>
18 #include <mitkPointSet.h>
19 #include <stack>
20 #include <string>
21 #include <vtkXMLParser.h>
22 
23 namespace mitk
24 {
35  class DEPRECATED() MITKLEGACYIO_EXPORT vtkPointSetXMLParser : public vtkXMLParser
36  {
37  public:
38  vtkTypeMacro(vtkPointSetXMLParser, vtkXMLParser);
39 
40  static vtkPointSetXMLParser *New();
41 
43 
44  typedef std::stack<std::string> ParseStack;
45 
46  typedef std::list<PointSetType::Pointer> PointSetList;
47 
49 
51 
52  int InitializeParser() override;
53  int CleanupParser() override;
58  void StartElement(const char *name, const char **atts) override;
59 
64  void EndElement(const char *name) override;
65 
72  void CharacterDataHandler(const char *inData, int inLength) override;
73 
77  virtual mitk::ScalarType ParseScalarType(const std::string &data);
78 
82  virtual PointIdentifier ParsePointIdentifier(const std::string &data);
83 
88  virtual PointSetList GetParsedPointSets();
89 
90  protected:
92  ~vtkPointSetXMLParser() override;
93 
100 
105 
111 
117 
118  std::string m_CurId;
119  std::string m_CurXString;
120  std::string m_CurYString;
121  std::string m_CurZString;
122 
128 
129  std::locale m_PreviousLocale;
130  };
131 }
132 #endif // _VTK_POINT_SET_XML_READER__H_
mitk::PointSet::PointIdentifier
DataType::PointIdentifier PointIdentifier
Definition: mitkPointSet.h:129
mitk::vtkPointSetXMLParser::PointIdentifier
PointSetType::DataType::PointIdentifier PointIdentifier
Definition: vtkPointSetXMLParser.h:48
mitk::vtkPointSetXMLParser
Implementation of the vtkXMLParser interface for reading mitk::PointSets.
Definition: vtkPointSetXMLParser.h:35
mitk::vtkPointSetXMLParser::m_CurXString
std::string m_CurXString
Definition: vtkPointSetXMLParser.h:119
mitk::vtkPointSetXMLParser::m_ParseStack
ParseStack m_ParseStack
Definition: vtkPointSetXMLParser.h:99
mitk::vtkPointSetXMLParser::PointSetList
std::list< PointSetType::Pointer > PointSetList
Definition: vtkPointSetXMLParser.h:46
DEPRECATED
#define DEPRECATED(func)
Definition: mitkCommon.h:175
itk::SmartPointer< Self >
MitkLegacyIOExports.h
mitk::vtkPointSetXMLParser::m_CurrentPointSet
PointSetType::Pointer m_CurrentPointSet
Definition: vtkPointSetXMLParser.h:110
mitk::vtkPointSetXMLParser::m_PointSetList
PointSetList m_PointSetList
Definition: vtkPointSetXMLParser.h:104
mitk::vtkPointSetXMLParser::m_CurYString
std::string m_CurYString
Definition: vtkPointSetXMLParser.h:120
mitkPointSet.h
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::Point< ScalarType, 3 >
mitk::vtkPointSetXMLParser::m_CurZString
std::string m_CurZString
Definition: vtkPointSetXMLParser.h:121
mitk::vtkPointSetXMLParser::m_CurId
std::string m_CurId
Definition: vtkPointSetXMLParser.h:118
mitk::vtkPointSetXMLParser::PointSetType
mitk::PointSet PointSetType
Definition: vtkPointSetXMLParser.h:42
mitk::vtkPointSetXMLParser::m_CurrentPointId
PointIdentifier m_CurrentPointId
Definition: vtkPointSetXMLParser.h:127
mitk::vtkPointSetXMLParser::m_PreviousLocale
std::locale m_PreviousLocale
Definition: vtkPointSetXMLParser.h:129
mitk::vtkPointSetXMLParser::ParseStack
std::stack< std::string > ParseStack
Definition: vtkPointSetXMLParser.h:44
MITKLEGACYIO_EXPORT
#define MITKLEGACYIO_EXPORT
Definition: MitkLegacyIOExports.h:15
mitk::vtkPointSetXMLParser::m_CurrentPoint
PointType m_CurrentPoint
Definition: vtkPointSetXMLParser.h:116
mitk::PointSet
Data structure which stores a set of points.
Definition: mitkPointSet.h:71
mitk::vtkPointSetXMLParser::PointType
PointSetType::PointType PointType
Definition: vtkPointSetXMLParser.h:50
mitk::ScalarType
double ScalarType
Definition: mitkNumericConstants.h:20