ITK  6.0.0
Insight Toolkit
itkSingleValuedCostFunction.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 itkSingleValuedCostFunction_h
19#define itkSingleValuedCostFunction_h
20
21#include "itkCostFunction.h"
22#include "itkNumericTraits.h"
23#include "ITKOptimizersExport.h"
24
25namespace itk
26{
34class ITKOptimizers_EXPORT SingleValuedCostFunction : public CostFunction
35{
36public:
37 ITK_DISALLOW_COPY_AND_MOVE(SingleValuedCostFunction);
38
44
46 itkOverrideGetNameOfClassMacro(SingleValuedCostFunction);
47
50 using MeasureType = double;
51
54 using ParametersType = Superclass::ParametersType;
55 using ParametersValueType = Superclass::ParametersValueType;
56
60
63 virtual MeasureType
64 GetValue(const ParametersType & parameters) const = 0;
65
68 virtual void
69 GetDerivative(const ParametersType & parameters, DerivativeType & derivative) const = 0;
70
73 virtual void
74 GetValueAndDerivative(const ParametersType & parameters, MeasureType & value, DerivativeType & derivative) const;
75
76protected:
79};
80} // end namespace itk
81
82#endif
Array class with size defined at construction time.
Definition: itkArray.h:48
Light weight base class for most itk classes.
This class is a base for the CostFunctions returning a single value.
Superclass::ParametersValueType ParametersValueType
virtual MeasureType GetValue(const ParametersType &parameters) const =0
virtual void GetValueAndDerivative(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
virtual void GetDerivative(const ParametersType &parameters, DerivativeType &derivative) const =0
Superclass::ParametersType ParametersType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
CostFunctionTemplate< double > CostFunction