10 double residualValue = 0;
11 unsigned int numT2Signals = m_T2RelaxometrySignals.size();
21 for (
unsigned int i = 0;i < m_T2Weights.size();++i)
23 if (m_T2Weights[i] == 0)
26 subSignalData = t2SignalSimulator.
GetValue(m_T1Value,m_T2Values[i],parameters[0] * m_T2FlipAngles[0],m_M0Value);
27 for (
unsigned int j = 0;j < numT2Signals;++j)
28 simulatedT2Values[j] += m_T2Weights[i] * subSignalData[j];
31 for (
unsigned int i = 0;i < numT2Signals;++i)
32 residualValue += (simulatedT2Values[i] - m_T2RelaxometrySignals[i]) * (simulatedT2Values[i] - m_T2RelaxometrySignals[i]);
virtual MeasureType GetValue(const ParametersType ¶meters) const ITK_OVERRIDE
std::vector< double > RealVectorType
void SetEchoSpacing(double val)
void SetExcitationFlipAngle(double val)
Superclass::ParametersType ParametersType
RealVectorType & GetValue(double t1Value, double t2Value, double flipAngle, double m0Value)
Get EPG values at given point.
void SetNumberOfEchoes(unsigned int val)
Superclass::MeasureType MeasureType