ITK  5.2.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  * 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 {
34 class PolygonGroupSpatialObjectXMLFileReader : public XMLReader<GroupSpatialObject<3>>
35 {
36 public:
37  ITK_DISALLOW_COPY_AND_MOVE(PolygonGroupSpatialObjectXMLFileReader);
38 
43 
45 
49  using PolygonPointListType = std::vector<PolygonPointType>;
50 
53 
55  itkNewMacro(Self);
56 
57 public:
59  int
60  CanReadFile(const char * name) override;
61 
62 protected:
64  ~PolygonGroupSpatialObjectXMLFileReader() override = default;
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 
75 private:
79  std::string m_CurCharacterData;
80 };
81 
88 class PolygonGroupSpatialObjectXMLFileWriter : public XMLWriterBase<GroupSpatialObject<3>>
89 {
90 public:
91  ITK_DISALLOW_COPY_AND_MOVE(PolygonGroupSpatialObjectXMLFileWriter);
92 
97 
99  itkNewMacro(Self);
100 
103 
105 
107 
109  int
110  CanWriteFile(const char * name) override;
111 
113  int
114  WriteFile() override;
115 
116 protected:
118  ~PolygonGroupSpatialObjectXMLFileWriter() override = default;
119 };
120 } // namespace itk
121 #endif
itk::PolygonGroupSpatialObjectXMLFileReader::CharacterDataHandler
void CharacterDataHandler(const char *inData, int inLength) override
itkPolygonSpatialObject.h
itk::PolygonGroupSpatialObjectXMLFileReader::PolygonPointListType
std::vector< PolygonPointType > PolygonPointListType
Definition: itkPolygonGroupSpatialObjectXMLFile.h:49
itkXMLFile.h
itk::PolygonGroupSpatialObjectXMLFileWriter::PolygonGroupSpatialObjectXMLFileWriter
PolygonGroupSpatialObjectXMLFileWriter()=default
itk::PolygonSpatialObject
TODO.
Definition: itkPolygonSpatialObject.h:32
itk::SmartPointer< Self >
itk::PolygonGroupSpatialObjectXMLFileReader::GroupSpatialObjectType
GroupSpatialObject< 3 > GroupSpatialObjectType
Definition: itkPolygonGroupSpatialObjectXMLFile.h:44
itk::PolygonGroupSpatialObjectXMLFileWriter::~PolygonGroupSpatialObjectXMLFileWriter
~PolygonGroupSpatialObjectXMLFileWriter() override=default
itk::PolygonGroupSpatialObjectXMLFileReader::EndElement
void EndElement(const char *name) override
itk::PolygonGroupSpatialObjectXMLFileReader::CanReadFile
int CanReadFile(const char *name) override
itk::PolygonGroupSpatialObjectXMLFileReader::m_CurPointList
PolygonPointListType m_CurPointList
Definition: itkPolygonGroupSpatialObjectXMLFile.h:78
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itkGroupSpatialObject.h
itk::XMLWriterBase
Definition: itkXMLFile.h:145
itk::PolygonGroupSpatialObjectXMLFileReader::~PolygonGroupSpatialObjectXMLFileReader
~PolygonGroupSpatialObjectXMLFileReader() override=default
itk::PolygonGroupSpatialObjectXMLFileReader::m_CurPoly
PolygonSpatialObjectType::Pointer m_CurPoly
Definition: itkPolygonGroupSpatialObjectXMLFile.h:77
itk::PolygonGroupSpatialObjectXMLFileReader::m_Group
GroupSpatialObjectType::Pointer m_Group
Definition: itkPolygonGroupSpatialObjectXMLFile.h:76
itk::PolygonGroupSpatialObjectXMLFileWriter::WriteFile
int WriteFile() override
itk::PolygonGroupSpatialObjectXMLFileWriter::CanWriteFile
int CanWriteFile(const char *name) override
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::XMLReader
template base class for an XMLReader It's purpose really is just to define the simple interface for e...
Definition: itkXMLFile.h:100
itk::PolygonGroupSpatialObjectXMLFileReader::m_CurCharacterData
std::string m_CurCharacterData
Definition: itkPolygonGroupSpatialObjectXMLFile.h:79
itk::PolygonGroupSpatialObjectXMLFileReader::PolygonGroupSpatialObjectXMLFileReader
PolygonGroupSpatialObjectXMLFileReader()=default
itk::GroupSpatialObject< 3 >
itk::PolygonGroupSpatialObjectXMLFileReader
Definition: itkPolygonGroupSpatialObjectXMLFile.h:34
itk::PolygonGroupSpatialObjectXMLFileReader::StartElement
void StartElement(const char *name, const char **atts) override
itk::PolygonGroupSpatialObjectXMLFileWriter
Definition: itkPolygonGroupSpatialObjectXMLFile.h:88
itk::SpatialObjectPoint
Point used for spatial objets.
Definition: itkSpatialObjectPoint.h:44