Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 740
    • Issues 740
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 197
    • Merge requests 197
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Issues
  • #9062
Closed
Open
Created May 24, 2009 by Kitware Robot@kwrobotOwner

vtkTransform GetOrientationWXYZ returns wrong values after hand-inverting scaling

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.


This bug was found using VTK 5.0.4 with Python 2.5.2 [GCC 4.3.2]

vtkTransform GetOrientationWXYZ returns wrong values if the vtkTransform has undergone hand-inverting scaling.

Here is a simple python example where one wants to define the isometric transform (x,y,z)->(-x,-y,-z) that inverts the coordinates trhough the origin:

from vtk import * T = vtkTransform() T.Scale(-1,-1,-1)

While T.GetMatrix(), T.GetScale() and T.GetPosition() return the expected values, T.GetOrientationWXYZ() does not:

print T.GetMatrix() vtkMatrix4x4 (0x16515f0) Debug: Off Modified Time: 9 Reference Count: 3 Registered Events: (none) Elements: -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1

T.GetScale() (-1.0, -1.0, -1.0)

T.GetPosition() (0.0, 0.0, 0.0)

T.GetOrientationWXYZ() (180.0, 0.0, 0.0, 1.0)

T.GetOrientationWXYZ should return (0.0, 0.0, 0.0, 1.0), not (180.0, 0.0, 0.0, 1.0).

Combining an OrientationWXYZ=(180.0, 0.0, 0.0, 1.0) with the Scale and Position given above would correspond to the isometry (x,y,z)->(x,y,-z) which is a mirror reflection throgh the (xy) plane, not an inversion through the origin.

I came across this problem using VTK 5.0.4 with Python 2.5.2 [GCC 4.3.2]. Using the previous VTK 5.0.3 version, T.GetOrientationWXZY() would produce a more serious segmentation fault. This bug has been fixed in VTK 5.0.4 (http://www.kitware.com/news/home/browse/VTK?2008_01_22&VTK+Patch+Release) but apparently the results returned by GetOrientationWXZY() are not correct yet.

I have not tested with more recent version of VTK. Nor have I checked the GetOrientation() returned values ...

Assignee
Assign to
Time tracking