Skip to content

Commit

Permalink
Merge branch 'T27318-IvimFit'
Browse files Browse the repository at this point in the history
  • Loading branch information
peterneher committed May 8, 2020
2 parents 32e83db + 0076144 commit 3f11466
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,17 @@ ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, Threa
meas_m /= input.N;

vnl_matrix<double> X(input.N,2);
bool nan_element = false;
for(int i=0; i<input.N; i++)
{
X(i,0) = input.bvals[i] - bval_m;
X(i,1) = input.meas[i] - meas_m;
if (std::isnan(X(i,1)) || std::isnan(X(i,1)))
nan_element = true;
}

if (!nan_element)
{
vnl_matrix<double> XX = X.transpose() * X;
vnl_symmetric_eigensystem<double> eigs(XX);

Expand Down Expand Up @@ -505,6 +510,7 @@ ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, Threa

m_Snap.currentDStar = min_val + opt_idx * ((max_val-min_val) / num_its);
}
}
// MITK_INFO << "choosing " << opt_idx << " => " << DStar;
// x_dstar_only[0] = 0.01;
// // f 0.1 Dstar 0.01 D 0.001
Expand Down

0 comments on commit 3f11466

Please sign in to comment.