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);
00079
00080 protected:
00081 GaussianSpatialFunction();
00082 virtual ~GaussianSpatialFunction();
00083 void PrintSelf(std::ostream& os, Indent indent) const;
00084
00085 private:
00086 GaussianSpatialFunction(const Self&);
00087 void operator=(const Self&);
00088
00090 ArrayType m_Sigma;
00091
00093 ArrayType m_Mean;
00094
00096 double m_Scale;
00097
00099 bool m_Normalized;
00100
00101 };
00102
00103 }
00104
00105 #ifndef ITK_MANUAL_INSTANTIATION
00106 #include "itkGaussianSpatialFunction.txx"
00107 #endif
00108
00109 #endif