25 vnl_matrix<double> ADCMatrix(SignalMatrix.rows(),SignalMatrix.cols());
28 for(
unsigned int i = 0 ; i < SignalMatrix.rows(); ++i)
29 for(
unsigned int j = 0; j < SignalMatrix.cols(); ++j)
30 ADCMatrix(i,j) = std::log(SignalMatrix(i,j) / S0) / (-
m_BValueList[j]);
34 for(
unsigned int i = 0 ; i < SignalMatrix.rows(); ++i){
35 double averageADC = ADCMatrix.get_row(i).mean();
41 for(
unsigned int j = 0 ; j < SignalMatrix.cols(); ++j)
42 error += std::pow(SignalMatrix(i,j) - S0 * std::exp(-
m_BValueList[j] * averageADC),2);
43 error /= (double)SignalMatrix.cols();
44 error = std::sqrt(error);
46 newSignal.put(i, 1, error );
vnl_vector< double > m_BValueList
void operator()(vnl_matrix< double > &newSignal, const vnl_matrix< double > &SignalMatrix, const double &S0) override
operator ()