ITK  5.4.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 
24 namespace itk
25 {
52 {
53 public:
59 
61  itkOverrideGetNameOfClassMacro(CumulativeGaussianCostFunction);
62 
64  itkNewMacro(Self);
65 
67  using ParametersType = Superclass::ParametersType;
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 
88  MeasureType *
89  GetValuePointer(ParametersType & parameters);
90 
92  double
93  CalculateFitError(MeasureType * setTestArray);
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 
115 protected:
117  ~CumulativeGaussianCostFunction() override;
118 
119  void
120  PrintSelf(std::ostream & os, Indent indent) const override;
121 
122 private:
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
itk::MultipleValuedCostFunction
This class is a base for the CostFunctions returning a multiple values.
Definition: itkMultipleValuedCostFunction.h:35
itk::OptimizerParameters< TInternalComputationValueType >
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::CumulativeGaussianCostFunction::GetDerivative
void GetDerivative(const ParametersType &, DerivativeType &) const override
Definition: itkCumulativeGaussianCostFunction.h:80
itk::CumulativeGaussianCostFunction::DerivativeType
Superclass::DerivativeType DerivativeType
Definition: itkCumulativeGaussianCostFunction.h:69
itkMultipleValuedCostFunction.h
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::Array< double >