Medical Imaging Interaction Toolkit  2023.12.99-63768887
Medical Imaging Interaction Toolkit
mitkLevenbergMarquardtModelFitFunctor.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 mitkLevenbergMarquardtModelFitFunctor_h
14 #define mitkLevenbergMarquardtModelFitFunctor_h
15 
16 #include <itkObject.h>
17 #include <itkLevenbergMarquardtOptimizer.h>
18 
19 #include "mitkModelBase.h"
22 
23 #include "MitkModelFitExports.h"
24 
25 namespace mitk
26 {
27 
29  {
30  public:
35 
36  itkNewMacro(Self);
38 
41 
42  itkSetMacro(Epsilon, double);
43  itkSetMacro(GradientTolerance, double);
44  itkSetMacro(ValueTolerance, double);
45  itkSetMacro(DerivativeStepLength, double);
46  itkSetMacro(Iterations, unsigned int);
47  itkSetMacro(Scales, ::itk::LevenbergMarquardtOptimizer::ScalesType);
48 
49  itkGetMacro(Epsilon, double);
50  itkGetMacro(GradientTolerance, double);
51  itkGetMacro(ValueTolerance, double);
52  itkGetMacro(DerivativeStepLength, double);
53  itkGetMacro(Iterations, unsigned int);
54  itkGetMacro(Scales, ::itk::LevenbergMarquardtOptimizer::ScalesType);
55 
56  itkSetConstObjectMacro(ConstraintChecker, ConstraintCheckerBase);
57  itkGetConstObjectMacro(ConstraintChecker, ConstraintCheckerBase);
58  itkSetMacro(ActivateFailureThreshold, bool);
59  itkGetConstMacro(ActivateFailureThreshold, bool);
60 
61  ParameterNamesType GetCriterionNames() const override;
62 
63  protected:
64 
67 
69 
71 
72  ParametersType DoModelFit(const SignalType& value, const ModelBase* model,
73  const ModelBase::ParametersType& initialParameters,
74  DebugParameterMapType& debugParameters) const override;
75 
76  OutputPixelArrayType GetCriteria(const ModelBase* model, const ParametersType& parameters,
77  const SignalType& sample) const override;
78 
80  virtual MVModelFitCostFunction::Pointer GenerateCostFunction(const SignalType& value,
81  const ModelBase* model) const;
82 
83  ParameterNamesType DefineDebugParameterNames() const override;
84 
85  private:
86  double m_Epsilon;
87  double m_GradientTolerance;
88  double m_ValueTolerance;
89  unsigned int m_Iterations;
90  double m_DerivativeStepLength;
91  ::itk::LevenbergMarquardtOptimizer::ScalesType m_Scales;
92 
95  ConstraintCheckerBase::ConstPointer m_ConstraintChecker;
98  bool m_ActivateFailureThreshold;
99  };
100 
101 }
102 
103 
104 #endif
mitk::ModelFitFunctorBase::ParameterNamesType
ModelBase::ParameterNamesType ParameterNamesType
Definition: mitkModelFitFunctorBase.h:64
mitk::ModelFitFunctorBase::OutputPixelArrayType
std::vector< ParameterImagePixelType > OutputPixelArrayType
Definition: mitkModelFitFunctorBase.h:42
MitkModelFitExports.h
mitk::LevenbergMarquardtModelFitFunctor::OutputPixelArrayType
Superclass::OutputPixelArrayType OutputPixelArrayType
Definition: mitkLevenbergMarquardtModelFitFunctor.h:40
mitk::ModelBase::ParametersType
ModelTraitsInterface::ParametersType ParametersType
Definition: mitkModelBase.h:59
mitk::ConstraintCheckerBase
This class is the base class for constraint checker.
Definition: mitkConstraintCheckerBase.h:31
itk::SmartPointer< Self >
MITKMODELFIT_EXPORT
#define MITKMODELFIT_EXPORT
Definition: MitkModelFitExports.h:15
mitkModelBase.h
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::ModelFitFunctorBase::SignalType
ModelFitCostFunctionInterface::SignalType SignalType
Definition: mitkModelFitFunctorBase.h:88
mitk::LevenbergMarquardtModelFitFunctor::Pointer
itk::SmartPointer< Self > Pointer
Definition: mitkLevenbergMarquardtModelFitFunctor.h:33
mitk::LevenbergMarquardtModelFitFunctor::SignalType
Superclass::SignalType SignalType
Definition: mitkLevenbergMarquardtModelFitFunctor.h:66
mitk::LevenbergMarquardtModelFitFunctor::Superclass
ModelFitFunctorBase Superclass
Definition: mitkLevenbergMarquardtModelFitFunctor.h:32
mitk::ModelFitFunctorBase::DebugParameterMapType
std::map< std::string, ParameterImagePixelType > DebugParameterMapType
Definition: mitkModelFitFunctorBase.h:110
mitk::LevenbergMarquardtModelFitFunctor::Self
LevenbergMarquardtModelFitFunctor Self
Definition: mitkLevenbergMarquardtModelFitFunctor.h:31
mitkModelFitFunctorBase.h
mitk::ModelFitFunctorBase
Definition: mitkModelFitFunctorBase.h:30
mitk::LevenbergMarquardtModelFitFunctor::ParametersType
Superclass::ParametersType ParametersType
Definition: mitkLevenbergMarquardtModelFitFunctor.h:65
mitkMVConstrainedCostFunctionDecorator.h
mitk::ModelFitFunctorBase::ParametersType
ModelBase::ParametersType ParametersType
Definition: mitkModelFitFunctorBase.h:83
mitk::LevenbergMarquardtModelFitFunctor::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: mitkLevenbergMarquardtModelFitFunctor.h:34
mitk::LevenbergMarquardtModelFitFunctor
Definition: mitkLevenbergMarquardtModelFitFunctor.h:28
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::ModelFitFunctorBase::InputPixelArrayType
std::vector< ParameterImagePixelType > InputPixelArrayType
Definition: mitkModelFitFunctorBase.h:41
mitk::LevenbergMarquardtModelFitFunctor::InputPixelArrayType
Superclass::InputPixelArrayType InputPixelArrayType
Definition: mitkLevenbergMarquardtModelFitFunctor.h:37