ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkGaussianDistribution.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 __itkGaussianDistribution_h
19 #define __itkGaussianDistribution_h
20 
22 
23 namespace itk
24 {
25 namespace Statistics
26 {
60 class ITK_EXPORT GaussianDistribution:
62 {
63 public:
69 
72 
74  itkNewMacro(Self);
75 
78  virtual SizeValueType GetNumberOfParameters() const { return 2; }
79 
82  virtual double EvaluatePDF(double x) const;
83 
87  virtual double EvaluatePDF(double x, const ParametersType &) const;
88 
91  virtual double EvaluatePDF(double x, double mean, double variance) const;
92 
95  virtual double EvaluateCDF(double x) const;
96 
100  virtual double EvaluateCDF(double x, const ParametersType &) const;
101 
104  virtual double EvaluateCDF(double x, double mean, double variance) const;
105 
109  virtual double EvaluateInverseCDF(double p) const;
110 
115  virtual double EvaluateInverseCDF(double p, const ParametersType &) const;
116 
120  virtual double EvaluateInverseCDF(double p,
121  double mean,
122  double variance) const;
123 
126  virtual void SetMean(double);
127 
130  virtual double GetMean() const;
131 
133  virtual bool HasMean() const { return true; }
134 
138  virtual void SetVariance(double);
139 
142  virtual double GetVariance() const;
143 
145  virtual bool HasVariance() const { return true; }
146 
151  static double PDF(double x);
152 
158  static double PDF(double x, const ParametersType &);
159 
164  static double PDF(double x, double mean, double variance);
165 
170  static double CDF(double x);
171 
177  static double CDF(double x, const ParametersType &);
178 
183  static double CDF(double x, double mean, double variance);
184 
215  static double InverseCDF(double p);
217 
224  static double InverseCDF(double p, const ParametersType &);
225 
231  static double InverseCDF(double p, double mean, double variance);
232 
233 protected:
234  GaussianDistribution(void);
235  virtual ~GaussianDistribution(void) {}
236 
237  void PrintSelf(std::ostream & os, Indent indent) const;
238 
239 private:
240  GaussianDistribution(const Self &); //purposely not implemented
241  void operator=(const Self &); //purposely not implemented
242 }; // end of class
243 } // end of namespace Statistics
244 } // end namespace itk
245 
246 #endif
247