vtkLightBoxRendererManager.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. #ifndef __vtkLightBoxRendererManager_h
  2. #define __vtkLightBoxRendererManager_h
  3. #include <vtkObject.h>
  4. #include "CTKVisualizationVTKCoreExport.h"
  5. class vtkRenderWindow;
  6. class vtkRenderer;
  7. class vtkImageData;
  8. class vtkCamera;
  9. class CTK_VISUALIZATION_VTK_CORE_EXPORT vtkLightBoxRendererManager : public vtkObject
  10. {
  11. vtkTypeRevisionMacro(vtkLightBoxRendererManager,vtkObject);
  12. void PrintSelf(ostream& os, vtkIndent indent);
  13. static vtkLightBoxRendererManager *New();
  14. void Initialize(vtkRenderWindow* renderWindow);
  15. bool IsInitialized();
  16. /// Get associated RenderWindow
  17. vtkRenderWindow* GetRenderWindow();
  18. /// Set image data
  19. void SetImageData(vtkImageData* newImageData);
  20. /// Get active camera
  21. /// Note that the same camera is used with all the renderWindowItem
  22. vtkCamera* GetActiveCamera();
  23. /// Set actice camera
  24. void SetActiveCamera(vtkCamera* newActiveCamera);
  25. /// Reset cameras associated with all renderWindowItem
  26. void ResetCamera();
  27. /// Return number of underlying render window Item
  28. /// \note In the current implementation
  29. int GetRenderWindowItemCount();
  30. /// Get a reference to the associated vtkRenderer(s) identified by its \a id
  31. vtkRenderer* GetRenderer(int id);
  32. /// Get a reference to the associated vtkRenderer(s) given its position in the grid
  33. /// \sa GetRenderer(int)
  34. vtkRenderer* GetRenderer(int rowId, int columnId);
  35. /// The layout type determines how the image slices should be displayed
  36. /// within the different render view items.
  37. /// \sa SetRenderWindowLayout() GetRenderWindowLayoutType()
  38. enum RenderWindowLayoutType{LeftRightTopBottom = 0, LeftRightBottomTop};
  39. /// Get current layout type
  40. int GetRenderWindowLayoutType() const;
  41. /// Set current \a layoutType
  42. void SetRenderWindowLayoutType(int layoutType);
  43. /// Split the current vtkRenderWindow in \a rowCount per \a columnCount grid
  44. void SetRenderWindowLayout(int rowCount, int columnCount);
  45. /// Highlight / Unhighlight a render view item given its \a id
  46. void SetHighlightedById(int id, bool highlighted);
  47. /// Highlight / Unhighlight a render view item given its position in the grid
  48. /// \sa setHighlighted(int, bool)
  49. void SetHighlighted(int rowId, int columnId, bool highlighted);
  50. /// Convenient function allowing to compute the renderWindowItemId
  51. /// given \a rowId and \a columnId.
  52. /// The following formula is used: ColumnCount * rowId + columnId
  53. /// \note The \a rowCount and \a columnCount correspond to the one set
  54. /// using setRenderWindowLayout.
  55. inline int ComputeRenderWindowItemId(int rowId, int columnId);
  56. /// Set corner annotation \a text
  57. void SetCornerAnnotationText(const std::string& text);
  58. /// Get current corner annotation
  59. const std::string GetCornerAnnotationText()const;
  60. /// Set background color
  61. void SetBackgroundColor(const double newBackgroundColor[3]);
  62. /// Get background color
  63. double* GetBackgroundColor()const;
  64. /// Set color level
  65. void SetColorLevel(double colorLevel);
  66. /// Get color level
  67. double GetColorLevel()const;
  68. /// Set color window
  69. void SetColorWindow(double colorWindow);
  70. /// Get color window
  71. double GetColorWindow()const;
  72. /// Set color Window and color level
  73. void SetColorWindowAndLevel(double colorWindow, double colorLevel);
  74. protected:
  75. vtkLightBoxRendererManager();
  76. ~vtkLightBoxRendererManager();
  77. private:
  78. vtkLightBoxRendererManager(const vtkLightBoxRendererManager&); // Not implemented.
  79. void operator=(const vtkLightBoxRendererManager&); // Not implemented.
  80. //BTX
  81. class vtkInternal;
  82. vtkInternal* Internal;
  83. //ETX
  84. };
  85. #endif