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
No related branches found
No related tags found
No related merge requests found
...@@ -192,11 +192,13 @@ DifferenceImageFilter<TInputImage, TOutputImage> ...@@ -192,11 +192,13 @@ DifferenceImageFilter<TInputImage, TOutputImage>
} }
//for complex and vector type. FIXME: module might be better //for complex and vector type. FIXME: module might be better
ScalarRealType tMax=vcl_abs(t[0]); // ScalarRealType tMax=vcl_abs(t[0]);
for (unsigned int j = 0;j<t.Size();++j) ScalarRealType tMax=0.01;//Avoiding the 0 case for neighborhood computing
{ // NB: still more restrictive than before for small values.
if (vcl_abs(t[j])>tMax) tMax = vcl_abs(t[j]); 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 // Check if difference is above threshold
// the threshold is interpreted as relative to the value // 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.
Finish editing this message first!
Please register or to comment