Commit 81105980 authored by David Gobbi's avatar David Gobbi
Browse files

BUG 05500: Allow catching of vtkWarpTransform errors.

parent 7141a54c
......@@ -218,12 +218,7 @@ void vtkWarpInverseTransformPoint(vtkWarpTransform *self,
inverse[2] = lastInverse[2] - f*deltaI[2];
}
if (self->GetDebug())
{
vtkGenericWarningMacro(<<"Debug: In " __FILE__ ", line "<< __LINE__ <<"\n"
<< self->GetClassName() << " (" << self
<<") Inverse Iterations: " << (i+1));
}
vtkDebugWithObjectMacro(self, "Inverse Iterations: " << (i+1));
if (i >= n)
{
......@@ -233,11 +228,9 @@ void vtkWarpInverseTransformPoint(vtkWarpTransform *self,
inverse[2] = lastInverse[2];
// print warning: Newton's method didn't converge
vtkGenericWarningMacro(<<
"Warning: In " __FILE__ ", line " << __LINE__ << "\n" <<
self->GetClassName() << " (" << self << ") " <<
vtkErrorWithObjectMacro(self,
"InverseTransformPoint: no convergence (" <<
point[0] << ", " << point[1] << ", " << point[2] <<
point[0] << ", " << point[1] << ", " << point[2] <<
") error = " << sqrt(errorSquared) << " after " <<
i << " iterations.");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment