ITK
6.0.0
Insight Toolkit
ITK
Modules
IO
SpatialObjects
include
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
"
23
#include "
itkGroupSpatialObject.h
"
24
#include "
itkPolygonSpatialObject.h
"
25
26
namespace
itk
27
{
34
class
ITK_TEMPLATE_EXPORT
PolygonGroupSpatialObjectXMLFileReader
:
public
XMLReader
<GroupSpatialObject<3>>
35
{
36
public
:
37
ITK_DISALLOW_COPY_AND_MOVE(
PolygonGroupSpatialObjectXMLFileReader
);
38
40
using
Self
=
PolygonGroupSpatialObjectXMLFileReader
;
41
using
Superclass
=
XMLReader<GroupSpatialObject<3>
>;
42
using
Pointer
=
SmartPointer<Self>
;
43
44
using
GroupSpatialObjectType
=
GroupSpatialObject<3>
;
45
46
using
GroupType
=
GroupSpatialObjectType
;
47
using
PolygonSpatialObjectType
=
PolygonSpatialObject<3>
;
48
using
PolygonPointType
=
SpatialObjectPoint<3>
;
49
using
PolygonPointListType
= std::vector<PolygonPointType>;
50
52
itkOverrideGetNameOfClassMacro(
PolygonGroupSpatialObjectXMLFileReader
);
53
55
itkNewMacro(
Self
);
56
57
public
:
59
int
60
CanReadFile(
const
char
* name)
override
;
61
62
protected
:
63
PolygonGroupSpatialObjectXMLFileReader
() =
default
;
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
:
76
GroupSpatialObjectType::Pointer
m_Group{};
77
PolygonSpatialObjectType::Pointer
m_CurPoly{};
78
PolygonPointListType
m_CurPointList{};
79
std::string m_CurCharacterData{};
80
};
81
88
class
ITK_TEMPLATE_EXPORT
PolygonGroupSpatialObjectXMLFileWriter
:
public
XMLWriterBase
<GroupSpatialObject<3>>
89
{
90
public
:
91
ITK_DISALLOW_COPY_AND_MOVE(
PolygonGroupSpatialObjectXMLFileWriter
);
92
94
using
Superclass
=
XMLWriterBase<GroupSpatialObject<3>
>;
95
using
Self
=
PolygonGroupSpatialObjectXMLFileWriter
;
96
using
Pointer
=
SmartPointer<Self>
;
97
99
itkNewMacro(
Self
);
100
102
itkOverrideGetNameOfClassMacro(
PolygonGroupSpatialObjectXMLFileWriter
);
103
104
using
GroupType
=
GroupSpatialObject<3>
;
105
106
using
PolygonSpatialObjectType
=
PolygonSpatialObject<3>
;
107
109
int
110
CanWriteFile(
const
char
* name)
override
;
111
113
int
114
WriteFile()
override
;
115
116
protected
:
117
PolygonGroupSpatialObjectXMLFileWriter
() =
default
;
118
~
PolygonGroupSpatialObjectXMLFileWriter
()
override
=
default
;
119
};
120
}
// namespace itk
121
#endif
itkPolygonSpatialObject.h
itk::PolygonGroupSpatialObjectXMLFileReader::PolygonPointListType
std::vector< PolygonPointType > PolygonPointListType
Definition:
itkPolygonGroupSpatialObjectXMLFile.h:49
itkXMLFile.h
itk::PolygonSpatialObject
TODO.
Definition:
itkPolygonSpatialObject.h:32
itk::SmartPointer< Self >
itk::LightObject
Light weight base class for most itk classes.
Definition:
itkLightObject.h:55
itkGroupSpatialObject.h
itk::XMLWriterBase
Definition:
itkXMLFile.h:145
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition:
itkAnatomicalOrientation.h:29
itk::Object
Base class for most ITK classes.
Definition:
itkObject.h:61
itk::XMLReader
template base class for an XMLReader Its purpose really is just to define the simple interface for ex...
Definition:
itkXMLFile.h:100
itk::GroupSpatialObject< 3 >
itk::PolygonGroupSpatialObjectXMLFileReader
Definition:
itkPolygonGroupSpatialObjectXMLFile.h:34
itk::PolygonGroupSpatialObjectXMLFileWriter
Definition:
itkPolygonGroupSpatialObjectXMLFile.h:88
itk::SpatialObjectPoint
Point used for spatial objects.
Definition:
itkSpatialObjectPoint.h:44
Generated on
unknown
for ITK by
1.8.16