<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi, all -<br><br>&nbsp; I am new to VTK world.<br>&nbsp; <br>&nbsp; My co-worker built a prototype using wxWidget, Pyhton &amp; VTK for viewing 3D CT image. She finished 3D volume rendering and I am taking over her task and continue the development work of displaying the 2D slices from a 3D volume.<br><br>&nbsp; I am planning to use vtkImageViewer2, here is the sample codes I am working on (I use a 2D slice to start with, teh Forest4.png with the size of 192 &amp; 256)) -<br><br>####################################<br>import vtk<br>from vtk.util.misc import vtkGetDataRoot<br>from vtk.wx.wxVTKRenderWindowInteractor import *<br>from wxPython.wx import *<br><br>app = wxPySimpleApp()<br><br>frame = wxFrame(None, -1, "wxRenderWindow", size=wxSize(400,400))<br>frame.Show(1)<br><br>reader = vtk.vtkPNGReader ()<br>reader.SetDataSpacing (1.0, 1.0,
 1.0)<br>reader.SetFileName ( "Forest4.png")<br><br>iren = wxVTKRenderWindowInteractor(frame, -1)<br>iren.AddObserver("ExitEvent", lambda o,e,f=frame: f.Close())<br><br>viewer = vtk.vtkImageViewer2()<br>viewer.SetInput ( reader.GetOutput() )<br>viewer.SetupInteractor (iren)<br>#viewer.GetRenderer().ResetCameraClippingRange()<br><br>app.MainLoop()<br>####################################<br><br>&nbsp; When I run this *.py file, I got the image displayed at the upper left corner of the view port, only occupied a small portion. How do I correctly set the zoom factor? <br><br>&nbsp; I googled vtkImageViewer2, back to 2003, there were many posts about bugs inside vtkImageViewer2 when using wxWidget -<br><br>http://public.kitware.com/pipermail/vtkusers/2003-September/069419.html&nbsp;&nbsp; <br><br>&nbsp; Is this problem fixed? I am using VTK version 5.2.<br><br>&nbsp; Any suggestions will be helpful, thanks.<br><br>Suyang<br></td></tr></table><br>