ITK
4.4.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Filtering
FastMarching
include
itkLevelSetNode.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 __itkLevelSetNode_h
19
#define __itkLevelSetNode_h
20
21
#include "
itkIndex.h
"
22
#include "
itkImage.h
"
23
#include "
itkVectorContainer.h
"
24
#include "
itkVector.h
"
25
26
namespace
itk
27
{
44
template
<
class
TPixel,
unsigned
int
VSetDimension = 2 >
45
class
ITK_EXPORT
LevelSetNode
46
{
47
public
:
48
50
typedef
LevelSetNode
Self
;
51
53
typedef
TPixel
PixelType
;
54
56
itkStaticConstMacro(SetDimension,
unsigned
int
, VSetDimension);
57
59
typedef
Index< VSetDimension >
IndexType
;
60
62
bool
operator>(
const
Self
& node)
const
63
{
return
m_Value > node.
m_Value
; }
64
66
bool
operator<(
const
Self
& node)
const
67
{
return
m_Value < node.
m_Value
; }
68
70
bool
operator<=(
const
Self
& node)
const
71
{
return
m_Value <= node.
m_Value
; }
72
74
bool
operator>=(
const
Self
& node)
const
75
{
return
m_Value >= node.
m_Value
; }
76
79
Self
& operator=(
const
Self
& rhs)
80
{
81
if
(
this
!= &rhs )
82
{
83
m_Value = rhs.
m_Value
;
84
m_Index = rhs.
m_Index
;
85
}
86
return
*
this
;
87
}
89
91
PixelType
& GetValue()
92
{
return
m_Value; }
93
const
PixelType
& GetValue()
const
94
{
return
m_Value; }
95
void
SetValue(
const
PixelType
& input)
96
{ m_Value = input; }
98
100
IndexType
& GetIndex()
101
{
return
m_Index; }
102
const
IndexType
& GetIndex()
const
103
{
return
m_Index; }
104
void
SetIndex(
const
IndexType
& input)
105
{ m_Index = input; }
107
109
LevelSetNode
():m_Value(
NumericTraits
<
PixelType
>::Zero)
110
{
111
m_Index.Fill(0);
112
}
113
115
LevelSetNode
(
const
Self
& node):m_Value(node.m_Value), m_Index(node.m_Index) {}
116
117
private
:
118
PixelType
m_Value
;
119
IndexType
m_Index
;
120
};
121
}
// end namespace itk
122
123
#endif
124
Generated on Mon May 13 2013 00:59:52 for ITK by
1.8.3.1