Skip to content
Snippets Groups Projects
Commit cc10d96d authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

BUG: Adjusting tolerance value multiplier to avoid zeros (this is still more...

BUG: Adjusting tolerance value multiplier to avoid zeros (this is still more restrictive than before for small values)
parent 90cf77af
Branches
Tags
No related merge requests found
......@@ -192,11 +192,13 @@ DifferenceImageFilter<TInputImage, TOutputImage>
}
//for complex and vector type. FIXME: module might be better
ScalarRealType tMax=vcl_abs(t[0]);
for (unsigned int j = 0;j<t.Size();++j)
{
if (vcl_abs(t[j])>tMax) tMax = vcl_abs(t[j]);
}
// ScalarRealType tMax=vcl_abs(t[0]);
ScalarRealType tMax=0.01;//Avoiding the 0 case for neighborhood computing
// NB: still more restrictive than before for small values.
for (unsigned int j = 0;j<t.Size();++j)
{
if (vcl_abs(t[j])>tMax) tMax = vcl_abs(t[j]);
}
// Check if difference is above threshold
// the threshold is interpreted as relative to the value
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment