9 double m0Value = parameters[0];
10 double t1Value = parameters[1];
12 double residualValue = 0;
13 unsigned int numSignals = m_RelaxometrySignals.size();
15 for (
unsigned int i = 0;i < numSignals;++i)
17 double simulatedSignal = m0Value * (1.0 - std::exp(- m_TRValues[i] / t1Value));
18 residualValue += (simulatedSignal - m_RelaxometrySignals[i]) * (simulatedSignal - m_RelaxometrySignals[i]);
28 double m0Value = parameters[0];
29 double t1Value = parameters[1];
33 unsigned int numSignals = m_RelaxometrySignals.size();
37 for (
unsigned int i = 0;i < numSignals;++i)
39 double expValue = 1.0 - std::exp(- m_TRValues[i] / t1Value);
41 derivative[0] += expValue * (m0Value * expValue - m_RelaxometrySignals[i]);
43 derivative[1] += (m0Value * expValue - m_RelaxometrySignals[i]) * m0Value * m_TRValues[i] * (1.0 - expValue) / (t1Value * t1Value);
virtual void GetDerivative(const ParametersType ¶meters, DerivativeType &derivative) const ITK_OVERRIDE
Superclass::MeasureType MeasureType
Superclass::DerivativeType DerivativeType
unsigned int GetNumberOfParameters() const ITK_OVERRIDE
virtual MeasureType GetValue(const ParametersType ¶meters) const ITK_OVERRIDE
Superclass::ParametersType ParametersType