ITK  4.9.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 
23 #include "itkXMLFile.h"
24 namespace itk
25 {
26 /* 3D Polygon Groups only ones that make sense for this data type */
28 
36  public XMLReader< PGroupSpatialObjectType >
37 {
38 public:
43 
47  typedef std::vector< PointType > PointListType;
48 
51 
53  itkNewMacro(Self);
54 
55 public:
57  virtual int CanReadFile(const char *name) ITK_OVERRIDE;
58 
59 protected:
62 
63  virtual void StartElement(const char *name, const char **atts) ITK_OVERRIDE;
64 
65  virtual void EndElement(const char *name) ITK_OVERRIDE;
66 
67  virtual void CharacterDataHandler(const char *inData, int inLength) ITK_OVERRIDE;
68 
69 private:
70  PolygonGroupSpatialObjectXMLFileReader(const Self &) ITK_DELETE_FUNCTION;
71  void operator=(const Self &) ITK_DELETE_FUNCTION;
72 
76  std::string m_CurCharacterData;
77 };
78 
87 {
88 public:
93 
95  itkNewMacro(Self);
96 
100  typedef PGroupSpatialObjectType PolygonGroupType;
102 
104  virtual int CanWriteFile(const char *name) ITK_OVERRIDE;
105 
107  virtual int WriteFile() ITK_OVERRIDE;
108 
109 protected:
112 
113 private:
114  PolygonGroupSpatialObjectXMLFileWriter(const Self &) ITK_DELETE_FUNCTION;
115  void operator=(const Self &) ITK_DELETE_FUNCTION;
116 };
117 }
118 #endif
Light weight base class for most itk classes.
virtual int CanReadFile(const char *name) override
virtual void StartElement(const char *name, const char **atts) override
PolygonGroupSpatialObject< 3 > PGroupSpatialObjectType
Implements a Region Of Interest Type.
template base class for an XMLReader It&#39;s purpose really is just to define the simple interface for e...
Definition: itkXMLFile.h:93
Point used for spatial objets.
virtual void CharacterDataHandler(const char *inData, int inLength) override
virtual void EndElement(const char *name) override