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

itkNeighborhoodOperatorImageFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkNeighborhoodOperatorImageFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-02-06 20:53:13 $
00007   Version:   $Revision: 1.9 $
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 __itkNeighborhoodOperatorImageFunction_h
00018 #define __itkNeighborhoodOperatorImageFunction_h
00019 
00020 #include "itkImageFunction.h"
00021 #include "itkNeighborhood.h"
00022 
00023 namespace itk
00024 {
00025 
00035 template <class TInputImage,class TOutput>
00036 class ITK_EXPORT NeighborhoodOperatorImageFunction :
00037   public ImageFunction< TInputImage, TOutput >
00038 {
00039 public:
00040 
00042   typedef NeighborhoodOperatorImageFunction Self;
00043 
00045   typedef ImageFunction<TInputImage, TOutput> Superclass;
00046 
00048   typedef SmartPointer<Self>        Pointer;
00049   typedef SmartPointer<const Self>  ConstPointer;
00050 
00052   itkNewMacro(Self);
00053 
00055   typedef TInputImage                                     InputImageType;
00056   typedef typename InputImageType::PixelType              InputPixelType;
00057   typedef typename Superclass::IndexType                  IndexType;
00058   typedef typename Superclass::ContinuousIndexType        ContinuousIndexType;
00059 
00061   itkTypeMacro( NeighborhoodOperatorImageFunction, ImageFunction );
00062 
00063 
00065   itkStaticConstMacro(ImageDimension, unsigned int,
00066                       InputImageType::ImageDimension);
00067 
00068   typedef Neighborhood<TOutput, itkGetStaticConstMacro(ImageDimension)> NeighborhoodType;
00069 
00071   typedef typename Superclass::PointType PointType;
00072 
00074   //virtual void SetInputImage( InputImageType * ptr );
00075 
00079   void SetOperator(const NeighborhoodType &p) const
00080     {
00081     m_Operator = p;
00082     this->Modified();
00083     }
00085 
00088   virtual TOutput Evaluate(const PointType& ) const 
00089     {
00090     std::cout << "NeighborhoodOperatorImageFunction::Evaluate(): Not implemented!" << std::endl;
00091     TOutput out;
00092     out = 0;
00093     return out;
00094     }
00095 
00097   virtual TOutput EvaluateAtIndex( const IndexType & index ) const;
00098 
00101   virtual TOutput EvaluateAtContinuousIndex( 
00102     const ContinuousIndexType &  ) const 
00103     {
00104     std::cout << "NeighborhoodOperatorImageFunction::EvaluateAtContinuousIndex():Not implemented!" << std::endl;
00105     TOutput out;
00106     out = 0;
00107     return out;
00108     }
00110 
00111 protected:
00112   NeighborhoodOperatorImageFunction();
00113   NeighborhoodOperatorImageFunction( const Self& ){};
00114 
00115   ~NeighborhoodOperatorImageFunction(){};
00116 
00117   void operator=( const Self& ){};
00118   void PrintSelf(std::ostream& os, Indent indent) const;
00119 
00120 private:
00121 
00122   mutable NeighborhoodType m_Operator;
00123 
00124 };
00125 
00126 } // end namespace itk
00127 
00128 
00129 // Define instantiation macro for this template.
00130 #define ITK_TEMPLATE_NeighborhoodOperatorImageFunction(_, EXPORT, x, y) namespace itk { \
00131   _(2(class EXPORT NeighborhoodOperatorImageFunction< ITK_TEMPLATE_2 x >)) \
00132   namespace Templates { typedef NeighborhoodOperatorImageFunction< ITK_TEMPLATE_2 x > \
00133                                   NeighborhoodOperatorImageFunction##y; } \
00134   }
00135 
00136 #if ITK_TEMPLATE_EXPLICIT
00137 # include "Templates/itkNeighborhoodOperatorImageFunction+-.h"
00138 #endif
00139 
00140 #if ITK_TEMPLATE_TXX
00141 # include "itkNeighborhoodOperatorImageFunction.txx"
00142 #endif
00143 
00144 /*
00145 #ifndef ITK_MANUAL_INSTANTIATION
00146 #include "itkNeighborhoodOperatorImageFunction.txx"
00147 #endif
00148 */
00149 
00150 #endif
00151 

Generated at Fri Apr 16 19:11:02 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000