[vtkusers] Setup an interactor when using vtkImageViewer

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Sep 4 15:56:56 EDT 2006


Gheorghe Postelnicu wrote:
> Hi,
> 
> I would like to use vtkImageViewer in a Python script, but I have a
> hard time using the interactor associated with the renderer.
> 
> The method viewer.GetRenderWindow().GetInteractor() returns None and I
> see there is a protected member interactor in vtkImageViewer.

Gheorghe,

	You are not describing the steps you followed. Have you read the online 
documentation for vtkImageViewer ?

http://www.vtk.org/doc/nightly/html/classvtkImageViewer.html

	Have look at the tests/examples associated with vtkImageViewer ? Do 
they miss something you are trying to achieve ?

http://www.vtk.org/doc/nightly/html/c2_vtk_e_2.html#c2_vtk_e_vtkImageViewer
http://www.vtk.org/doc/nightly/html/c2_vtk_t_7.html#c2_vtk_t_vtkImageViewer

	You seems to be using VTK+Tk+Python. Have you played with the examples 
in VTK/Wrapping/vtk/tk. Do they work for you ? What are they missing ?

	If you see a problem, please post a simple code to reproduce. In your 
case, a simple python+tk script that demonstrate the problem is fine 
(use Data from VTKData is possible). Do not forget to specify the 
version of VTK you are using.

Thanks
Mathieu



More information about the vtkusers mailing list