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

itkMeanImageFunction.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkMeanImageFunction.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:15 $ 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 #ifndef _itkMeanImageFunction_h 00018 #define _itkMeanImageFunction_h 00019 00020 #include "itkImageFunction.h" 00021 #include "itkNumericTraits.h" 00022 00023 namespace itk 00024 { 00025 00043 template <class TInputImage, class TCoordRep = float > 00044 class ITK_EXPORT MeanImageFunction : 00045 public ImageFunction< TInputImage, 00046 ITK_TYPENAME NumericTraits<typename TInputImage::PixelType>::RealType, 00047 TCoordRep > 00048 { 00049 public: 00051 typedef MeanImageFunction Self; 00052 typedef ImageFunction<TInputImage, 00053 ITK_TYPENAME NumericTraits<typename TInputImage::PixelType>::RealType, 00054 TCoordRep > Superclass; 00055 typedef SmartPointer<Self> Pointer; 00056 typedef SmartPointer<const Self> ConstPointer; 00057 00059 itkTypeMacro(MeanImageFunction, ImageFunction); 00060 00062 itkNewMacro(Self); 00063 00065 typedef TInputImage InputImageType; 00066 00068 typedef typename Superclass::OutputType OutputType; 00069 00071 typedef typename Superclass::IndexType IndexType; 00072 00074 typedef typename Superclass::ContinuousIndexType ContinuousIndexType; 00075 00077 typedef typename Superclass::PointType PointType; 00078 00080 itkStaticConstMacro(ImageDimension, unsigned int, 00081 InputImageType::ImageDimension); 00082 00084 typedef typename NumericTraits<typename InputImageType::PixelType>::RealType 00085 RealType; 00086 00088 virtual RealType EvaluateAtIndex( const IndexType& index ) const; 00089 00091 virtual RealType Evaluate( const PointType& point ) const 00092 { 00093 IndexType index; 00094 this->ConvertPointToNearestIndex( point, index ); 00095 return this->EvaluateAtIndex( index ); 00096 } 00097 virtual RealType EvaluateAtContinuousIndex( 00098 const ContinuousIndexType& cindex ) const 00099 { 00100 IndexType index; 00101 this->ConvertContinuousIndexToNearestIndex( cindex, index ); 00102 return this->EvaluateAtIndex( index ) ; 00103 } 00104 00107 itkSetMacro( NeighborhoodRadius, unsigned int ); 00108 itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int ); 00109 00110 protected: 00111 MeanImageFunction(); 00112 ~MeanImageFunction(){}; 00113 void PrintSelf(std::ostream& os, Indent indent) const; 00114 00115 private: 00116 MeanImageFunction( const Self& ); //purposely not implemented 00117 void operator=( const Self& ); //purposely not implemented 00118 00119 unsigned int m_NeighborhoodRadius; 00120 00121 }; 00122 00123 } // namespace itk 00124 00125 #ifndef ITK_MANUAL_INSTANTIATION 00126 #include "itkMeanImageFunction.txx" 00127 #endif 00128 00129 #endif 00130

Generated at Sat Mar 31 02:24:06 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000