Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkLevelSetNode_h
00018 #define __itkLevelSetNode_h
00019
00020 #include "itkIndex.h"
00021 #include "itkImage.h"
00022 #include "itkVectorContainer.h"
00023 #include "itkVector.h"
00024
00025 namespace itk
00026 {
00027
00043 template<class TPixel, unsigned int VSetDimension = 2>
00044 class ITK_EXPORT LevelSetNode
00045 {
00046 public:
00047
00049 typedef LevelSetNode Self;
00050
00052 typedef TPixel PixelType;
00053
00055 itkStaticConstMacro(SetDimension, unsigned int, VSetDimension);
00056
00058 typedef Index<VSetDimension> IndexType;
00059
00061 bool operator> ( const Self& node ) const
00062 { return m_Value > node.m_Value; }
00063
00065 bool operator< ( const Self& node ) const
00066 { return m_Value < node.m_Value; }
00067
00069 bool operator<= ( const Self& node ) const
00070 { return m_Value <= node.m_Value; }
00071
00073 bool operator>= ( const Self& node ) const
00074 { return m_Value >= node.m_Value; }
00075
00078 Self& operator= ( const Self& rhs )
00079 {
00080 if( this == &rhs ) {return *this;}
00081
00082 m_Value = rhs.m_Value;
00083 m_Index = rhs.m_Index;
00084 return *this;
00085 }
00086
00088 PixelType& GetValue()
00089 { return m_Value; }
00090 const PixelType& GetValue() const
00091 { return m_Value; }
00092 void SetValue( const PixelType& input )
00093 { m_Value = input; }
00095
00097 IndexType& GetIndex()
00098 { return m_Index; }
00099 const IndexType& GetIndex() const
00100 { return m_Index; }
00101 void SetIndex( const IndexType& input )
00102 { m_Index = input; }
00104
00106 LevelSetNode() : m_Value( NumericTraits<PixelType>::Zero )
00107 {
00108 m_Index.Fill( 0 );
00109 }
00110
00112 LevelSetNode(const Self &node) : m_Value( node.m_Value ), m_Index( node.m_Index ) {};
00113
00114 private:
00115 PixelType m_Value;
00116 IndexType m_Index;
00117
00118 };
00119
00120 }
00121
00122 #endif
00123