[vtkusers] Camera Question

WolfgangZillig wollez at gmx.net
Sat Feb 24 07:31:25 EST 2007


Hi,

I'm displaying picture with the extend of 1024x1024 in a RenderWindow of 
Size 800x800. The image gets displayed nicely but I have a big (in this 
case) black space around the image. Setting the Zoom(1.45) is more or 
less what I want to have. But how to do it correctly.

Thanks
Wolfgang

More or less the structure that I have:

# import of matrix missing
iActor=vtk.vtkImageActor()
ren = vtk.vtkRenderer()
ren.AddActor(iActor)
ren.GetActiveCamera().Zoom(1.45)

renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren)
renWin.SetSize(800,800)
interactor = vtk.vtkInteractorStyleImage()

iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
iren.SetInteractorStyle(interactor)

iren.Initialize()
iren.Start()




More information about the vtkusers mailing list