ITK  5.0.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:
65  ITK_DISALLOW_COPY_AND_ASSIGN(GaussianDistribution);
66 
72 
75 
77  itkNewMacro(Self);
78 
81  SizeValueType GetNumberOfParameters() const override { return 2; }
82 
85  double EvaluatePDF(double x) const override;
86 
90  double EvaluatePDF(double x, const ParametersType &) const override;
91 
94  virtual double EvaluatePDF(double x, double mean, double variance) const;
95 
98  double EvaluateCDF(double x) const override;
99 
103  double EvaluateCDF(double x, const ParametersType &) const override;
104 
107  virtual double EvaluateCDF(double x, double mean, double variance) const;
108 
112  double EvaluateInverseCDF(double p) const override;
113 
118  double EvaluateInverseCDF(double p, const ParametersType &) const override;
119 
123  virtual double EvaluateInverseCDF(double p,
124  double mean,
125  double variance) const;
126 
129  virtual void SetMean(double);
130 
133  double GetMean() const override;
134 
136  bool HasMean() const override { return true; }
137 
141  virtual void SetVariance(double);
142 
145  double GetVariance() const override;
146 
148  bool HasVariance() const override { return true; }
149 
154  static double PDF(double x);
155 
161  static double PDF(double x, const ParametersType &);
162 
167  static double PDF(double x, double mean, double variance);
168 
173  static double CDF(double x);
174 
180  static double CDF(double x, const ParametersType &);
181 
186  static double CDF(double x, double mean, double variance);
187 
218  static double InverseCDF(double p);
220 
227  static double InverseCDF(double p, const ParametersType &);
228 
234  static double InverseCDF(double p, double mean, double variance);
235 
236 protected:
238  ~GaussianDistribution() override = default;
239 
240  void PrintSelf(std::ostream & os, Indent indent) const override;
241 }; // end of class
242 } // end of namespace Statistics
243 } // end namespace itk
244 
245 #endif
SizeValueType GetNumberOfParameters() const override
Light weight base class for most itk classes.
ProbabilityDistribution class defines common interface for statistical distributions (pdfs...
unsigned long SizeValueType
Definition: itkIntTypes.h:83
GaussianDistribution class defines the interface for a univariate Gaussian distribution (pdfs...
Control indentation during Print() invocation.
Definition: itkIndent.h:49