ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkGaussianDistribution.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkGaussianDistribution_h
00019 #define __itkGaussianDistribution_h
00020 
00021 #include "itkProbabilityDistribution.h"
00022 
00023 namespace itk
00024 {
00025 namespace Statistics
00026 {
00060 class ITK_EXPORT GaussianDistribution:
00061   public ProbabilityDistribution
00062 {
00063 public:
00065   typedef GaussianDistribution       Self;
00066   typedef ProbabilityDistribution    Superclass;
00067   typedef SmartPointer< Self >       Pointer;
00068   typedef SmartPointer< const Self > ConstPointer;
00069 
00071   itkTypeMacro(GaussianDistribution, ProbabilityDistribution);
00072 
00074   itkNewMacro(Self);
00075 
00078   virtual SizeValueType GetNumberOfParameters() const { return 2; }
00079 
00082   virtual double EvaluatePDF(double x) const;
00083 
00087   virtual double EvaluatePDF(double x, const ParametersType &) const;
00088 
00091   virtual double EvaluatePDF(double x, double mean, double variance) const;
00092 
00095   virtual double EvaluateCDF(double x) const;
00096 
00100   virtual double EvaluateCDF(double x, const ParametersType &) const;
00101 
00104   virtual double EvaluateCDF(double x, double mean, double variance) const;
00105 
00109   virtual double EvaluateInverseCDF(double p) const;
00110 
00115   virtual double EvaluateInverseCDF(double p, const ParametersType &) const;
00116 
00120   virtual double EvaluateInverseCDF(double p,
00121                                     double mean,
00122                                     double variance) const;
00123 
00126   virtual void SetMean(double);
00127 
00130   virtual double GetMean() const;
00131 
00133   virtual bool HasMean() const { return true; }
00134 
00138   virtual void SetVariance(double);
00139 
00142   virtual double GetVariance() const;
00143 
00145   virtual bool HasVariance() const { return true; }
00146 
00151   static double PDF(double x);
00152 
00158   static double PDF(double x, const ParametersType &);
00159 
00164   static double PDF(double x, double mean, double variance);
00165 
00170   static double CDF(double x);
00171 
00177   static double CDF(double x, const ParametersType &);
00178 
00183   static double CDF(double x, double mean, double variance);
00184 
00215   static double InverseCDF(double p);
00217 
00224   static double InverseCDF(double p, const ParametersType &);
00225 
00231   static double InverseCDF(double p, double mean, double variance);
00232 
00233 protected:
00234   GaussianDistribution(void);
00235   virtual ~GaussianDistribution(void) {}
00236 
00237   void PrintSelf(std::ostream & os, Indent indent) const;
00238 
00239 private:
00240   GaussianDistribution(const Self &); //purposely not implemented
00241   void operator=(const Self &);       //purposely not implemented
00242 };                                    // end of class
00243 } // end of namespace Statistics
00244 } // end namespace itk
00245 
00246 #endif
00247