ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkGaussianSpatialObject.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 itkGaussianSpatialObject_h
19 #define itkGaussianSpatialObject_h
20 
22 
23 namespace itk
24 {
42 template< unsigned int TDimension = 3 >
43 class ITK_TEMPLATE_EXPORT GaussianSpatialObject:
44  public SpatialObject< TDimension >
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_ASSIGN(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 
67  itkSetMacro(RadiusInObjectSpace, ScalarType);
68  itkGetConstReferenceMacro(RadiusInObjectSpace, ScalarType);
70 
73  itkSetMacro(SigmaInObjectSpace, ScalarType);
74  itkGetConstReferenceMacro(SigmaInObjectSpace, ScalarType);
76 
77  itkSetMacro(CenterInObjectSpace, PointType);
78  itkGetConstReferenceMacro(CenterInObjectSpace, PointType);
79 
82  itkSetMacro(Maximum, ScalarType);
83  itkGetConstReferenceMacro(Maximum, ScalarType);
85 
86  ScalarType SquaredZScoreInObjectSpace(const PointType & point) const;
87 
88  ScalarType SquaredZScoreInWorldSpace(const PointType & point) const;
89 
91  bool IsInsideInObjectSpace(const PointType & point, unsigned int depth = 0,
92  const std::string & name = "") const override;
93 
96  bool ComputeMyBoundingBox() const override;
97 
99  bool ValueAtInObjectSpace(const PointType & point, double & value,
100  unsigned int depth = 0, const std::string & name = "") const override;
101 
104  typename EllipseSpatialObject< TDimension >::Pointer GetEllipsoid() const;
105 
106 protected:
108  ~GaussianSpatialObject() override = default;
109 
111  void PrintSelf(std::ostream & os, Indent indent) const override;
112 
113  typename LightObject::Pointer InternalClone() const override;
114 
115 private:
120 };
121 } // end namespace itk
122 
123 #ifndef ITK_MANUAL_INSTANTIATION
124 #include "itkGaussianSpatialObject.hxx"
125 #endif
126 
127 #endif // itkGaussianSpatialObject_h
typename Superclass::TransformType TransformType
Implementation of the composite pattern.
typename Superclass::BoundingBoxType BoundingBoxType
Represents a multivariate Gaussian function.
typename Superclass::PointType PointType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60
Base class for all data objects in ITK.