ITK  4.4.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_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 = NULL) const;
92 
95  virtual bool IsEvaluableAt(const PointType & point,
96  unsigned int depth = 0,
97  char *name = NULL) const;
98 
100  virtual bool IsInside(const PointType & point,
101  unsigned int depth,
102  char *name) const;
103 
107  virtual bool IsInside(const PointType & point) const;
108 
111  virtual bool ComputeLocalBoundingBox() const;
112 
115  typename EllipseSpatialObject< TDimension >::Pointer GetEllipsoid() const;
116 
117 protected:
118  GaussianSpatialObject(const Self &); //purposely not implemented
119  void operator=(const Self &); //purposely not implemented
120 
121  GaussianSpatialObject(void);
122  ~GaussianSpatialObject(void);
123 
127 
129  virtual void PrintSelf(std::ostream & os, Indent indent) const;
130 };
131 } // end namespace itk
132 
133 #ifndef ITK_MANUAL_INSTANTIATION
134 #include "itkGaussianSpatialObject.hxx"
135 #endif
136 
137 #endif // __itkGaussianSpatialObject_h
138