ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkPolygonGroupSpatialObjectXMLFile.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkPolygonGroupSpatialObjectXMLFile_h
19 #define itkPolygonGroupSpatialObjectXMLFile_h
20 
21 
22 #include "itkXMLFile.h"
23 #include "itkGroupSpatialObject.h"
25 
26 namespace itk
27 {
35  public XMLReader< GroupSpatialObject< 3 > >
36 {
37 public:
38  ITK_DISALLOW_COPY_AND_ASSIGN(PolygonGroupSpatialObjectXMLFileReader);
39 
44 
46 
50  using PolygonPointListType = std::vector< PolygonPointType >;
51 
54 
56  itkNewMacro(Self);
57 
58 public:
60  int CanReadFile(const char *name) override;
61 
62 protected:
64  ~PolygonGroupSpatialObjectXMLFileReader() override = default;
65 
66  void StartElement(const char *name, const char **atts) override;
67 
68  void EndElement(const char *name) override;
69 
70  void CharacterDataHandler(const char *inData, int inLength) override;
71 
72 private:
76  std::string m_CurCharacterData;
77 };
78 
86  public XMLWriterBase< GroupSpatialObject<3> >
87 {
88 public:
89  ITK_DISALLOW_COPY_AND_ASSIGN(PolygonGroupSpatialObjectXMLFileWriter);
90 
95 
97  itkNewMacro(Self);
98 
102 
104 
106 
108  int CanWriteFile(const char *name) override;
109 
111  int WriteFile() override;
112 
113 protected:
115  ~PolygonGroupSpatialObjectXMLFileWriter() override = default;
116 };
117 }
118 #endif
Light weight base class for most itk classes.
void EndElement(const char *name) override
int CanReadFile(const char *name) override
void StartElement(const char *name, const char **atts) override
int CanWriteFile(const char *name) override
void CharacterDataHandler(const char *inData, int inLength) override
template base class for an XMLReader It&#39;s purpose really is just to define the simple interface for e...
Definition: itkXMLFile.h:91
Point used for spatial objets.
~PolygonGroupSpatialObjectXMLFileWriter() override=default
Base class for most ITK classes.
Definition: itkObject.h:60
~PolygonGroupSpatialObjectXMLFileReader() override=default