Orfeo Toolbox  3.16
itkLevelSetNode.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkLevelSetNode.h,v $
5  Language: C++
6  Date: $Date: 2009-02-05 19:05:00 $
7  Version: $Revision: 1.3 $
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 __itkLevelSetNode_h
18 #define __itkLevelSetNode_h
19 
20 #include "itkIndex.h"
21 #include "itkImage.h"
22 #include "itkVectorContainer.h"
23 #include "itkVector.h"
24 
25 namespace itk
26 {
27 
43 template<class TPixel, unsigned int VSetDimension = 2>
45 {
46 public:
48  typedef LevelSetNode Self;
49 
51  typedef TPixel PixelType;
52 
54  itkStaticConstMacro(SetDimension, unsigned int, VSetDimension);
55 
58 
60  bool operator> ( const Self& node ) const
61  { return m_Value > node.m_Value; }
62 
64  bool operator< ( const Self& node ) const
65  { return m_Value < node.m_Value; }
66 
68  bool operator<= ( const Self& node ) const
69  { return m_Value <= node.m_Value; }
70 
72  bool operator>= ( const Self& node ) const
73  { return m_Value >= node.m_Value; }
74 
77  Self& operator= ( const Self& rhs )
78  {
79  if( this == &rhs ) {return *this;}
80 
81  m_Value = rhs.m_Value;
82  m_Index = rhs.m_Index;
83  return *this;
84  }
85 
87  PixelType& GetValue()
88  { return m_Value; }
89  const PixelType& GetValue() const
90  { return m_Value; }
91  void SetValue( const PixelType& input )
92  { m_Value = input; }
93 
95  IndexType& GetIndex()
96  { return m_Index; }
97  const IndexType& GetIndex() const
98  { return m_Index; }
99  void SetIndex( const IndexType& input )
100  { m_Index = input; }
101 
103  LevelSetNode() : m_Value( NumericTraits<PixelType>::Zero )
104  {
105  m_Index.Fill( 0 );
106  }
107 
109  LevelSetNode(const Self &node) : m_Value( node.m_Value ), m_Index( node.m_Index ) {};
110 
111 private:
112  PixelType m_Value;
114 
115 };
116 
117 } // end namespace itk
118 
119 #endif

Generated at Sat Feb 2 2013 23:51:03 for Orfeo Toolbox with doxygen 1.8.1.1