View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011837VTK(No Category)public2011-02-10 12:202011-02-10 13:44
ReporterDavid Gobbi 
Assigned ToDavid Gobbi 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0011837: Wrong result for warp transforms in some circumstances
DescriptionIf 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 ReproduceIn 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 InformationThe 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;
       }
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0025381)
David Gobbi (developer)
2011-02-10 13:44

Fixed by commit cc1e8f59fda5a2c97afd1e81ae98cdab44ae5f94

 Issue History
Date Modified Username Field Change
2011-02-10 12:20 David Gobbi New Issue
2011-02-10 12:20 David Gobbi Status backlog => tabled
2011-02-10 12:20 David Gobbi Assigned To => David Gobbi
2011-02-10 13:44 David Gobbi Note Added: 0025381
2011-02-10 13:44 David Gobbi Status tabled => closed
2011-02-10 13:44 David Gobbi Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team