ITK  6.0.0
Insight Toolkit
itkGaussianSpatialObject.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 * https://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 itkGaussianSpatialObject_h
19#define itkGaussianSpatialObject_h
20
22
23namespace itk
24{
43template <unsigned int TDimension = 3>
44class ITK_TEMPLATE_EXPORT GaussianSpatialObject : public SpatialObject<TDimension>
45{
46public:
47 ITK_DISALLOW_COPY_AND_MOVE(GaussianSpatialObject);
48
50 using ScalarType = double;
55 using typename Superclass::PointType;
56 using typename Superclass::TransformType;
57 using typename Superclass::BoundingBoxType;
58
59 static constexpr unsigned int ObjectDimensions = TDimension;
60
61 itkNewMacro(Self);
62 itkOverrideGetNameOfClassMacro(GaussianSpatialObject);
63
66 void
67 Clear() override;
68
72 itkSetMacro(RadiusInObjectSpace, ScalarType);
73 itkGetConstReferenceMacro(RadiusInObjectSpace, ScalarType);
78 itkSetMacro(SigmaInObjectSpace, ScalarType);
79 itkGetConstReferenceMacro(SigmaInObjectSpace, ScalarType);
82 itkSetMacro(CenterInObjectSpace, PointType);
83 itkGetConstReferenceMacro(CenterInObjectSpace, PointType);
84
87 itkSetMacro(Maximum, ScalarType);
88 itkGetConstReferenceMacro(Maximum, ScalarType);
97
104
110 bool
111 IsInsideInObjectSpace(const PointType & point) const override;
112
113 /* Avoid hiding the overload that supports depth and name arguments */
114 using Superclass::IsInsideInObjectSpace;
115
117 bool
119 double & value,
120 unsigned int depth = 0,
121 const std::string & name = "") const override;
122
127
128#if !defined(ITK_LEGACY_REMOVE)
129 itkLegacyMacro(void SetSigma(double sigma))
130 {
131 return this->SetSigmaInObjectSpace(sigma);
132 }
133
134 itkLegacyMacro(double GetSigma() const)
135 {
136 return this->GetSigmaInObjectSpace();
137 }
138#endif
139protected:
142 void
144
146 ~GaussianSpatialObject() override = default;
147
148 void
149 PrintSelf(std::ostream & os, Indent indent) const override;
150
151 typename LightObject::Pointer
152 InternalClone() const override;
153
154private:
155 ScalarType m_Maximum{};
156 ScalarType m_RadiusInObjectSpace{};
157 ScalarType m_SigmaInObjectSpace{};
158 PointType m_CenterInObjectSpace{};
159};
160} // end namespace itk
161
162#ifndef ITK_MANUAL_INSTANTIATION
163# include "itkGaussianSpatialObject.hxx"
164#endif
165
166#endif // itkGaussianSpatialObject_h
Base class for all data objects in ITK.
Represents a multivariate Gaussian function.
ScalarType SquaredZScoreInObjectSpace(const PointType &point) const
void ComputeMyBoundingBox() override
bool IsInsideInObjectSpace(const PointType &point) const override
EllipseSpatialObject< TDimension >::Pointer GetEllipsoid() const
ScalarType SquaredZScoreInWorldSpace(const PointType &point) const
void PrintSelf(std::ostream &os, Indent indent) const override
~GaussianSpatialObject() override=default
LightObject::Pointer InternalClone() const override
bool ValueAtInObjectSpace(const PointType &point, double &value, unsigned int depth=0, const std::string &name="") const override
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Base class for most ITK classes.
Definition: itkObject.h:62
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:54
Implementation of the composite pattern.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents