00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkLabelObjectLine.h,v $ 00005 Language: C++ 00006 Date: $Date: 2009-05-13 19:05:59 $ 00007 Version: $Revision: 1.3 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkLabelObjectLine_h 00018 #define __itkLabelObjectLine_h 00019 00020 #include "itkIndex.h" 00021 #include "itkIndent.h" 00022 00023 namespace itk 00024 { 00025 00040 template < unsigned int VImageDimension > 00041 class LabelObjectLine 00042 { 00043 public: 00044 itkStaticConstMacro(ImageDimension, unsigned int, VImageDimension); 00045 00046 typedef Index< VImageDimension > IndexType; 00047 typedef unsigned long LengthType; 00048 00049 LabelObjectLine() {}; 00050 virtual ~LabelObjectLine() {}; 00051 LabelObjectLine( const IndexType & idx, const LengthType & length ); 00052 00053 // 00054 // Set/Get Index 00055 // 00056 void SetIndex( const IndexType & idx ); 00057 IndexType & GetIndex(); 00058 const IndexType & GetIndex() const; 00059 00060 // 00061 // SetGet Length 00062 // 00063 void SetLength( const LengthType length ); 00064 LengthType & GetLength(); 00065 const LengthType & GetLength() const; 00066 00067 // 00068 // Check for index 00069 // 00070 bool HasIndex( const IndexType idx ) const; 00071 bool IsNextIndex( const IndexType & idx ) const; 00072 00074 void Print(std::ostream& os, Indent indent=0) const; 00075 00076 protected: 00081 virtual void PrintSelf(std::ostream& os, Indent indent) const; 00082 virtual void PrintHeader(std::ostream& os, Indent indent) const; 00083 virtual void PrintTrailer(std::ostream& os, Indent indent) const; 00085 00086 private: 00087 IndexType m_Index; 00088 LengthType m_Length; 00089 }; 00090 00091 } // end namespace itk 00092 00093 #ifndef ITK_MANUAL_INSTANTIATION 00094 #include "itkLabelObjectLine.txx" 00095 #endif 00096 00097 #endif 00098