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

itkGaussianDerivativeImageFunction.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkGaussianDerivativeImageFunction.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:08 $ 00007 Version: $Revision: 1.8 $ 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 _itkGaussianDerivativeImageFunction_h 00018 #define _itkGaussianDerivativeImageFunction_h 00019 00020 #include "itkNeighborhoodOperatorImageFunction.h" 00021 #include "itkImageFunction.h" 00022 #include "itkGaussianDerivativeSpatialFunction.h" 00023 #include "itkGaussianSpatialFunction.h" 00024 00025 namespace itk 00026 { 00027 00037 template <class TInputImage,class TOutput=double> 00038 class ITK_EXPORT GaussianDerivativeImageFunction : 00039 public ImageFunction< TInputImage, 00040 Vector<TOutput,::itk::GetImageDimension<TInputImage>::ImageDimension>, 00041 TOutput > 00042 { 00043 public: 00044 00046 typedef GaussianDerivativeImageFunction Self; 00047 00049 typedef ImageFunction<TInputImage, 00050 Vector<TOutput,::itk::GetImageDimension<TInputImage>::ImageDimension>, 00051 TOutput > Superclass; 00052 00054 typedef SmartPointer<Self> Pointer; 00055 typedef SmartPointer<const Self> ConstPointer; 00056 00058 itkNewMacro(Self); 00059 00061 itkTypeMacro( GaussianDerivativeImageFunction, ImageFunction ); 00062 00064 typedef TInputImage InputImageType; 00065 typedef typename InputImageType::PixelType InputPixelType; 00066 typedef typename InputImageType::IndexType IndexType; 00067 00069 itkStaticConstMacro(ImageDimension2, unsigned int, 00070 InputImageType::ImageDimension); 00071 00072 typedef ContinuousIndex<TOutput,itkGetStaticConstMacro(ImageDimension2)> 00073 ContinuousIndexType; 00074 00075 00076 typedef Neighborhood<InputPixelType, itkGetStaticConstMacro(ImageDimension2)> NeighborhoodType; 00077 typedef Neighborhood<TOutput, itkGetStaticConstMacro(ImageDimension2)> OperatorNeighborhoodType; 00078 00079 typedef Vector<TOutput,itkGetStaticConstMacro(ImageDimension2)> VectorType; 00080 typedef typename Superclass::OutputType OutputType; 00081 typedef FixedArray<OperatorNeighborhoodType,2*itkGetStaticConstMacro(ImageDimension2)> OperatorArrayType; 00082 typedef NeighborhoodOperatorImageFunction<InputImageType, 00083 TOutput> OperatorImageFunctionType; 00084 typedef typename OperatorImageFunctionType::Pointer OperatorImageFunctionPointer; 00085 00086 typedef GaussianDerivativeSpatialFunction<TOutput,1> GaussianDerivativeFunctionType; 00087 typedef typename GaussianDerivativeFunctionType::Pointer GaussianDerivativeFunctionPointer; 00088 00089 typedef GaussianSpatialFunction<TOutput,1> GaussianFunctionType; 00090 typedef typename GaussianFunctionType::Pointer GaussianFunctionPointer; 00091 00093 typedef Point<TOutput,itkGetStaticConstMacro(ImageDimension2)> PointType; 00094 00096 virtual OutputType Evaluate(const PointType& point) const; 00097 00098 00100 virtual OutputType EvaluateAtIndex( const IndexType & index ) const; 00101 00103 virtual OutputType EvaluateAtContinuousIndex( 00104 const ContinuousIndexType & index ) const; 00105 00111 void SetSigma( const double sigma[ImageDimension2] ); 00112 void SetSigma( const double sigma); 00113 const double* GetSigma() const {return m_Sigma;} 00114 00116 void SetExtent( const double extent[ImageDimension2] ); 00117 void SetExtent( const double extent); 00118 const double* GetExtent() const {return m_Extent;} 00119 00124 virtual void SetInputImage( const InputImageType * ptr ); 00125 00126 00127 00128 protected: 00129 GaussianDerivativeImageFunction(); 00130 GaussianDerivativeImageFunction( const Self& ){}; 00131 00132 ~GaussianDerivativeImageFunction(){}; 00133 00134 void operator=( const Self& ){}; 00135 void PrintSelf(std::ostream& os, Indent indent) const; 00136 00137 void RecomputeGaussianKernel(); 00138 void RecomputeContinuousGaussianKernel( 00139 const double offset[ImageDimension2]) const; 00140 00141 00142 private: 00143 00144 double m_Sigma[ImageDimension2]; 00145 00148 mutable OperatorArrayType m_OperatorArray; 00149 mutable OperatorArrayType m_ContinuousOperatorArray; 00150 00152 OperatorImageFunctionPointer m_OperatorImageFunction; 00153 double m_Extent[ImageDimension2]; 00154 00156 bool m_UseImageSpacing; 00157 00159 GaussianDerivativeFunctionPointer m_GaussianDerivativeFunction; 00160 GaussianFunctionPointer m_GaussianFunction; 00161 00162 }; 00163 00164 } // namespace itk 00165 00166 #ifndef ITK_MANUAL_INSTANTIATION 00167 #include "itkGaussianDerivativeImageFunction.txx" 00168 #endif 00169 00170 #endif 00171

Generated at Sun Apr 1 02:29:22 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000