10 m_T2Value = parameters[0];
11 m_B1Value = parameters[1];
13 double residualValue = 0;
14 unsigned int numT2Signals = m_T2RelaxometrySignals.size();
23 double sumSignals = 0;
24 double sumSimulatedSignals = 0;
25 for (
unsigned int i = 0;i < numT2Signals;++i)
27 sumSignals += m_T2RelaxometrySignals[i];
28 sumSimulatedSignals += simulatedT2Values[i];
31 m_M0Value = sumSignals / sumSimulatedSignals;
33 for (
unsigned int i = 0;i < numT2Signals;++i)
34 residualValue += (m_M0Value * simulatedT2Values[i] - m_T2RelaxometrySignals[i]) * (m_M0Value * simulatedT2Values[i] - m_T2RelaxometrySignals[i]);
Superclass::MeasureType MeasureType
std::vector< double > RealVectorType
virtual MeasureType GetValue(const ParametersType ¶meters) const ITK_OVERRIDE
void SetEchoSpacing(double val)
void SetExcitationFlipAngle(double val)
RealVectorType & GetValue(double t1Value, double t2Value, double flipAngle, double m0Value)
Get EPG values at given point.
void SetNumberOfEchoes(unsigned int val)
Superclass::ParametersType ParametersType