Skip to content
Snippets Groups Projects
Commit b679db9f authored by Jonathan Guinet's avatar Jonathan Guinet
Browse files

BUG: pointer dereferencing problem.

parent c0dcec4c
Branches
Tags
No related merge requests found
......@@ -99,9 +99,15 @@ SpectralResponse<TPrecision, TValuePrecision>
//Suppose that the vector is sorted
//Guess a starting lambda
if (m_Response.size() <= 1)
{
itkExceptionMacro(<<"ERROR spectral response need at least 2 value to perfomr interpolation.");
}
typename VectorPairType::const_iterator beg = m_Response.begin();
typename VectorPairType::const_iterator last = m_Response.end()--;
typename VectorPairType::const_iterator last = m_Response.end();
--last;
PrecisionType lambdaMin = (*beg).first;
PrecisionType lambdaMax = (*last).first;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment