ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkCumulativeGaussianOptimizer.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 itkCumulativeGaussianOptimizer_h
19 #define itkCumulativeGaussianOptimizer_h
20 
23 #include "ITKOptimizersExport.h"
24 
25 namespace itk
26 {
48 class ITKOptimizers_EXPORT CumulativeGaussianOptimizer:
50 {
51 public:
52 
58 
62 
65 
67  itkNewMacro(Self);
68 
71 
73  itkSetMacro(DifferenceTolerance, double);
74  itkGetMacro(DifferenceTolerance, double);
75  itkSetMacro(Verbose, bool);
76  itkGetMacro(Verbose, bool);
77  itkGetMacro(ComputedMean, double);
78  itkGetMacro(ComputedStandardDeviation, double);
79  itkGetMacro(UpperAsymptote, double);
80  itkGetMacro(LowerAsymptote, double);
81  itkGetMacro(FinalSampledArray, MeasureType *);
82  itkGetMacro(FitError, double);
84 
85  void SetDataArray(MeasureType *dataArray);
86 
88  virtual void StartOptimization() ITK_OVERRIDE;
89 
91  void PrintArray(MeasureType *array);
92 
94  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
95 
96 protected:
98  virtual ~CumulativeGaussianOptimizer();
99  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
100 
101 private:
102 
104  double m_DifferenceTolerance;
105 
107  double m_ComputedMean;
108 
110  double m_ComputedStandardDeviation;
111 
113  double m_ComputedAmplitude;
114 
117  double m_ComputedTransitionHeight;
118 
120  double m_UpperAsymptote;
121 
123  double m_LowerAsymptote;
124 
126  double m_OffsetForMean;
127 
129  bool m_Verbose;
130 
132  double m_FitError;
133 
136  MeasureType *m_FinalSampledArray;
137 
139  MeasureType *m_CumulativeGaussianArray;
140 
142  MeasureType * ExtendGaussian(MeasureType *originalArray, MeasureType *extendedArray, int startingPointForInsertion);
143 
145  MeasureType * RecalculateExtendedArrayFromGaussianParameters(MeasureType *originalArray,
146  MeasureType *extendedArray,
147  int startingPointForInsertion);
148 
151  double FindAverageSumOfSquaredDifferences(MeasureType *array1, MeasureType *array2);
152 
154  void FindParametersOfGaussian(MeasureType *sampledGaussianArray);
155 
157  void MeasureGaussianParameters(MeasureType *array);
158 
160  void PrintComputedParameterHeader();
161 
163  void PrintComputedParameters();
164 
166  double VerticalBestShift(MeasureType *originalArray, MeasureType *newArray);
167 
169  std::ostringstream m_StopConditionDescription;
170 };
171 } // end namespace itk
172 
173 #endif
Light weight base class for most itk classes.
Cost function for the Cumulative Gaussian Optimizer.
This is an optimizer specific to estimating the parameters of Cumulative Gaussian sampled data...
This class is a base for the Optimization methods that optimize a multiple valued function...
MultipleValuedNonLinearOptimizer Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
CumulativeGaussianCostFunction CostFunctionType