Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkPath.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkPath.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004/12/05 04:16:33 $
00007   Version:   $Revision: 1.7 $
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 
00018 #ifndef _itkPath_h
00019 #define _itkPath_h
00020 
00021 //#include "itkFunctionBase.h"
00022 #include "itkDataObject.h"
00023 #include "itkIndex.h"
00024 #include "itkOffset.h"
00025 #include "itkNumericTraits.h"
00026 
00027 namespace itk
00028 {
00029 
00030 
00050 template <class TInput, class TOutput, unsigned int VDimension>
00051 class ITK_EXPORT Path : public DataObject
00052 {
00053 public:
00055   typedef Path                      Self;
00056   typedef DataObject                Superclass;
00057   typedef SmartPointer<Self>        Pointer;
00058   typedef SmartPointer<const Self>  ConstPointer;
00059   
00061   itkTypeMacro(Path, FunctionBase);
00062   
00064   typedef TInput  InputType;
00065   
00067   typedef TOutput OutputType;
00068   
00069   
00071   typedef Index<  VDimension >  IndexType;
00072   typedef Offset< VDimension >  OffsetType;
00073 
00074 
00078   virtual inline InputType StartOfInput() const
00079     {
00080     return NumericTraits<InputType>::Zero;
00081     }
00082 
00085   virtual inline InputType EndOfInput() const
00086     {
00087     return NumericTraits<InputType>::One;
00088     }
00089   
00092   virtual OutputType Evaluate( const InputType & input ) const = 0;
00093   
00095   virtual IndexType EvaluateToIndex( const InputType & input ) const = 0;
00096 
00105   virtual OffsetType IncrementInput(InputType & input) const = 0;
00106   
00107   
00108 protected:
00109   Path();
00110   ~Path(){}
00111 
00112   void PrintSelf(std::ostream& os, Indent indent) const;
00113 
00114   itkGetConstMacro(ZeroOffset,OffsetType);
00115   itkGetConstMacro(ZeroIndex,IndexType);
00116 
00117 private:
00118   Path(const Self&); //purposely not implemented
00119   void operator=(const Self&); //purposely not implemented
00120   
00121   // These "constants" are initialized in the constructor
00122   OffsetType  m_ZeroOffset; // = 0 for all dimensions
00123   IndexType   m_ZeroIndex;  // = 0 for all dimensions
00124   
00125 };
00126 
00127 } // namespace itk
00128 
00129 #ifndef ITK_MANUAL_INSTANTIATION
00130 #include "itkPath.txx"
00131 #endif
00132   
00133 #endif

Generated at Wed May 24 23:49:32 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000