ITK  5.2.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  * 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 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 PointType = typename Superclass::PointType;
56  using TransformType = typename Superclass::TransformType;
57  using BoundingBoxType = typename Superclass::BoundingBoxType;
58 
59  static constexpr unsigned int ObjectDimensions = TDimension;
60 
61  itkNewMacro(Self);
62  itkTypeMacro(GaussianSpatialObject, SpatialObject);
63 
66  void
67  Clear() override;
68 
72  itkSetMacro(RadiusInObjectSpace, ScalarType);
73  itkGetConstReferenceMacro(RadiusInObjectSpace, ScalarType);
75 
78  itkSetMacro(SigmaInObjectSpace, ScalarType);
79  itkGetConstReferenceMacro(SigmaInObjectSpace, ScalarType);
81 
82  itkSetMacro(CenterInObjectSpace, PointType);
83  itkGetConstReferenceMacro(CenterInObjectSpace, PointType);
84 
87  itkSetMacro(Maximum, ScalarType);
88  itkGetConstReferenceMacro(Maximum, ScalarType);
90 
92  SquaredZScoreInObjectSpace(const PointType & point) const;
93 
95  SquaredZScoreInWorldSpace(const PointType & point) const;
96 
98  bool
99  IsInsideInObjectSpace(const PointType & point) const override;
100 
101  /* Avoid hiding the overload that supports depth and name arguments */
102  using Superclass::IsInsideInObjectSpace;
103 
105  bool
106  ValueAtInObjectSpace(const PointType & point,
107  double & value,
108  unsigned int depth = 0,
109  const std::string & name = "") const override;
110 
114  GetEllipsoid() const;
115 
116 #if !defined(ITK_LEGACY_REMOVE)
117  itkLegacyMacro(void SetSigma(double sigma)) { return this->SetSigmaInObjectSpace(sigma); }
118 
119  itkLegacyMacro(double GetSigma() const) { return this->GetSigmaInObjectSpace(); }
120 #endif
121 protected:
124  void
125  ComputeMyBoundingBox() override;
126 
127  GaussianSpatialObject();
128  ~GaussianSpatialObject() override = default;
129 
131  void
132  PrintSelf(std::ostream & os, Indent indent) const override;
133 
134  typename LightObject::Pointer
135  InternalClone() const override;
136 
137 private:
142 };
143 } // end namespace itk
144 
145 #ifndef ITK_MANUAL_INSTANTIATION
146 # include "itkGaussianSpatialObject.hxx"
147 #endif
148 
149 #endif // itkGaussianSpatialObject_h
itk::GaussianSpatialObject::TransformType
typename Superclass::TransformType TransformType
Definition: itkGaussianSpatialObject.h:56
itk::GaussianSpatialObject::BoundingBoxType
typename Superclass::BoundingBoxType BoundingBoxType
Definition: itkGaussianSpatialObject.h:57
itk::GaussianSpatialObject
Represents a multivariate Gaussian function.
Definition: itkGaussianSpatialObject.h:44
itk::GaussianSpatialObject::PointType
typename Superclass::PointType PointType
Definition: itkGaussianSpatialObject.h:55
itkEllipseSpatialObject.h
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::LightObject::Pointer
SmartPointer< Self > Pointer
Definition: itkLightObject.h:66
itk::SmartPointer< Self >
itk::GaussianSpatialObject::m_CenterInObjectSpace
PointType m_CenterInObjectSpace
Definition: itkGaussianSpatialObject.h:141
itk::GaussianSpatialObject::m_RadiusInObjectSpace
ScalarType m_RadiusInObjectSpace
Definition: itkGaussianSpatialObject.h:139
itk::GaussianSpatialObject::m_Maximum
ScalarType m_Maximum
Definition: itkGaussianSpatialObject.h:138
itk::GaussianSpatialObject::ScalarType
double ScalarType
Definition: itkGaussianSpatialObject.h:50
itk::SpatialObject
Implementation of the composite pattern.
Definition: itkSpatialObject.h:57
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::GaussianSpatialObject::m_SigmaInObjectSpace
ScalarType m_SigmaInObjectSpace
Definition: itkGaussianSpatialObject.h:140
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293