[vtkusers] vtkImageViewer2::Render
Mathieu Malaterre
Mathieu.Malaterre at creatis.insa-lyon.fr
Mon Sep 1 07:45:26 EDT 2003
Hi all,
I am using vtkImageViewer2, but I find something a bit annoying.
In vtkImageViewer2::Render, line 256, there is this code:
256: this->Renderer->GetActiveCamera()->ParallelProjectionOn();
as a result if you zoom or pan with the mouse and *then* play with
windowlevel event, you loose your zooming and panning.
Furthermore there doesn't seems to be such code in
vtkImageViewer::Render. Is there any reason why it is there ? Otherwise
could someone just remove it, thanks.
Here is a sample python code that reproduce the problem:
################################
#Play first with the middle or right button
#then play with the left button
import vtk
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
reader = vtk.vtkPNGReader ()
reader.SetDataSpacing (0.8, 0.8, 1.5)
reader.SetFileName ( VTK_DATA_ROOT + "/Data/fullhead15.png")
iren = vtk.vtkRenderWindowInteractor()
viewer = vtk.vtkImageViewer2()
viewer.SetInput ( reader.GetOutput() )
viewer.SetupInteractor (iren)
iren.Initialize()
iren.Start()
##################################
Thanks,
mathieu
--
Mathieu Malaterre
CREATIS
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
http://www.creatis.insa-lyon.fr/~malaterre/
More information about the vtkusers
mailing list