[vtkusers] Inheritance of QVTKInteractor under Python
    Andrea Borsic 
    Andrea.Borsic at Dartmouth.edu
       
    Mon May  7 14:34:28 EDT 2012
    
    
  
Hi,
I am using VTK 5.8 under Windows 7 64bit and OSX Lion, wrapped for 
Python with SIP.
Under both platforms I am unable to add observers to QVTKInteractor as 
the method .AddObserver appears not to be an attribute of the class, 
even though the class is derived from vtkRenderWindowInteractor.
For example this small test program:
import vtk
a = vtk.QVTKInteractor()
dir(a)
results in:
  ['ContextMenuEvent', 'DragEnterEvent', 'DragLeaveEvent', 
'DragMoveEvent', 'DropEvent', 'GetClassName', 'Initialize', 'IsA', 
'Start', 'StartListening', 'StopListening', 'TerminateApp', 'TimerEvent']
while
b = vtk.vtkRenderWindowInteractor()
dir(b)
results in:
['AddObserver', 'BreakOnError', 'CharEvent', 'ConfigureEvent', 
'CreateDefaultPicker', 'CreateOneShotTimer', 'CreateRepeatingTimer', 
'CreateTimer', 'DebugOff', 'DebugOn', 'DestroyTimer', 'Disable', 
'Enable', 'EnableRenderOff', 'EnableRenderOn', 'EndPickCallback', 
'EnterEvent', 'ExitCallback', 'ExitEvent', 'ExposeEvent', 'FastDelete', 
'FindPokedRenderer', 'FlyTo', 'FlyToImage', 'GetAddressAsString', 
'GetAltKey', 'GetClassName', 'GetControlKey', 'GetDebug', 
'GetDesiredUpdateRate', 'GetDesiredUpdateRateMaxValue', 
'GetDesiredUpdateRateMinValue', 'GetDolly', 'GetEnableRender', 
'GetEnabled', 'GetEventPosition', 'GetEventSize', 
'GetGlobalWarningDisplay', 'GetInitialized', 'GetInstallMessageProc', 
'GetInteractorStyle', 'GetKeyCode', 'GetKeySym', 'GetLastEventPosition', 
'GetLightFollowCamera', 'GetMTime', 'GetNumberOfFlyFrames', 
'GetNumberOfFlyFramesMaxValue', 'GetNumberOfFlyFramesMinValue', 
'GetObserverMediator', 'GetPicker', 'GetReferenceCount', 
'GetRenderWindow', 'GetRepeatCount', 'GetShiftKey', 'GetSize', 
'GetStillUpdateRate', 'GetStillUpdateRateMaxValue', 
'GetStillUpdateRateMinValue', 'GetTimerDuration', 
'GetTimerDurationMaxValue', 'GetTimerDurationMinValue', 
'GetTimerEventDuration', 'GetTimerEventId', 'GetTimerEventPlatformId', 
'GetTimerEventType', 'GetUseTDx', 'GetVTKTimerId', 
'GlobalWarningDisplayOff', 'GlobalWarningDisplayOn', 'HasObserver', 
'HideCursor', 'Initialize', 'InstallMessageProcOff', 
'InstallMessageProcOn', 'InvokeEvent', 'IsA', 'IsOneShotTimer', 
'IsTypeOf', 'KeyPressEvent', 'KeyReleaseEvent', 'LeaveEvent', 
'LeftButtonPressEvent', 'LeftButtonReleaseEvent', 
'LightFollowCameraOff', 'LightFollowCameraOn', 'MiddleButtonPressEvent', 
'MiddleButtonReleaseEvent', 'Modified', 'MouseMoveEvent', 
'MouseWheelBackwardEvent', 'MouseWheelForwardEvent', 'NewInstance', 
'OneShotTimer', 'PrintRevisions', 'ReInitialize', 'Register', 
'RemoveAllObservers', 'RemoveObserver', 'RemoveObservers', 'Render', 
'RepeatingTimer', 'ResetTimer', 'RightButtonPressEvent', 
'RightButtonReleaseEvent', 'SafeDownCast', 'SetAltKey', 
'SetClassExitMethod', 'SetControlKey', 'SetDebug', 
'SetDesiredUpdateRate', 'SetDolly', 'SetEnableRender', 
'SetEventInformation', 'SetEventInformationFlipY', 'SetEventPosition', 
'SetEventPositionFlipY', 'SetEventSize', 'SetGlobalWarningDisplay', 
'SetInstallMessageProc', 'SetInteractorStyle', 'SetKeyCode', 
'SetKeyEventInformation', 'SetKeySym', 'SetLastEventPosition', 
'SetLightFollowCamera', 'SetNumberOfFlyFrames', 'SetPicker', 
'SetReferenceCount', 'SetRenderWindow', 'SetRepeatCount', 'SetShiftKey', 
'SetSize', 'SetStillUpdateRate', 'SetTimerDuration', 
'SetTimerEventDuration', 'SetTimerEventId', 'SetTimerEventPlatformId', 
'SetTimerEventType', 'SetUseTDx', 'ShowCursor', 'Start', 
'StartPickCallback', 'TerminateApp', 'UnRegister', 'UpdateSize', 
'UserCallback']
It doesn't seem to me that this behavior is intended.
Is anybody else experiencing this ?
Best Regards,
Andrea
    
    
More information about the vtkusers
mailing list