Medical Imaging Interaction Toolkit  2023.12.99-ed252ae7
Medical Imaging Interaction Toolkit
mitkMVModelFitCostFunction.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 mitkMVModelFitCostFunction_h
14 #define mitkMVModelFitCostFunction_h
15 
16 #include <itkMultipleValuedCostFunction.h>
17 #include <itkMacro.h>
18 
20 
21 #include "MitkModelFitExports.h"
22 
23 namespace mitk
24 {
25 
30 class MITKMODELFIT_EXPORT MVModelFitCostFunction : public itk::MultipleValuedCostFunction, public ModelFitCostFunctionInterface
31 {
32 public:
33 
35  typedef itk::MultipleValuedCostFunction Superclass;
38 
40  typedef Superclass::MeasureType MeasureType;
41  typedef Superclass::DerivativeType DerivativeType;
42 
43  void SetSample(const SignalType &sampleSet) override;
44 
45  MeasureType GetValue(const ParametersType& parameter) const override;
46  void GetDerivative (const ParametersType &parameters, DerivativeType &derivative) const override;
47 
48  unsigned int GetNumberOfValues (void) const override;
49  unsigned int GetNumberOfParameters (void) const override;
50 
51  itkSetConstObjectMacro(Model, ModelBase);
52  itkGetConstObjectMacro(Model, ModelBase);
53 
54  itkSetMacro(DerivativeStepLength, double);
55  itkGetConstMacro(DerivativeStepLength, double);
56 
57 protected:
58 
59  virtual MeasureType CalcMeasure(const ParametersType &parameters, const SignalType& signal) const = 0;
60 
61  MVModelFitCostFunction() : m_DerivativeStepLength(1e-5)
62  {
63  }
64 
66 
68 
69 private:
71 
73  double m_DerivativeStepLength;
74 };
75 
76 }
77 
78 #endif
mitk::MVModelFitCostFunction::Superclass
itk::MultipleValuedCostFunction Superclass
Definition: mitkMVModelFitCostFunction.h:35
mitk::ModelFitCostFunctionInterface::SignalType
itk::Array< double > SignalType
Definition: mitkModelFitCostFunctionInterface.h:30
mitk::ModelFitCostFunctionInterface
Definition: mitkModelFitCostFunctionInterface.h:24
mitk::MVModelFitCostFunction
Definition: mitkMVModelFitCostFunction.h:30
MitkModelFitExports.h
itk::SmartPointer< Self >
mitk::MVModelFitCostFunction::m_Sample
SignalType m_Sample
Definition: mitkMVModelFitCostFunction.h:67
MITKMODELFIT_EXPORT
#define MITKMODELFIT_EXPORT
Definition: MitkModelFitExports.h:15
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::MVModelFitCostFunction::MeasureType
Superclass::MeasureType MeasureType
Definition: mitkMVModelFitCostFunction.h:40
mitk::MVModelFitCostFunction::~MVModelFitCostFunction
~MVModelFitCostFunction() override
Definition: mitkMVModelFitCostFunction.h:65
mitk::MVModelFitCostFunction::Self
MVModelFitCostFunction Self
Definition: mitkMVModelFitCostFunction.h:34
mitk::MVModelFitCostFunction::SignalType
ModelFitCostFunctionInterface::SignalType SignalType
Definition: mitkMVModelFitCostFunction.h:39
mitk::MVModelFitCostFunction::DerivativeType
Superclass::DerivativeType DerivativeType
Definition: mitkMVModelFitCostFunction.h:41
mitkModelFitCostFunctionInterface.h
mitk::MVModelFitCostFunction::MVModelFitCostFunction
MVModelFitCostFunction()
Definition: mitkMVModelFitCostFunction.h:61
mitk::MVModelFitCostFunction::Pointer
itk::SmartPointer< Self > Pointer
Definition: mitkMVModelFitCostFunction.h:36
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::MVModelFitCostFunction::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: mitkMVModelFitCostFunction.h:37