ITK  6.0.0
Insight Toolkit
itkPolygonGroupSpatialObjectXMLFile.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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"
25
26namespace itk
27{
34class ITK_TEMPLATE_EXPORT PolygonGroupSpatialObjectXMLFileReader : public XMLReader<GroupSpatialObject<3>>
35{
36public:
37 ITK_DISALLOW_COPY_AND_MOVE(PolygonGroupSpatialObjectXMLFileReader);
38
43
45
49 using PolygonPointListType = std::vector<PolygonPointType>;
50
52 itkOverrideGetNameOfClassMacro(PolygonGroupSpatialObjectXMLFileReader);
53
55 itkNewMacro(Self);
56
57public:
59 int
60 CanReadFile(const char * name) override;
61
62protected:
65
66 void
67 StartElement(const char * name, const char ** atts) override;
68
69 void
70 EndElement(const char * name) override;
71
72 void
73 CharacterDataHandler(const char * inData, int inLength) override;
74
75private:
78 PolygonPointListType m_CurPointList{};
79 std::string m_CurCharacterData{};
80};
81
88class ITK_TEMPLATE_EXPORT PolygonGroupSpatialObjectXMLFileWriter : public XMLWriterBase<GroupSpatialObject<3>>
89{
90public:
91 ITK_DISALLOW_COPY_AND_MOVE(PolygonGroupSpatialObjectXMLFileWriter);
92
97
99 itkNewMacro(Self);
100
102 itkOverrideGetNameOfClassMacro(PolygonGroupSpatialObjectXMLFileWriter);
103
105
107
109 int
110 CanWriteFile(const char * name) override;
111
113 int
114 WriteFile() override;
115
116protected:
119};
120} // namespace itk
121#endif
Light weight base class for most itk classes.
Base class for most ITK classes.
Definition: itkObject.h:62
~PolygonGroupSpatialObjectXMLFileReader() override=default
int CanReadFile(const char *name) override
void CharacterDataHandler(const char *inData, int inLength) override
void EndElement(const char *name) override
void StartElement(const char *name, const char **atts) override
int CanWriteFile(const char *name) override
~PolygonGroupSpatialObjectXMLFileWriter() override=default
template base class for an XMLReader Its purpose really is just to define the simple interface for ex...
Definition: itkXMLFile.h:101
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....