CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
vtkLightBoxRendererManager.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Library: CTK
4 
5  Copyright (c) Kitware Inc.
6 
7  Licensed under the Apache License, Version 2.0 (the "License");
8  you may not use this file except in compliance with the License.
9  You may obtain a copy of the License at
10 
11  http://www.apache.org/licenses/LICENSE-2.0.txt
12 
13  Unless required by applicable law or agreed to in writing, software
14  distributed under the License is distributed on an "AS IS" BASIS,
15  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  See the License for the specific language governing permissions and
17  limitations under the License.
18 
19 =========================================================================*/
20 
21 #ifndef __vtkLightBoxRendererManager_h
22 #define __vtkLightBoxRendererManager_h
23 
24 #include <vtkObject.h>
25 #include <vtkVersion.h>
26 
27 #include "ctkVisualizationVTKCoreExport.h"
28 
29 class vtkRenderWindow;
30 class vtkRenderer;
31 class vtkImageData;
32 class vtkCamera;
33 class vtkCornerAnnotation;
34 class vtkAlgorithmOutput;
35 
37 class CTK_VISUALIZATION_VTK_CORE_EXPORT vtkLightBoxRendererManager : public vtkObject
38 {
39  vtkTypeMacro(vtkLightBoxRendererManager,vtkObject);
40  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
41  static vtkLightBoxRendererManager *New();
42 
43  void Initialize(vtkRenderWindow* renderWindow);
44 
45  bool IsInitialized();
46 
50  void SetRendererLayer(int newLayer);
51 
53  vtkRenderWindow* GetRenderWindow();
54 
56 #if (VTK_MAJOR_VERSION <= 5)
57  void SetImageData(vtkImageData* newImageData);
58 #else
59  void SetImageDataConnection(vtkAlgorithmOutput* newImageDataConnection);
60 #endif
61 
64  vtkCamera* GetActiveCamera();
65 
67  void SetActiveCamera(vtkCamera* newActiveCamera);
68 
70  void ResetCamera();
71 
74  int GetRenderWindowItemCount();
75 
77  vtkRenderer* GetRenderer(int id);
78 
81  vtkRenderer* GetRenderer(int rowId, int columnId);
82 
86  enum RenderWindowLayoutType{LeftRightTopBottom = 0, LeftRightBottomTop};
87 
89  int GetRenderWindowLayoutType() const;
90 
92  void SetRenderWindowLayoutType(int layoutType);
93 
95  void SetRenderWindowLayout(int rowCount, int columnCount);
96 
99  void SetRenderWindowRowCount(int newRowCount);
100 
103  int GetRenderWindowRowCount();
104 
107  void SetRenderWindowColumnCount(int newColumnCount);
108 
111  int GetRenderWindowColumnCount();
112 
114  bool GetHighlightedById(int id);
115 
119  bool GetHighlighted(int rowId, int columnId);
120 
122  void SetHighlightedById(int id, bool highlighted);
123 
126  void SetHighlighted(int rowId, int columnId, bool highlighted);
127 
129  void SetHighlightedBoxColor(double highlightedBoxColor[3]);
130 
135  double* GetHighlightedBoxColor()const;
136 
142  inline int ComputeRenderWindowItemId(int rowId, int columnId);
143 
145  void SetCornerAnnotationText(const std::string& text);
146 
148  const std::string GetCornerAnnotationText()const;
149 
152  vtkCornerAnnotation * GetCornerAnnotation()const;
153  void SetCornerAnnotation(vtkCornerAnnotation* annotation);
154 
156  void SetBackgroundColor(const double newBackgroundColor[3]);
157 
159  double* GetBackgroundColor()const;
160 
162  void SetColorLevel(double colorLevel);
163 
165  double GetColorLevel()const;
166 
168  void SetColorWindow(double colorWindow);
169 
171  double GetColorWindow()const;
172 
174  void SetColorWindowAndLevel(double colorWindow, double colorLevel);
175 
176 protected:
177 
180 
181 private:
182  vtkLightBoxRendererManager(const vtkLightBoxRendererManager&); // Not implemented.
183  void operator=(const vtkLightBoxRendererManager&); // Not implemented.
184 
185 //BTX
186  class vtkInternal;
187  vtkInternal* Internal;
188 //ETX
189 
190 };
191 
192 #endif
193