ITK
4.2.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Core
SpatialObjects
include
itkSpatialObjectPoint.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 __itkSpatialObjectPoint_h
19
#define __itkSpatialObjectPoint_h
20
21
#include "
itkPoint.h
"
22
#include "vnl/vnl_vector_fixed.h"
23
#include "
itkRGBAPixel.h
"
24
25
namespace
itk
26
{
36
template
<
unsigned
int
TPo
int
Dimension = 3 >
37
class
ITK_EXPORT
SpatialObjectPoint
38
{
39
public
:
40
43
SpatialObjectPoint
(
void
);
44
46
virtual
~
SpatialObjectPoint
(
void
);
47
48
typedef
SpatialObjectPoint
Self
;
49
typedef
Point< double, TPointDimension >
PointType
;
50
typedef
vnl_vector< double >
VectorType
;
51
typedef
RGBAPixel< float >
PixelType
;
52
typedef
PixelType
ColorType
;
53
55
int
GetID(
void
)
const
;
56
58
void
SetID(
const
int
newID);
59
61
const
PointType
& GetPosition(
void
)
const
;
62
64
void
SetPosition(
const
PointType
& newX);
65
66
void
SetPosition(
const
double
x0,
const
double
x1);
67
68
void
SetPosition(
const
double
x0,
const
double
x1,
const
double
x2);
69
71
Self
& operator=(
const
SpatialObjectPoint
& rhs);
72
74
const
PixelType
& GetColor(
void
)
const
;
75
76
void
SetColor(
const
PixelType
& color);
77
78
void
SetColor(
float
r,
float
g,
float
b,
float
a = 1);
79
81
void
SetRed(
float
r);
82
83
float
GetRed(
void
)
const
;
84
86
void
SetGreen(
float
g);
87
88
float
GetGreen(
void
)
const
;
89
91
void
SetBlue(
float
b);
92
93
float
GetBlue(
void
)
const
;
94
96
void
SetAlpha(
float
a);
97
98
float
GetAlpha(
void
)
const
;
99
101
void
Print(std::ostream & os)
const
;
102
103
protected
:
104
106
virtual
void
PrintSelf(std::ostream & os,
Indent
indent)
const
;
107
109
int
m_ID
;
110
112
PointType
m_X
;
113
115
PixelType
m_Color
;
116
};
117
}
// end of namespace itk
118
119
#ifndef ITK_MANUAL_INSTANTIATION
120
#include "itkSpatialObjectPoint.hxx"
121
#endif
122
123
#endif // __itkSpatialObjectPoint_h
124
Generated on Tue Jul 10 2012 23:44:56 for ITK by
1.8.1