24 typedef TestCostFunction
Self;
33 mutable unsigned int m_calls;
40 result[0] = parameters[0];
41 result[1] = parameters[1];
51 ~TestCostFunction()
override{}
62 decorator->SetModel(model);
63 innerCF->SetModel(model);
67 decorator->SetSample(signal);
68 innerCF->SetSample(signal);
77 model->SetTimeGrid(grid);
92 checker->SetLowerBarrier(0,1,4);
93 checker->SetUpperBarrier(0,100);
95 double defaultMaxPenalty = 1e15;
102 "Testing GetWrappedCostFunction for new decorator.");
104 "Testing GetWrappedCostFunction for new decorator.");
106 "Testing GetWrappedCostFunction for new decorator.");
109 decorator->SetWrappedCostFunction(innerCF);
111 decorator->SetWrappedCostFunction(
nullptr);
112 decorator->SetConstraintChecker(checker);
114 decorator->SetWrappedCostFunction(innerCF);
125 measure = decorator->GetValue(p2);
131 measure = decorator->GetValue(p3);
137 decorator->SetActivateFailureThreshold(
false);
138 measure = decorator->GetValue(p3);
143 decorator->SetActivateFailureThreshold(
true);
145 measure = decorator->GetValue(p4);
itk::SmartPointer< const Self > ConstPointer
ModelFitCostFunctionInterface::SignalType SignalType
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
int mitkMVConstrainedCostFunctionDecoratorTest(int, char *[])
itk::Array< double > TimeGridType
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
itk::SmartPointer< Self > Pointer
#define MITK_TEST_FOR_EXCEPTION(EXCEPTIONCLASS, STATEMENT)
Simplified version of MITK_TEST_FOR_EXCEPTION_BEGIN / END for a single statement. ...
An object of this class represents an exception of MITK. Please don't instantiate exceptions manually...
MVModelFitCostFunction Self
Superclass::MeasureType MeasureType
itk::MultipleValuedCostFunction Superclass
Superclass::ParametersType ParametersType
virtual MeasureType CalcMeasure(const ParametersType ¶meters, const SignalType &signal) const =0