Orfeo Toolbox  4.0
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< typename TPixel, unsigned int VSetDimension = 2 >
46 {
47 public:
49  typedef LevelSetNode Self;
50 
52  typedef TPixel PixelType;
53 
55  itkStaticConstMacro(SetDimension, unsigned int, VSetDimension);
56 
59 
61  bool operator>(const Self & node) const
62  { return m_Value > node.m_Value; }
63 
65  bool operator<(const Self & node) const
66  { return m_Value < node.m_Value; }
67 
69  bool operator<=(const Self & node) const
70  { return m_Value <= node.m_Value; }
71 
73  bool operator>=(const Self & node) const
74  { return m_Value >= node.m_Value; }
75 
78  Self & operator=(const Self & rhs)
79  {
80  if ( this != &rhs )
81  {
82  m_Value = rhs.m_Value;
83  m_Index = rhs.m_Index;
84  }
85  return *this;
86  }
87 
90  { return m_Value; }
91  const PixelType & GetValue() const
92  { return m_Value; }
93  void SetValue(const PixelType & input)
94  { m_Value = input; }
95 
98  { return m_Index; }
99  const IndexType & GetIndex() const
100  { return m_Index; }
101  void SetIndex(const IndexType & input)
102  { m_Index = input; }
103 
106  {
107  m_Index.Fill(0);
108  }
109 
111  LevelSetNode(const Self & node):m_Value(node.m_Value), m_Index(node.m_Index) {}
112 
113 private:
116 };
117 } // end namespace itk
118 
119 #endif

Generated at Sat Mar 8 2014 15:09:11 for Orfeo Toolbox with doxygen 1.8.3.1