ITK  4.3.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);
58 
59 protected:
62 
63  virtual void StartElement(const char *name, const char **atts);
64 
65  virtual void EndElement(const char *name);
66 
67  virtual void CharacterDataHandler(const char *inData, int inLength);
68 
69 private:
70  PolygonGroupSpatialObjectXMLFileReader(const Self &); //purposely not
71  // implemented
72  void operator=(const Self &); //purposely not
73  // implemented
74 
78  std::string m_CurCharacterData;
79 };
80 
88  public XMLWriterBase< PGroupSpatialObjectType >
89 {
90 public:
95 
97  itkNewMacro(Self);
98 
104 
106  virtual int CanWriteFile(const char *name);
107 
109  virtual int WriteFile();
110 
111 protected:
114 
115 private:
116  PolygonGroupSpatialObjectXMLFileWriter(const Self &); //purposely not
117  // implemented
118  void operator=(const Self &); //purposely not
119  // implemented
120 };
121 }
122 #endif
123