Orfeo Toolbox
3.16
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
OTB
Utilities
ITK
Code
Review
itkLabelObject.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Insight Segmentation & Registration Toolkit
4
Module: $RCSfile: itkLabelObject.h,v $
5
Language: C++
6
Date: $Date: 2009-08-06 18:07:04 $
7
Version: $Revision: 1.6 $
8
9
Copyright (c) Insight Software Consortium. All rights reserved.
10
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12
This software is distributed WITHOUT ANY WARRANTY; without even
13
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14
PURPOSE. See the above copyright notices for more information.
15
16
=========================================================================*/
17
#ifndef __itkLabelObject_h
18
#define __itkLabelObject_h
19
20
#include <deque>
21
#include "
itkLightObject.h
"
22
#include "
itkLabelObjectLine.h
"
23
#include "
itkWeakPointer.h
"
24
#include "
itkObjectFactory.h
"
25
26
namespace
itk
27
{
28
54
template
<
class
TLabel,
unsigned
int
VImageDimension >
55
class
ITK_EXPORT
LabelObject
:
public
LightObject
56
{
57
public
:
59
typedef
LabelObject
Self
;
60
typedef
LightObject
Superclass
;
61
typedef
Self
LabelObjectType
;
62
typedef
SmartPointer<Self>
Pointer
;
63
typedef
SmartPointer<const Self>
ConstPointer
;
64
typedef
WeakPointer<const Self>
ConstWeakPointer
;
65
67
itkNewMacro(
Self
);
68
70
itkTypeMacro(
LabelObject
,
LightObject
);
71
72
itkStaticConstMacro(ImageDimension,
unsigned
int
, VImageDimension);
73
74
typedef
Index< VImageDimension >
IndexType
;
75
typedef
TLabel
LabelType
;
76
typedef
LabelObjectLine< VImageDimension >
LineType
;
77
typedef
typename
LineType::LengthType
LengthType
;
78
typedef
typename
std::deque< LineType >
LineContainerType
;
79
typedef
unsigned
int
AttributeType
;
80
typedef
unsigned
long
SizeValueType
;
81
82
itkStaticConstMacro(LABEL,
AttributeType
, 0);
83
84
static
AttributeType
GetAttributeFromName(
const
std::string & s );
85
static
std::string GetNameFromAttribute(
const
AttributeType
& a );
86
90
const
LabelType
& GetLabel()
const
;
91
void
SetLabel(
const
LabelType
& label );
92
97
bool
HasIndex(
const
IndexType
& idx )
const
;
98
103
void
AddIndex(
const
IndexType
& idx );
104
108
void
AddLine(
const
IndexType
& idx,
const
LengthType
& length );
109
113
void
AddLine(
const
LineType
& line );
114
116
const
LineContainerType
& GetLineContainer()
const
;
117
118
LineContainerType
& GetLineContainer();
119
120
void
SetLineContainer(
const
LineContainerType
& lineContainer );
121
122
SizeValueType
GetNumberOfLines()
const
;
123
124
const
LineType
& GetLine(
SizeValueType
i )
const
;
125
126
LineType
& GetLine(
SizeValueType
i );
127
128
SizeValueType
Size
()
const
;
129
130
bool
Empty()
const
;
131
132
IndexType
GetIndex(
SizeValueType
offset )
const
;
133
135
virtual
void
CopyAttributesFrom(
const
Self
* src );
136
138
void
CopyAllFrom(
const
Self
* src );
139
143
void
Optimize();
144
145
protected
:
146
LabelObject
();
147
void
PrintSelf(std::ostream& os,
Indent
indent)
const
;
148
149
private
:
150
LabelObject
(
const
Self
&);
//purposely not implemented
151
void
operator=(
const
Self
&);
//purposely not implemented
152
153
LineContainerType
m_LineContainer
;
154
LabelType
m_Label
;
155
};
156
157
}
// end namespace itk
158
159
#ifndef ITK_MANUAL_INSTANTIATION
160
#include "
itkLabelObject.txx
"
161
#endif
162
163
#endif
Generated at Sat May 11 2013 23:51:54 for
Orfeo Toolbox
with
doxygen 1.8.3.1