Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitkSVModelFitCostFunction.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkSVModelFitCostFunction_h
14 #define mitkSVModelFitCostFunction_h
15 
16 #include <itkSingleValuedCostFunction.h>
17 #include <itkMacro.h>
18 
20 
21 #include "MitkModelFitExports.h"
22 
23 namespace mitk
24 {
25 
27 class MITKMODELFIT_EXPORT SVModelFitCostFunction : public itk::SingleValuedCostFunction, public ModelFitCostFunctionInterface
28 {
29 public:
30 
32  typedef itk::SingleValuedCostFunction Superclass;
35 
37  typedef Superclass::MeasureType MeasureType;
38  typedef Superclass::DerivativeType DerivativeType;
39 
40  void SetSample(const SignalType &sampleSet) override;
41 
42  MeasureType GetValue(const ParametersType& parameter) const override;
43  void GetDerivative (const ParametersType &parameters, DerivativeType &derivative) const override;
44 
45  unsigned int GetNumberOfParameters (void) const override;
46 
47  itkSetConstObjectMacro(Model, ModelBase);
48  itkGetConstObjectMacro(Model, ModelBase);
49 
50  itkSetMacro(DerivativeStepLength, double);
51  itkGetConstMacro(DerivativeStepLength, double);
52 
53 protected:
54 
55  virtual MeasureType CalcMeasure(const ParametersType &parameters, const SignalType& signal) const = 0;
56 
57  SVModelFitCostFunction(): m_DerivativeStepLength(1e-5)
58  {
59  }
60 
62 
64 
65 private:
67 
69  double m_DerivativeStepLength;
70 };
71 
72 }
73 
74 #endif
mitk::SVModelFitCostFunction::Pointer
itk::SmartPointer< Self > Pointer
Definition: mitkSVModelFitCostFunction.h:33
mitk::ModelFitCostFunctionInterface::SignalType
itk::Array< double > SignalType
Definition: mitkModelFitCostFunctionInterface.h:30
mitk::SVModelFitCostFunction::SVModelFitCostFunction
SVModelFitCostFunction()
Definition: mitkSVModelFitCostFunction.h:57
mitk::ModelFitCostFunctionInterface
Definition: mitkModelFitCostFunctionInterface.h:24
MitkModelFitExports.h
itk::SmartPointer< Self >
MITKMODELFIT_EXPORT
#define MITKMODELFIT_EXPORT
Definition: MitkModelFitExports.h:15
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::SVModelFitCostFunction::Self
SVModelFitCostFunction Self
Definition: mitkSVModelFitCostFunction.h:31
mitk::SVModelFitCostFunction::Superclass
itk::SingleValuedCostFunction Superclass
Definition: mitkSVModelFitCostFunction.h:32
mitk::SVModelFitCostFunction::MeasureType
Superclass::MeasureType MeasureType
Definition: mitkSVModelFitCostFunction.h:37
mitk::SVModelFitCostFunction::DerivativeType
Superclass::DerivativeType DerivativeType
Definition: mitkSVModelFitCostFunction.h:38
mitk::SVModelFitCostFunction::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: mitkSVModelFitCostFunction.h:34
mitk::SVModelFitCostFunction
Definition: mitkSVModelFitCostFunction.h:27
mitk::SVModelFitCostFunction::~SVModelFitCostFunction
~SVModelFitCostFunction() override
Definition: mitkSVModelFitCostFunction.h:61
mitkModelFitCostFunctionInterface.h
mitk::SVModelFitCostFunction::m_Sample
SignalType m_Sample
Definition: mitkSVModelFitCostFunction.h:63
mitk::ModelBase
Base class for (dynamic) models. A model can be used to calculate its signal given the discrete time ...
Definition: mitkModelBase.h:47
mitk::SVModelFitCostFunction::SignalType
ModelFitCostFunctionInterface::SignalType SignalType
Definition: mitkSVModelFitCostFunction.h:36