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 
23 namespace itk
24 {
43 template <unsigned int TDimension = 3>
44 class ITK_TEMPLATE_EXPORT GaussianSpatialObject : public SpatialObject<TDimension>
45 {
46 public:
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);
96  SquaredZScoreInObjectSpace(const PointType & point) const;
97 
102  ScalarType
103  SquaredZScoreInWorldSpace(const PointType & point) const;
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
118  ValueAtInObjectSpace(const PointType & point,
119  double & value,
120  unsigned int depth = 0,
121  const std::string & name = "") const override;
122 
126  GetEllipsoid() const;
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
139 protected:
142  void
143  ComputeMyBoundingBox() override;
144 
145  GaussianSpatialObject();
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 
154 private:
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
itk::GaussianSpatialObject
Represents a multivariate Gaussian function.
Definition: itkGaussianSpatialObject.h:44
itkEllipseSpatialObject.h
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::LightObject::Pointer
SmartPointer< Self > Pointer
Definition: itkLightObject.h:62
itk::SmartPointer< Self >
itk::point
*par Constraints *The filter requires an 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
itk::GaussianSpatialObject::ScalarType
double ScalarType
Definition: itkGaussianSpatialObject.h:50
itk::SpatialObject
Implementation of the composite pattern.
Definition: itkSpatialObject.h:58
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:61
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293