00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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 : public SpatialFunction<TOutput, VImageDimension, TInput>
00044 {
00045 public:
00047 typedef GaussianSpatialFunction Self;
00048 typedef SpatialFunction<TOutput, VImageDimension, TInput> Superclass;
00049 typedef SmartPointer<Self> Pointer;
00050 typedef SmartPointer<const Self> ConstPointer;
00051
00053 itkNewMacro(Self);
00054
00056 itkTypeMacro(GaussianSpatialFunction, SpatialFunction);
00057
00059 typedef typename Superclass::InputType InputType;
00060
00062 typedef typename Superclass::OutputType OutputType;
00063
00065 typedef FixedArray<double, VImageDimension> ArrayType;
00066
00068 OutputType Evaluate(const TInput& position) const;
00069
00071 itkSetMacro(Scale, double);
00072 itkGetMacro(Scale, double);
00073 itkSetMacro(Normalized, bool);
00074 itkGetMacro(Normalized, bool);
00075 itkSetMacro(Sigma, ArrayType);
00076 itkGetMacro(Sigma, ArrayType);
00077 itkSetMacro(Mean, ArrayType);
00078 itkGetMacro(Mean, ArrayType);
00080
00081 protected:
00082 GaussianSpatialFunction();
00083 virtual ~GaussianSpatialFunction();
00084 void PrintSelf(std::ostream& os, Indent indent) const;
00085
00086 private:
00087 GaussianSpatialFunction(const Self&);
00088 void operator=(const Self&);
00089
00091 ArrayType m_Sigma;
00092
00094 ArrayType m_Mean;
00095
00097 double m_Scale;
00098
00100 bool m_Normalized;
00101
00102 };
00103
00104 }
00105
00106 #ifndef ITK_MANUAL_INSTANTIATION
00107 #include "itkGaussianSpatialFunction.txx"
00108 #endif
00109
00110 #endif
00111