ctkVTKRenderView.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. All rights reserved.
  5. Distributed under a BSD License. See LICENSE.txt file.
  6. This software is distributed "AS IS" WITHOUT ANY WARRANTY; without even
  7. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the above copyright notice for more information.
  9. =========================================================================*/
  10. #ifndef __ctkVTKRenderView_h
  11. #define __ctkVTKRenderView_h
  12. // Qt includes
  13. #include <QWidget>
  14. // CTK includes
  15. #include <ctkPimpl.h>
  16. #include "CTKVisualizationVTKWidgetsExport.h"
  17. class ctkVTKRenderViewPrivate;
  18. class vtkRenderWindowInteractor;
  19. class CTK_VISUALIZATION_VTK_WIDGETS_EXPORT ctkVTKRenderView : public QWidget
  20. {
  21. Q_OBJECT
  22. public:
  23. /// Constructors
  24. typedef QWidget Superclass;
  25. explicit ctkVTKRenderView(QWidget* parent = 0);
  26. virtual ~ctkVTKRenderView();
  27. /// If a render has already been scheduled, this called is a no-op
  28. void scheduleRender();
  29. /// Force a render even if a render is already ocurring
  30. void forceRender();
  31. /// Set/Get window interactor
  32. vtkRenderWindowInteractor* interactor()const;
  33. void setInteractor(vtkRenderWindowInteractor* newInteractor);
  34. /// Set corner annotation text
  35. void setCornerAnnotationText(const QString& text);
  36. /// Set background color
  37. void setBackgroundColor(double r, double g, double b);
  38. void resetCamera();
  39. //virtual void setCornerText(const QString& text);
  40. private:
  41. CTK_DECLARE_PRIVATE(ctkVTKRenderView);
  42. };
  43. #endif