ctkVTKRenderView_p.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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_p_h
  15. #define __ctkVTKRenderView_p_h
  16. // Qt includes
  17. #include <QObject>
  18. // CTK includes
  19. #include <ctkPimpl.h>
  20. #include <ctkVTKObject.h>
  21. #include "ctkVTKRenderView.h"
  22. // VTK includes
  23. #include <QVTKWidget.h>
  24. #include <vtkAxesActor.h>
  25. #include <vtkCornerAnnotation.h>
  26. #include <vtkOrientationMarkerWidget.h>
  27. #include <vtkRenderer.h>
  28. #include <vtkRenderWindow.h>
  29. #include <vtkSmartPointer.h>
  30. #include <vtkWeakPointer.h>
  31. class vtkRenderWindowInteractor;
  32. //-----------------------------------------------------------------------------
  33. class ctkVTKRenderViewPrivate : public QObject,
  34. public ctkPrivate<ctkVTKRenderView>
  35. {
  36. Q_OBJECT
  37. CTK_DECLARE_PUBLIC(ctkVTKRenderView);
  38. public:
  39. ctkVTKRenderViewPrivate();
  40. void zoom(double zoomFactor);
  41. /// Convenient setup methods
  42. void setupCornerAnnotation();
  43. void setupRendering();
  44. void setupDefaultInteractor();
  45. QVTKWidget* VTKWidget;
  46. vtkSmartPointer<vtkRenderer> Renderer;
  47. vtkSmartPointer<vtkRenderWindow> RenderWindow;
  48. bool RenderPending;
  49. bool RenderEnabled;
  50. vtkSmartPointer<vtkAxesActor> Axes;
  51. vtkSmartPointer<vtkOrientationMarkerWidget> Orientation;
  52. vtkSmartPointer<vtkCornerAnnotation> CornerAnnotation;
  53. double ZoomFactor;
  54. vtkWeakPointer<vtkRenderWindowInteractor> CurrentInteractor;
  55. };
  56. #endif