ITK  5.3.0
Insight Toolkit
itkCumulativeGaussianOptimizer.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 {
49 {
50 public:
56 
60 
63 
65  itkNewMacro(Self);
66 
69 
71  itkSetMacro(DifferenceTolerance, double);
72  itkGetMacro(DifferenceTolerance, double);
73  itkSetMacro(Verbose, bool);
74  itkGetMacro(Verbose, bool);
75  itkGetMacro(ComputedMean, double);
76  itkGetMacro(ComputedStandardDeviation, double);
77  itkGetMacro(UpperAsymptote, double);
78  itkGetMacro(LowerAsymptote, double);
79  itkGetMacro(FinalSampledArray, MeasureType *);
80  itkGetMacro(FitError, double);
82 
83  void
84  SetDataArray(MeasureType * cumGaussianArray);
85 
87  void
88  StartOptimization() override;
89 
91  void
92  PrintArray(MeasureType * array);
93 
95  const std::string
96  GetStopConditionDescription() const override;
97 
98 protected:
100  ~CumulativeGaussianOptimizer() override;
101  void
102  PrintSelf(std::ostream & os, Indent indent) const override;
103 
104 private:
107 
110 
113 
116 
120 
123 
126 
129 
131  bool m_Verbose;
132 
134  double m_FitError;
135 
139 
142 
144  MeasureType *
145  ExtendGaussian(MeasureType * originalArray, MeasureType * extendedArray, int startingPointForInsertion);
146 
148  MeasureType *
149  RecalculateExtendedArrayFromGaussianParameters(MeasureType * originalArray,
150  MeasureType * extendedArray,
151  int startingPointForInsertion) const;
152 
155  double
156  FindAverageSumOfSquaredDifferences(MeasureType * array1, MeasureType * array2);
157 
159  void
160  FindParametersOfGaussian(MeasureType * sampledGaussianArray);
161 
163  void
164  MeasureGaussianParameters(MeasureType * array);
165 
167  void
168  PrintComputedParameterHeader();
169 
171  void
172  PrintComputedParameters() const;
173 
175  double
176  VerticalBestShift(MeasureType * originalArray, MeasureType * newArray);
177 
179  std::ostringstream m_StopConditionDescription;
180 };
181 } // end namespace itk
182 
183 #endif
itk::CumulativeGaussianOptimizer::m_ComputedMean
double m_ComputedMean
Definition: itkCumulativeGaussianOptimizer.h:109
itk::CumulativeGaussianOptimizer::m_LowerAsymptote
double m_LowerAsymptote
Definition: itkCumulativeGaussianOptimizer.h:125
itk::CumulativeGaussianOptimizer::m_ComputedTransitionHeight
double m_ComputedTransitionHeight
Definition: itkCumulativeGaussianOptimizer.h:119
itk::MultipleValuedNonLinearOptimizer
This class is a base for the Optimization methods that optimize a multiple valued function.
Definition: itkMultipleValuedNonLinearOptimizer.h:34
itk::CumulativeGaussianOptimizer::m_StopConditionDescription
std::ostringstream m_StopConditionDescription
Definition: itkCumulativeGaussianOptimizer.h:179
itk::CumulativeGaussianOptimizer::m_ComputedStandardDeviation
double m_ComputedStandardDeviation
Definition: itkCumulativeGaussianOptimizer.h:112
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::CumulativeGaussianOptimizer::m_CumulativeGaussianArray
MeasureType * m_CumulativeGaussianArray
Definition: itkCumulativeGaussianOptimizer.h:141
itk::CumulativeGaussianOptimizer::m_FitError
double m_FitError
Definition: itkCumulativeGaussianOptimizer.h:134
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::CumulativeGaussianOptimizer::m_UpperAsymptote
double m_UpperAsymptote
Definition: itkCumulativeGaussianOptimizer.h:122
itk::CumulativeGaussianOptimizer::m_OffsetForMean
double m_OffsetForMean
Definition: itkCumulativeGaussianOptimizer.h:128
itk::CumulativeGaussianOptimizer
This is an optimizer specific to estimating the parameters of Cumulative Gaussian sampled data.
Definition: itkCumulativeGaussianOptimizer.h:48
itk::CumulativeGaussianOptimizer::m_DifferenceTolerance
double m_DifferenceTolerance
Definition: itkCumulativeGaussianOptimizer.h:106
itk::CumulativeGaussianOptimizer::m_ComputedAmplitude
double m_ComputedAmplitude
Definition: itkCumulativeGaussianOptimizer.h:115
itk::CumulativeGaussianCostFunction
Cost function for the Cumulative Gaussian Optimizer.
Definition: itkCumulativeGaussianCostFunction.h:51
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::CumulativeGaussianOptimizer::m_Verbose
bool m_Verbose
Definition: itkCumulativeGaussianOptimizer.h:131
itk::Array< double >
itk::CumulativeGaussianOptimizer::m_FinalSampledArray
MeasureType * m_FinalSampledArray
Definition: itkCumulativeGaussianOptimizer.h:138
itkCumulativeGaussianCostFunction.h
itkMultipleValuedNonLinearOptimizer.h