Orfeo Toolbox  3.16
itkGoodnessOfFitFunctionBase.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkGoodnessOfFitFunctionBase.h,v $
5  Language: C++
6  Date: $Date: 2009-03-04 15:23:49 $
7  Version: $Revision: 1.7 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkGoodnessOfFitFunctionBase_h
18 #define __itkGoodnessOfFitFunctionBase_h
19 
20 #include "itkSampleAlgorithmBase.h"
21 #include "itkFunctionBase.h"
23 
24 namespace itk {
25 namespace Statistics {
26 
38 template< class TInputHistogram >
40  : public SampleAlgorithmBase< TInputHistogram >
41 {
42 public:
48 
50  itkTypeMacro(GoodnessOfFitFunctionBase,
51  SampleAlgorithimBase);
52 
54  itkNewMacro(Self);
55 
57  itkStaticConstMacro(MeasurementVectorSize, unsigned int,
58  TInputHistogram::MeasurementVectorSize);
59 
60  typedef typename TInputHistogram::MeasurementType MeasurementType;
61  typedef typename TInputHistogram::MeasurementVectorType MeasurementVectorType;
62  typedef TInputHistogram InputHistogramType;
63 
66 
69  { return m_ObservedHistogram; }
70 
73 
76  { return m_ExpectedHistogram; }
77 
81  itkGetMacro(UseExpectedHistogram, bool);
82 
83  void SetTotalObservedScale(double* scale)
84  {
85  if ( m_TotalObservedScale != scale )
86  {
87  m_TotalObservedScale = scale;
88  this->Modified();
89  }
90  }
91 
92  typedef double OutputType;
93 
95  { return m_Output; }
96 
97 protected:
100  void PrintSelf(std::ostream& os, Indent indent) const;
101 
102  itkSetMacro(UseExpectedHistogram, bool);
103 
104  virtual void GenerateData() {}
105 
106  itkGetConstReferenceMacro(Epsilon,float);
107  itkGetConstReferenceMacro(LogEpsilon,float);
108 
109 private:
110  float m_Epsilon;
112 
114 
117 
120 
121 }; // end of class
122 
123 } // end of namespace Statistics
124 } // end of namespace itk
125 
126 #ifndef ITK_MANUAL_INSTANTIATION
128 #endif
129 
130 #endif

Generated at Sat Feb 2 2013 23:39:15 for Orfeo Toolbox with doxygen 1.8.1.1