ITK  6.0.0
Insight Toolkit
itkCumulativeGaussianCostFunction.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 * https://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 itkCumulativeGaussianCostFunction_h
19#define itkCumulativeGaussianCostFunction_h
20
22#include "ITKOptimizersExport.h"
23
24namespace itk
25{
52{
53public:
59
61 itkOverrideGetNameOfClassMacro(CumulativeGaussianCostFunction);
62
64 itkNewMacro(Self);
65
68 using MeasureType = Superclass::MeasureType;
69 using DerivativeType = Superclass::DerivativeType;
70
73 enum
74 {
75 SpaceDimension = 4
76 };
77
79 void
80 GetDerivative(const ParametersType & itkNotUsed(parameters), DerivativeType & itkNotUsed(derivative)) const override
81 {}
82
84 MeasureType
85 GetValue(const ParametersType & parameters) const override;
86
90
92 double
94
96 double
97 EvaluateCumulativeGaussian(double argument) const;
98
100 unsigned int
101 GetNumberOfParameters() const override;
102
104 unsigned int
105 GetNumberOfValues() const override;
106
108 void
109 Initialize(unsigned int rangeDimension);
110
112 void
113 SetOriginalDataArray(MeasureType * setOriginalDataArray);
114
115protected:
118
119 void
120 PrintSelf(std::ostream & os, Indent indent) const override;
121
122private:
124 MeasureType m_OriginalDataArray{};
125
127 unsigned int m_RangeDimension{ 0 };
128
130 mutable MeasureType m_Measure{};
131 mutable MeasureType m_MeasurePointer{};
132 mutable ParametersType m_Parameters{};
133};
134} // end namespace itk
135
136#endif
Cost function for the Cumulative Gaussian Optimizer.
MeasureType GetValue(const ParametersType &parameters) const override
void GetDerivative(const ParametersType &, DerivativeType &) const override
void Initialize(unsigned int rangeDimension)
void SetOriginalDataArray(MeasureType *setOriginalDataArray)
unsigned int GetNumberOfParameters() const override
unsigned int GetNumberOfValues() const override
double CalculateFitError(MeasureType *setTestArray)
double EvaluateCumulativeGaussian(double argument) const
MeasureType * GetValuePointer(ParametersType &parameters)
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
This class is a base for the CostFunctions returning a multiple values.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....