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

itkGaussianBlurImageFunction.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkGaussianBlurImageFunction.h,v $ 00005 Language: C++ 00006 Date: $Date: 2004/01/09 14:05:21 $ 00007 Version: $Revision: 1.4.2.1 $ 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 _itkGaussianBlurImageFunction_h 00018 #define _itkGaussianBlurImageFunction_h 00019 00020 #include "itkNeighborhoodOperatorImageFunction.h" 00021 #include "itkGaussianOperator.h" 00022 #include "itkGaussianSpatialFunction.h" 00023 #include "itkImageFunction.h" 00024 00025 namespace itk 00026 { 00027 00037 template <class TInputImage,class TOutput=double> 00038 class ITK_EXPORT GaussianBlurImageFunction : 00039 public ImageFunction< TInputImage, TOutput > 00040 { 00041 public: 00042 00044 typedef GaussianBlurImageFunction Self; 00045 00047 typedef ImageFunction<TInputImage, TOutput> Superclass; 00048 00050 typedef SmartPointer<Self> Pointer; 00051 typedef SmartPointer<const Self> ConstPointer; 00052 00054 itkNewMacro(Self); 00055 00057 itkTypeMacro( GaussianBlurImageFunction, ImageFunction ); 00058 00060 typedef TInputImage InputImageType; 00061 typedef typename InputImageType::PixelType InputPixelType; 00062 typedef typename Superclass::IndexType IndexType; 00063 typedef typename Superclass::ContinuousIndexType ContinuousIndexType; 00064 typedef NeighborhoodOperatorImageFunction<InputImageType, 00065 TOutput> OperatorImageFunctionType; 00066 typedef typename OperatorImageFunctionType::Pointer OperatorImageFunctionPointer; 00067 00069 itkStaticConstMacro(ImageDimension, unsigned int, 00070 InputImageType::ImageDimension); 00071 00072 typedef GaussianOperator<TOutput, 00073 itkGetStaticConstMacro(ImageDimension)> 00074 GaussianOperatorType; 00075 typedef Neighborhood<TOutput, itkGetStaticConstMacro(ImageDimension)> NeighborhoodType; 00076 typedef FixedArray<NeighborhoodType,itkGetStaticConstMacro(ImageDimension)> OperatorArrayType; 00077 00078 typedef GaussianSpatialFunction<TOutput,1> GaussianFunctionType; 00079 typedef typename GaussianFunctionType::Pointer GaussianFunctionPointer; 00080 00082 typedef typename Superclass::PointType PointType; 00083 00085 virtual TOutput Evaluate(const PointType& point) const; 00086 00087 00089 virtual TOutput EvaluateAtIndex( const IndexType & index ) const; 00090 00092 virtual TOutput EvaluateAtContinuousIndex( 00093 const ContinuousIndexType & index ) const; 00094 00101 void SetSigma( const double sigma[ImageDimension] ); 00102 void SetSigma( const float sigma[ImageDimension] ); 00103 void SetSigma( const double sigma); 00104 const double* GetSigma() const {return m_Sigma;} 00105 00110 virtual void SetInputImage( const InputImageType * ptr ); 00111 00112 void SetExtent( const double extent[ImageDimension] ); 00113 void SetExtent( const double extent); 00114 const double* GetExtent() const {return m_Extent;} 00115 00116 protected: 00117 GaussianBlurImageFunction(); 00118 GaussianBlurImageFunction( const Self& ){}; 00119 00120 ~GaussianBlurImageFunction(){}; 00121 00122 void operator=( const Self& ){}; 00123 void PrintSelf(std::ostream& os, Indent indent) const; 00124 00125 void RecomputeGaussianKernel(); 00126 void RecomputeContinuousGaussianKernel( 00127 const double offset[ImageDimension] ) const; 00128 00129 private: 00130 00131 double m_Sigma[ImageDimension]; 00132 OperatorImageFunctionPointer m_OperatorImageFunction; 00133 mutable OperatorArrayType m_OperatorArray; 00134 mutable OperatorArrayType m_ContinuousOperatorArray; 00135 00139 double m_MaximumError[ImageDimension]; 00140 double m_Extent[ImageDimension]; 00141 00144 int m_MaximumKernelWidth; 00145 00147 unsigned int m_FilterDimensionality; 00148 00150 bool m_UseImageSpacing; 00151 00153 GaussianFunctionPointer m_GaussianFunction; 00154 }; 00155 00156 } // namespace itk 00157 00158 #ifndef ITK_MANUAL_INSTANTIATION 00159 #include "itkGaussianBlurImageFunction.txx" 00160 #endif 00161 00162 #endif 00163

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