[vtk-developers] [VTK 0011837]: Wrong result for warp transforms in some circumstances
Mantis Bug Tracker
mantis at public.kitware.com
Thu Feb 10 12:20:49 EST 2011
The following issue has been SUBMITTED.
======================================================================
http://vtk.org/Bug/view.php?id=11837
======================================================================
Reported By: David Gobbi
Assigned To: David Gobbi
======================================================================
Project: VTK
Issue ID: 11837
Category: (No Category)
Reproducibility: always
Severity: major
Priority: normal
Status: assigned
======================================================================
Date Submitted: 2011-02-10 12:20 EST
Last Modified: 2011-02-10 12:20 EST
======================================================================
Summary: Wrong result for warp transforms in some
circumstances
Description:
If the reslice input origin, spacing are 0.0, 1.0 and if the ResliceAxes are not
set or are identity, then any warp transform (i.e. transform not expressible as
a 4x4 matrix) will be applied with an incorrect shift and/or scale applied to
the coordinates, unless the output origin, spacing are also 0.0, 1.0.
These circumstances seem to be rare enough that this bug has gone undetected
since it was introduced in Aug, 2001 by commit
5a638df69fe075a1d231b307fd354edd2cb890e7.
Steps to Reproduce:
In Hybrid/Testing/Tcl/TestGridWarpCubic.tcl, add the following lines to the
reslice setup:
reslice SetOutputOrigin -32.0 -32.0 0.0
reslice SetOutputExtent 0 255 0 255 0 0
One would expect that this would cause a translation in the output, but it does
not.
Additional Information:
The following patch fixes the issue:
--- a/Imaging/vtkImageReslice.cxx
+++ b/Imaging/vtkImageReslice.cxx
@@ -3514,7 +3514,7 @@ vtkMatrix4x4
*vtkImageReslice::GetIndexMatrix(vtkInformation *inInfo,
if ((this->OptimizedTransform == NULL &&
(inSpacing[i] != outSpacing[i] || inOrigin[i] != outOrigin[i])) ||
(this->OptimizedTransform != NULL &&
- (inSpacing[i] != 1.0 || inOrigin[i] != 0.0)))
+ (outSpacing[i] != 1.0 || outOrigin[i] != 0.0)))
{
isIdentity = 0;
}
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-02-10 12:20 David Gobbi New Issue
2011-02-10 12:20 David Gobbi Status new => assigned
2011-02-10 12:20 David Gobbi Assigned To => David Gobbi
======================================================================
More information about the vtk-developers
mailing list