ITK  5.2.0
Insight Toolkit
itkGaussianSpatialFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 : public SpatialFunction<TOutput, VImageDimension, TInput>
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_MOVE(GaussianSpatialFunction);
48 
54 
56  itkNewMacro(Self);
57 
60 
62  using InputType = typename Superclass::InputType;
63 
65  using OutputType = typename Superclass::OutputType;
66 
69 
72  Evaluate(const TInput & position) const override;
73 
75  itkSetMacro(Scale, double);
76  itkGetConstMacro(Scale, double);
78 
80  itkSetMacro(Normalized, bool);
81  itkGetConstMacro(Normalized, bool);
82  itkBooleanMacro(Normalized);
84 
86  itkSetMacro(Sigma, ArrayType);
87  itkGetConstMacro(Sigma, ArrayType);
89 
91  itkSetMacro(Mean, ArrayType);
92  itkGetConstMacro(Mean, ArrayType);
94 
95 protected:
97  ~GaussianSpatialFunction() override = default;
98  void
99  PrintSelf(std::ostream & os, Indent indent) const override;
100 
101 private:
103 
105 
106  double m_Scale{ 1.0 };
107 
108  bool m_Normalized{ false };
109 };
110 } // end namespace itk
111 
112 #ifndef ITK_MANUAL_INSTANTIATION
113 # include "itkGaussianSpatialFunction.hxx"
114 #endif
115 
116 #endif
itkFloatTypes.h
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FunctionBase::OutputType
TOutput OutputType
Definition: itkFunctionBase.h:62
itk::GaussianSpatialFunction
N-dimensional Gaussian spatial function class.
Definition: itkGaussianSpatialFunction.h:44
itkSpatialFunction.h
itkFixedArray.h
itk::GaussianSpatialFunction::m_Sigma
ArrayType m_Sigma
Definition: itkGaussianSpatialFunction.h:102
itk::FixedArray< double, VImageDimension >
itk::FunctionBase
Base class for all ITK function objects.
Definition: itkFunctionBase.h:44
itk::SpatialFunction
N-dimensional spatial function class.
Definition: itkSpatialFunction.h:45
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::FunctionBase::InputType
TInput InputType
Definition: itkFunctionBase.h:59
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::GaussianSpatialFunction::m_Mean
ArrayType m_Mean
Definition: itkGaussianSpatialFunction.h:104