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

itkGaussianSpatialFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkGaussianSpatialFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-25 12:24:09 $
00007   Version:   $Revision: 1.10 $
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 __itkGaussianSpatialFunction_h
00018 #define __itkGaussianSpatialFunction_h
00019 
00020 #include "itkSpatialFunction.h"
00021 #include "itkFixedArray.h"
00022 #include "itkPoint.h"
00023 
00024 namespace itk
00025 {
00026 
00040 template <typename TOutput=double, 
00041           unsigned int VImageDimension=3,
00042           typename TInput=Point<double, VImageDimension> >
00043 class ITK_EXPORT GaussianSpatialFunction 
00044 : public SpatialFunction<TOutput, VImageDimension, TInput>
00045 {
00046 public:
00048   typedef GaussianSpatialFunction                                 Self;
00049   typedef SpatialFunction<TOutput, VImageDimension, TInput>       Superclass;
00050   typedef SmartPointer<Self>                                      Pointer;
00051   typedef SmartPointer<const Self>                                ConstPointer;
00052 
00054   itkNewMacro(Self);
00055 
00057   itkTypeMacro(GaussianSpatialFunction, SpatialFunction);
00058 
00060   typedef typename Superclass::InputType InputType;
00061 
00063   typedef typename Superclass::OutputType OutputType;
00064 
00066   typedef FixedArray<double, VImageDimension> ArrayType;
00067 
00069   OutputType Evaluate(const TInput& position) const;
00070 
00072   itkSetMacro(Scale, double);
00073   itkGetConstMacro(Scale, double);
00074   itkSetMacro(Normalized, bool);
00075   itkGetConstMacro(Normalized, bool);
00076   itkSetMacro(Sigma, ArrayType);
00077   itkGetConstMacro(Sigma, ArrayType);
00078   itkSetMacro(Mean, ArrayType);
00079   itkGetConstMacro(Mean, ArrayType);
00081 
00082 protected:
00083   GaussianSpatialFunction();
00084   virtual ~GaussianSpatialFunction();
00085   void PrintSelf(std::ostream& os, Indent indent) const;
00086 
00087 private:
00088   GaussianSpatialFunction(const Self&); //purposely not implemented
00089   void operator=(const Self&); //purposely not implemented
00090 
00092   ArrayType m_Sigma;
00093 
00095   ArrayType m_Mean;
00096 
00098   double m_Scale;
00099 
00101   bool m_Normalized;
00102 
00103 };
00104 
00105 } // end namespace itk
00106 
00107 
00108 // Define instantiation macro for this template.
00109 #define ITK_TEMPLATE_GaussianSpatialFunction(_, EXPORT, x, y) namespace itk { \
00110   _(3(class EXPORT GaussianSpatialFunction< ITK_TEMPLATE_3 x >)) \
00111   namespace Templates { typedef GaussianSpatialFunction< ITK_TEMPLATE_3 x >\
00112                                                  GaussianSpatialFunction##y; } \
00113   }
00114 
00115 #if ITK_TEMPLATE_EXPLICIT
00116 # include "Templates/itkGaussianSpatialFunction+-.h"
00117 #endif
00118 
00119 #if ITK_TEMPLATE_TXX
00120 # include "itkGaussianSpatialFunction.txx"
00121 #endif
00122 
00123 #endif
00124 

Generated at Thu May 28 10:01:53 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000