Ver código fonte

Expose vtk object for access from python

For testing code written in python, you sometimes need to get access
to the vtk render window and related structures to get pixel data or
other related data.  Making the methods invokable provides this
functionality.
Steve Pieper 14 anos atrás
pai
commit
ffa8d8852a

+ 5 - 5
Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.h

@@ -67,21 +67,21 @@ public slots:
 
 
 public:
 public:
   /// Get underlying RenderWindow
   /// Get underlying RenderWindow
-  vtkRenderWindow* renderWindow()const;
+  Q_INVOKABLE vtkRenderWindow* renderWindow()const;
 
 
   /// Set/Get window interactor
   /// Set/Get window interactor
-  vtkRenderWindowInteractor* interactor()const;
+  Q_INVOKABLE vtkRenderWindowInteractor* interactor()const;
   virtual void setInteractor(vtkRenderWindowInteractor* interactor);
   virtual void setInteractor(vtkRenderWindowInteractor* interactor);
 
 
   /// Get current interactor style
   /// Get current interactor style
-  vtkInteractorObserver* interactorStyle()const;
+  Q_INVOKABLE vtkInteractorObserver* interactorStyle()const;
 
 
   /// Get corner annotation \a text
   /// Get corner annotation \a text
   QString cornerAnnotationText() const;
   QString cornerAnnotationText() const;
-  vtkCornerAnnotation* cornerAnnotation()const;
+  Q_INVOKABLE vtkCornerAnnotation* cornerAnnotation()const;
 
 
   /// Get the underlying QVTKWidget
   /// Get the underlying QVTKWidget
-  QVTKWidget * VTKWidget() const;
+  Q_INVOKABLE QVTKWidget * VTKWidget() const;
 
 
   /// Get background color
   /// Get background color
   virtual QColor backgroundColor() const = 0;
   virtual QColor backgroundColor() const = 0;