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, ...@@ -218,12 +218,7 @@ void vtkWarpInverseTransformPoint(vtkWarpTransform *self,
inverse[2] = lastInverse[2] - f*deltaI[2]; inverse[2] = lastInverse[2] - f*deltaI[2];
} }
if (self->GetDebug()) vtkDebugWithObjectMacro(self, "Inverse Iterations: " << (i+1));
{
vtkGenericWarningMacro(<<"Debug: In " __FILE__ ", line "<< __LINE__ <<"\n"
<< self->GetClassName() << " (" << self
<<") Inverse Iterations: " << (i+1));
}
if (i >= n) if (i >= n)
{ {
...@@ -233,11 +228,9 @@ void vtkWarpInverseTransformPoint(vtkWarpTransform *self, ...@@ -233,11 +228,9 @@ void vtkWarpInverseTransformPoint(vtkWarpTransform *self,
inverse[2] = lastInverse[2]; inverse[2] = lastInverse[2];
// print warning: Newton's method didn't converge // print warning: Newton's method didn't converge
vtkGenericWarningMacro(<< vtkErrorWithObjectMacro(self,
"Warning: In " __FILE__ ", line " << __LINE__ << "\n" <<
self->GetClassName() << " (" << self << ") " <<
"InverseTransformPoint: no convergence (" << "InverseTransformPoint: no convergence (" <<
point[0] << ", " << point[1] << ", " << point[2] << point[0] << ", " << point[1] << ", " << point[2] <<
") error = " << sqrt(errorSquared) << " after " << ") error = " << sqrt(errorSquared) << " after " <<
i << " iterations."); 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