Slicer3:VTK Observer Debugging:ExampleOutput
From NAMIC Wiki
Home < Slicer3:VTK Observer Debugging:ExampleOutput
Example observer invocation debugging output for a change in the MRMLScene (probably NodeAddedEvent, but shown as NoEvent because the class specific event isn't in the vtkCommand list).
Note there are 67 observers registered at the MRML Scene level, many of which make changes which invoke further events. It is possible for these events to cause loops or other unexpected behavior if the programmer isn't careful. What's needed is a way to make the whole system more visible and debuggable to programmers especially in the context of a project with several distributed developers.
{ 67 commands for vtkMRMLScene event is NoEvent -- 1 Skipping ModifiedEvent -- 2 Skipping ModifiedEvent -- 3 Skipping ModifiedEvent -- 4 Skipping ModifiedEvent -- 5 Skipping ModifiedEvent { 6 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkSlicerNodeSelectorWidget event is NoEvent { 1 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 1 Returned from NoEvent on vtkSlicerNodeSelectorWidget -- 2 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 6 Returned from NoEvent on vtkMRMLScene -- 7 Skipping NoEvent { 8 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkSlicerNodeSelectorWidget event is NoEvent { 1 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 1 Returned from NoEvent on vtkSlicerNodeSelectorWidget -- 2 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 8 Returned from NoEvent on vtkMRMLScene -- 9 Skipping NoEvent { 10 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkSlicerNodeSelectorWidget event is NoEvent { 1 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 1 Returned from NoEvent on vtkSlicerNodeSelectorWidget -- 2 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 10 Returned from NoEvent on vtkMRMLScene -- 11 Skipping NoEvent -- 12 Skipping ModifiedEvent { 13 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkSlicerNodeSelectorWidget event is NoEvent { 1 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 1 Returned from NoEvent on vtkSlicerNodeSelectorWidget -- 2 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 13 Returned from NoEvent on vtkMRMLScene -- 14 Skipping NoEvent { 15 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkSlicerNodeSelectorWidget event is NoEvent { 1 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 1 Returned from NoEvent on vtkSlicerNodeSelectorWidget -- 2 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 15 Returned from NoEvent on vtkMRMLScene -- 16 Skipping NoEvent { 17 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkSlicerNodeSelectorWidget event is NoEvent { 1 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 1 Returned from NoEvent on vtkSlicerNodeSelectorWidget -- 2 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 17 Returned from NoEvent on vtkMRMLScene -- 18 Skipping NoEvent -- 19 Skipping ModifiedEvent { 20 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkSlicerNodeSelectorWidget event is NoEvent { 1 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 1 Returned from NoEvent on vtkSlicerNodeSelectorWidget -- 2 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 20 Returned from NoEvent on vtkMRMLScene -- 21 Skipping NoEvent { 22 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkSlicerNodeSelectorWidget event is NoEvent { 1 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 1 Returned from NoEvent on vtkSlicerNodeSelectorWidget -- 2 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 22 Returned from NoEvent on vtkMRMLScene -- 23 Skipping NoEvent { 24 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkSlicerNodeSelectorWidget event is NoEvent { 1 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 1 Returned from NoEvent on vtkSlicerNodeSelectorWidget -- 2 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 24 Returned from NoEvent on vtkMRMLScene -- 25 Skipping NoEvent { 26 Invoking NoEvent on vtkMRMLScene } 26 Returned from NoEvent on vtkMRMLScene -- 27 Skipping NoEvent -- 28 Skipping ModifiedEvent -- 29 Skipping ModifiedEvent { 30 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkSlicerNodeSelectorWidget event is NoEvent { 1 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 1 Returned from NoEvent on vtkSlicerNodeSelectorWidget -- 2 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 30 Returned from NoEvent on vtkMRMLScene -- 31 Skipping NoEvent -- 32 Skipping ModifiedEvent { 33 Invoking NoEvent on vtkMRMLScene { 1 commands for vtkSlicerNodeSelectorWidget event is NoEvent -- 1 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 33 Returned from NoEvent on vtkMRMLScene -- 34 Skipping NoEvent -- 35 Skipping ModifiedEvent -- 36 Skipping ModifiedEvent { 37 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu } 37 Returned from NoEvent on vtkMRMLScene -- 38 Skipping NoEvent { 39 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu } 39 Returned from NoEvent on vtkMRMLScene -- 40 Skipping NoEvent -- 41 Skipping ModifiedEvent -- 42 Skipping ModifiedEvent { 43 Invoking NoEvent on vtkMRMLScene { 3 commands for vtkSlicerNodeSelectorWidget event is NoEvent { 1 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 1 Returned from NoEvent on vtkSlicerNodeSelectorWidget { 2 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 2 Returned from NoEvent on vtkSlicerNodeSelectorWidget -- 3 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 43 Returned from NoEvent on vtkMRMLScene -- 44 Skipping NoEvent -- 45 Skipping ModifiedEvent -- 46 Skipping ModifiedEvent -- 47 Skipping ModifiedEvent { 48 Invoking NoEvent on vtkMRMLScene { 2 commands for vtkKWMenu event is NoEvent { 1 Invoking NoEvent on vtkKWMenu } 1 Returned from NoEvent on vtkKWMenu -- 2 Skipping DeleteEvent } finished vtkKWMenu { 1 commands for vtkKWMenuButton event is ModifiedEvent -- 1 Skipping DeleteEvent } finished vtkKWMenuButton { 1 commands for vtkKWMenuButton event is ModifiedEvent -- 1 Skipping DeleteEvent } finished vtkKWMenuButton { 2 commands for vtkSlicerNodeSelectorWidget event is NoEvent { 1 Invoking NoEvent on vtkSlicerNodeSelectorWidget } 1 Returned from NoEvent on vtkSlicerNodeSelectorWidget -- 2 Skipping DeleteEvent } finished vtkSlicerNodeSelectorWidget } 48 Returned from NoEvent on vtkMRMLScene -- 49 Skipping NoEvent -- 50 Skipping ModifiedEvent -- 51 Skipping ModifiedEvent -- 52 Skipping ModifiedEvent -- 53 Skipping ModifiedEvent -- 54 Skipping ModifiedEvent -- 55 Skipping ModifiedEvent -- 56 Skipping NoEvent -- 57 Skipping NoEvent -- 58 Skipping ModifiedEvent -- 59 Skipping ModifiedEvent -- 60 Skipping ModifiedEvent -- 61 Skipping ModifiedEvent -- 62 Skipping NoEvent -- 63 Skipping NoEvent -- 64 Skipping ModifiedEvent -- 65 Skipping ModifiedEvent -- 66 Skipping ModifiedEvent -- 67 Skipping ModifiedEvent } finished vtkMRMLScene