ctkVTKRenderView.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) 2010 Kitware Inc.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.commontk.org/LICENSE
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. =========================================================================*/
  14. #ifndef __ctkVTKRenderView_h
  15. #define __ctkVTKRenderView_h
  16. // Qt includes
  17. #include <QWidget>
  18. // CTK includes
  19. #include <ctkPimpl.h>
  20. #include "CTKVisualizationVTKWidgetsExport.h"
  21. class ctkVTKRenderViewPrivate;
  22. class vtkRenderWindowInteractor;
  23. class vtkRenderer;
  24. class CTK_VISUALIZATION_VTK_WIDGETS_EXPORT ctkVTKRenderView : public QWidget
  25. {
  26. Q_OBJECT
  27. public:
  28. /// Constructors
  29. typedef QWidget Superclass;
  30. explicit ctkVTKRenderView(QWidget* parent = 0);
  31. virtual ~ctkVTKRenderView();
  32. /// If a render has already been scheduled, this called is a no-op
  33. void scheduleRender();
  34. /// Force a render even if a render is already ocurring
  35. void forceRender();
  36. /// Set/Get window interactor
  37. vtkRenderWindowInteractor* interactor()const;
  38. void setInteractor(vtkRenderWindowInteractor* newInteractor);
  39. /// Set corner annotation text
  40. void setCornerAnnotationText(const QString& text);
  41. /// Set background color
  42. void setBackgroundColor(double r, double g, double b);
  43. void resetCamera();
  44. /// Get a reference to the associated vtkRenderer
  45. vtkRenderer* renderer()const;
  46. //virtual void setCornerText(const QString& text);
  47. private:
  48. CTK_DECLARE_PRIVATE(ctkVTKRenderView);
  49. };
  50. #endif