ITK  4.13.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:
61  virtual ~PolygonGroupSpatialObjectXMLFileReader() ITK_OVERRIDE {}
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  ITK_DISALLOW_COPY_AND_ASSIGN(PolygonGroupSpatialObjectXMLFileReader);
71 
75  std::string m_CurCharacterData;
76 };
77 
85  public XMLWriterBase< PGroupSpatialObjectType >
86 {
87 public:
92 
94  itkNewMacro(Self);
95 
101 
103  virtual int CanWriteFile(const char *name) ITK_OVERRIDE;
104 
106  virtual int WriteFile() ITK_OVERRIDE;
107 
108 protected:
110  virtual ~PolygonGroupSpatialObjectXMLFileWriter() ITK_OVERRIDE {}
111 
112 private:
113  ITK_DISALLOW_COPY_AND_ASSIGN(PolygonGroupSpatialObjectXMLFileWriter);
114 };
115 }
116 #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:92
Point used for spatial objets.
virtual void CharacterDataHandler(const char *inData, int inLength) override
virtual void EndElement(const char *name) override
virtual int CanWriteFile(const char *name) override