ITK  4.13.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 
49  typedef double ScalarType;
54  typedef typename Superclass::PointType PointType;
55  typedef typename Superclass::TransformType TransformType;
56  typedef typename Superclass::BoundingBoxType BoundingBoxType;
57 
58  itkStaticConstMacro(NumberOfDimensions, unsigned int,
59  TDimension);
60 
61  itkNewMacro(Self);
62  itkTypeMacro(GaussianSpatialObject, SpatialObject);
63 
67  itkSetMacro(Radius, ScalarType);
68  itkGetConstReferenceMacro(Radius, ScalarType);
70 
73  itkSetMacro(Sigma, ScalarType);
74  itkGetConstReferenceMacro(Sigma, ScalarType);
76 
79  itkSetMacro(Maximum, ScalarType);
80  itkGetConstReferenceMacro(Maximum, ScalarType);
82 
86  ScalarType SquaredZScore(const PointType & point) const;
87 
89  virtual bool ValueAt(const PointType & point, ScalarType & value,
90  unsigned int depth = 0,
91  char *name = ITK_NULLPTR) const ITK_OVERRIDE;
92 
95  virtual bool IsEvaluableAt(const PointType & point,
96  unsigned int depth = 0,
97  char *name = ITK_NULLPTR) const ITK_OVERRIDE;
98 
100  virtual bool IsInside(const PointType & point,
101  unsigned int depth,
102  char *name) const ITK_OVERRIDE;
103 
107  virtual bool IsInside(const PointType & point) const;
108 
111  virtual bool ComputeLocalBoundingBox() const ITK_OVERRIDE;
112 
115  typename EllipseSpatialObject< TDimension >::Pointer GetEllipsoid() const;
116 
117 protected:
118  ITK_DISALLOW_COPY_AND_ASSIGN(GaussianSpatialObject);
119 
120  GaussianSpatialObject();
121  ~GaussianSpatialObject() ITK_OVERRIDE;
122 
123  ScalarType m_Maximum;
124  ScalarType m_Radius;
125  ScalarType m_Sigma;
126 
128  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
129 };
130 } // end namespace itk
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 #include "itkGaussianSpatialObject.hxx"
134 #endif
135 
136 #endif // itkGaussianSpatialObject_h
Superclass::TransformType TransformType
SmartPointer< Superclass > SuperclassPointer
SmartPointer< const Self > ConstPointer
Superclass::BoundingBoxType BoundingBoxType
Implementation of the composite pattern.
SpatialObject< TDimension > Superclass
Represents a multivariate Gaussian function.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for all data objects in ITK.