24 vnl_vector<double> initalGuess(2);
31 vnl_levenberg_marquardt minimizer(model);
32 minimizer.set_max_function_evals(1000);
33 minimizer.set_f_tolerance(1e-10);
36 for(
unsigned int i = 0 ; i < SignalMatrix.rows(); i++)
38 model.set_measurements(SignalMatrix.get_row(i));
39 model.set_reference_measurement(S0);
41 initalGuess.put(0, 0.f);
42 initalGuess.put(1, 0.8f);
45 minimizer.minimize_without_gradient(initalGuess);
47 const double & ADC = initalGuess.get(0);
48 const double & AKC = initalGuess.get(1);
51 newSignal.put(i, 1, minimizer.get_end_error());
void operator()(vnl_matrix< double > &newSignal, const vnl_matrix< double > &SignalMatrix, const double &S0) override
operator ()
The lestSquaresFunction struct for Non-Linear-Least-Squres fit of Kurtosis.
vnl_vector< double > m_BValueList
void set_bvalues(const vnl_vector< double > &x)