ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkGaussianSpatialFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkGaussianSpatialFunction_h
19 #define itkGaussianSpatialFunction_h
20 
21 #include "itkSpatialFunction.h"
22 #include "itkFixedArray.h"
23 #include "itkFloatTypes.h"
24 
25 namespace itk
26 {
41 template< typename TOutput = double,
42  unsigned int VImageDimension = 3,
43  typename TInput = Point< SpacePrecisionType, VImageDimension > >
44 class ITK_TEMPLATE_EXPORT GaussianSpatialFunction:
45  public SpatialFunction< TOutput, VImageDimension, TInput >
46 {
47 public:
53 
55  itkNewMacro(Self);
56 
59 
61  typedef typename Superclass::InputType InputType;
62 
64  typedef typename Superclass::OutputType OutputType;
65 
68 
70  OutputType Evaluate(const TInput & position) const ITK_OVERRIDE;
71 
73  itkSetMacro(Scale, double);
74  itkGetConstMacro(Scale, double);
76 
78  itkSetMacro(Normalized, bool);
79  itkGetConstMacro(Normalized, bool);
80  itkBooleanMacro(Normalized);
82 
84  itkSetMacro(Sigma, ArrayType);
85  itkGetConstMacro(Sigma, ArrayType);
87 
89  itkSetMacro(Mean, ArrayType);
90  itkGetConstMacro(Mean, ArrayType);
92 
93 protected:
95  virtual ~GaussianSpatialFunction() ITK_OVERRIDE;
96  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
97 
98 private:
99  ITK_DISALLOW_COPY_AND_ASSIGN(GaussianSpatialFunction);
100 
101  ArrayType m_Sigma;
102 
103  ArrayType m_Mean;
104 
105  double m_Scale;
106 
107  bool m_Normalized;
108 };
109 } // end namespace itk
110 
111 #ifndef ITK_MANUAL_INSTANTIATION
112 #include "itkGaussianSpatialFunction.hxx"
113 #endif
114 
115 #endif
FixedArray< double, VImageDimension > ArrayType
SmartPointer< const Self > ConstPointer
SpatialFunction< TOutput, VImageDimension, TInput > Superclass
Base class for all ITK function objects.
N-dimensional Gaussian spatial function class.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
N-dimensional spatial function class.