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

itkVarianceImageFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVarianceImageFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:57:13 $
00007   Version:   $Revision: 1.4 $
00008 
00009   Copyright (c) 2002 Insight 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 _itkVarianceImageFunction_h
00018 #define _itkVarianceImageFunction_h
00019 
00020 #include "itkImageFunction.h"
00021 #include "itkNumericTraits.h"
00022 
00023 namespace itk
00024 {
00025 
00041 template <class TInputImage, class TCoordRep = float >
00042 class ITK_EXPORT VarianceImageFunction :
00043   public ImageFunction< TInputImage, ITK_TYPENAME NumericTraits<typename TInputImage::PixelType>::RealType,
00044     TCoordRep >
00045 {
00046 public:
00048   typedef VarianceImageFunction Self;
00049   typedef ImageFunction<TInputImage, ITK_TYPENAME NumericTraits<typename TInputImage::PixelType>::RealType,
00050     TCoordRep > Superclass;
00051   typedef SmartPointer<Self> Pointer;
00052   typedef SmartPointer<const Self>  ConstPointer;
00053   
00055   itkTypeMacro(VarianceImageFunction, ImageFunction);
00056 
00058   itkNewMacro(Self);
00059 
00061   typedef TInputImage InputImageType;
00062 
00064   typedef typename Superclass::OutputType OutputType;
00065 
00067   typedef typename Superclass::IndexType IndexType;
00068   
00070   typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00071 
00073   typedef typename Superclass::PointType PointType;
00074 
00076   itkStaticConstMacro(ImageDimension, unsigned int,
00077                       InputImageType::ImageDimension);
00078 
00080   typedef typename NumericTraits<typename InputImageType::PixelType>::RealType
00081       RealType;
00082 
00084   virtual RealType EvaluateAtIndex( const IndexType& index ) const;
00085   
00087   virtual RealType Evaluate( const PointType& point ) const
00088     { 
00089       IndexType index;
00090       this->ConvertPointToNearestIndex( point, index );
00091       return this->EvaluateAtIndex( index ); 
00092     }
00093   virtual RealType EvaluateAtContinuousIndex( 
00094     const ContinuousIndexType& cindex ) const
00095     { 
00096       IndexType index;
00097       this->ConvertContinuousIndexToNearestIndex( cindex, index );
00098       return this->EvaluateAtIndex( index ) ; 
00099     }
00100   
00101 protected:
00102   VarianceImageFunction();
00103   ~VarianceImageFunction(){};
00104   void PrintSelf(std::ostream& os, Indent indent) const;
00105 
00106 private:
00107   VarianceImageFunction( const Self& ); //purposely not implemented
00108   void operator=( const Self& ); //purposely not implemented
00109 
00110 };
00111 
00112 } // namespace itk
00113 
00114 #ifndef ITK_MANUAL_INSTANTIATION
00115 #include "itkVarianceImageFunction.txx"
00116 #endif
00117 
00118 #endif
00119 

Generated at Wed Mar 12 01:13:11 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000