ITK  4.9.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 #include "ITKStatisticsExport.h"
23 
24 namespace itk
25 {
26 namespace Statistics
27 {
61 class ITKStatistics_EXPORT GaussianDistribution:
63 {
64 public:
70 
73 
75  itkNewMacro(Self);
76 
79  virtual SizeValueType GetNumberOfParameters() const ITK_OVERRIDE { return 2; }
80 
83  virtual double EvaluatePDF(double x) const ITK_OVERRIDE;
84 
88  virtual double EvaluatePDF(double x, const ParametersType &) const ITK_OVERRIDE;
89 
92  virtual double EvaluatePDF(double x, double mean, double variance) const;
93 
96  virtual double EvaluateCDF(double x) const ITK_OVERRIDE;
97 
101  virtual double EvaluateCDF(double x, const ParametersType &) const ITK_OVERRIDE;
102 
105  virtual double EvaluateCDF(double x, double mean, double variance) const;
106 
110  virtual double EvaluateInverseCDF(double p) const ITK_OVERRIDE;
111 
116  virtual double EvaluateInverseCDF(double p, const ParametersType &) const ITK_OVERRIDE;
117 
121  virtual double EvaluateInverseCDF(double p,
122  double mean,
123  double variance) const;
124 
127  virtual void SetMean(double);
128 
131  virtual double GetMean() const ITK_OVERRIDE;
132 
134  virtual bool HasMean() const ITK_OVERRIDE { return true; }
135 
139  virtual void SetVariance(double);
140 
143  virtual double GetVariance() const ITK_OVERRIDE;
144 
146  virtual bool HasVariance() const ITK_OVERRIDE { return true; }
147 
152  static double PDF(double x);
153 
159  static double PDF(double x, const ParametersType &);
160 
165  static double PDF(double x, double mean, double variance);
166 
171  static double CDF(double x);
172 
178  static double CDF(double x, const ParametersType &);
179 
184  static double CDF(double x, double mean, double variance);
185 
216  static double InverseCDF(double p);
218 
225  static double InverseCDF(double p, const ParametersType &);
226 
232  static double InverseCDF(double p, double mean, double variance);
233 
234 protected:
236  virtual ~GaussianDistribution(void) {}
237 
238  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
239 
240 private:
241  GaussianDistribution(const Self &) ITK_DELETE_FUNCTION;
242  void operator=(const Self &) ITK_DELETE_FUNCTION;
243 }; // end of class
244 } // end of namespace Statistics
245 } // end namespace itk
246 
247 #endif
Light weight base class for most itk classes.
ProbabilityDistribution class defines common interface for statistical distributions (pdfs...
unsigned long SizeValueType
Definition: itkIntTypes.h:143
virtual SizeValueType GetNumberOfParameters() const override
GaussianDistribution class defines the interface for a univariate Gaussian distribution (pdfs...
Control indentation during Print() invocation.
Definition: itkIndent.h:49