MantisBT - VTK
View Issue Details
0000626VTK(No Category)public2004-02-25 09:062016-08-12 09:54
vdhel 
Kitware Robot 
normalmajoralways
closedmoved 
 
 
0000626: Aspect zooming doesn't work
Using vtkViewport::SetPixelAspect doens't work anymore. It used to work with version 4.0.

I think the problem is in vtkOpenGLCamera::Render.
In version 1.48 of vtkOpenGLCamere.cxx, L116, reads:
matrix->DeepCopy(this->GetPerspectiveTransformMatrix(aspect[0]/aspect[1],

This line is changed in version 1.49 () to read:
matrix->DeepCopy(this->GetPerspectiveTransformMatrix(1.0*usize/vsize,

In the latest version (1.61 L165/166) the line reads:
matrix->DeepCopy(this->GetPerspectiveTransformMatrix(aspectModification*usize/vsize, -1,1));


When I change the first parameter of GetPerspectiveTransformMatrix to:
aspectModification*aspect[0]/aspect[1]

the aspect zooming seems to work again.

Although I don't understand why it was changed to use usize/vsize, it seems odd to me that the aspect is not taking into account when the renderer and viewport report the same aspect ratio (which is the case in my case)
No tags attached.
? aniso.py (471) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5106/aniso.py
Issue History
2008-02-06 10:20Jeff BaumesAssigned To => François Bertel
2010-09-07 13:47François BertelAssigned ToFrançois Bertel =>
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:54Kitware RobotNote Added: 0036718
2016-08-12 09:54Kitware RobotStatusexpired => closed
2016-08-12 09:54Kitware RobotResolutionopen => moved
2016-08-12 09:54Kitware RobotAssigned To => Kitware Robot

Notes
(0001092)
Mathieu Malaterre   
2004-05-21 10:25   
Adding a simple python demo.
(0036718)
Kitware Robot   
2016-08-12 09:54   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.