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

itkGaussianOperator.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkGaussianOperator.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:09 $ 00007 Version: $Revision: 1.22 $ 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 __itkGaussianOperator_h 00018 #define __itkGaussianOperator_h 00019 00020 #include "itkNeighborhoodOperator.h" 00021 #include <math.h> 00022 namespace itk { 00023 00059 template<class TPixel,unsigned int VDimension=2, 00060 class TAllocator = NeighborhoodAllocator<TPixel> > 00061 class ITK_EXPORT GaussianOperator 00062 : public NeighborhoodOperator<TPixel, VDimension, TAllocator> 00063 { 00064 public: 00066 typedef GaussianOperator Self; 00067 typedef NeighborhoodOperator<TPixel, VDimension, TAllocator> Superclass; 00068 00070 GaussianOperator() : m_Variance(1), m_MaximumError(.01), m_MaximumKernelWidth(30) { } 00071 00073 GaussianOperator(const Self &other) 00074 : NeighborhoodOperator<TPixel, VDimension, TAllocator>(other) 00075 { 00076 m_Variance = other.m_Variance; 00077 m_MaximumError = other.m_MaximumError; 00078 } 00079 00081 Self &operator=(const Self &other) 00082 { 00083 Superclass::operator=(other); 00084 m_Variance = other.m_Variance; 00085 m_MaximumError = other.m_MaximumError; 00086 m_MaximumKernelWidth = other.m_MaximumKernelWidth; 00087 return *this; 00088 } 00089 00091 void SetVariance(const double &variance) 00092 { m_Variance = variance; } 00093 00098 void SetMaximumError(const double &max_error) 00099 { 00100 if (max_error >= 1 || max_error <= 0) 00101 { 00102 throw ExceptionObject(__FILE__, __LINE__); 00103 } 00104 00105 m_MaximumError = max_error; 00106 } 00107 00109 double GetVariance() 00110 { return m_Variance; } 00111 00116 double GetMaximumError() 00117 { return m_MaximumError; } 00118 00123 void SetMaximumKernelWidth( unsigned int n ) 00124 { m_MaximumKernelWidth = n; } 00125 00127 unsigned int GetMaximumKernelWidth() const 00128 { return m_MaximumKernelWidth; } 00129 00131 virtual void PrintSelf(std::ostream &os, Indent i) const 00132 { 00133 os << i << "GaussianOperator { this=" << this 00134 << ", m_Variance = " << m_Variance 00135 << ", m_MaximumError = " << m_MaximumError 00136 << "} " << std::endl; 00137 Superclass::PrintSelf(os, i.GetNextIndent()); 00138 } 00139 00140 protected: 00141 typedef typename Superclass::CoefficientVector CoefficientVector; 00142 00144 double ModifiedBesselI0(double); 00145 00148 double ModifiedBesselI1(double); 00149 00152 double ModifiedBesselI(int, double); 00153 00155 CoefficientVector GenerateCoefficients(); 00156 00158 void Fill(const CoefficientVector& coeff) 00159 { this->FillCenteredDirectional(coeff); } 00160 00161 private: 00163 double m_Variance; 00164 00167 double m_MaximumError; 00168 00172 unsigned int m_MaximumKernelWidth; 00173 00175 const char *GetNameOfClass() 00176 { return "itkGaussianOperator"; } 00177 00178 }; 00179 00180 } // namespace itk 00181 00182 00183 #ifndef ITK_MANUAL_INSTANTIATION 00184 #include "itkGaussianOperator.txx" 00185 #endif 00186 00187 #endif

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