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/11/14 19:19:25 $
00007   Version:   $Revision: 1.5 $
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 
00103   itkSetMacro( NeighborhoodRadius, unsigned int );
00104   itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int );
00105 
00106  
00107 protected:
00108   VarianceImageFunction();
00109   ~VarianceImageFunction(){};
00110   void PrintSelf(std::ostream& os, Indent indent) const;
00111 
00112 private:
00113   VarianceImageFunction( const Self& ); //purposely not implemented
00114   void operator=( const Self& ); //purposely not implemented
00115 
00116   unsigned int m_NeighborhoodRadius;
00117 
00118 };
00119 
00120 } // namespace itk
00121 
00122 #ifndef ITK_MANUAL_INSTANTIATION
00123 #include "itkVarianceImageFunction.txx"
00124 #endif
00125 
00126 #endif
00127 

Generated at Fri May 21 01:15:27 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000