13 #ifndef mitkRenderingManager_h
14 #define mitkRenderingManager_h
18 #include <vtkCallbackCommand.h>
20 #include <itkObject.h>
21 #include <itkObjectFactory.h>
28 class vtkRenderWindow;
33 class RenderingManagerFactory;
35 class TimeNavigationController;
87 REQUEST_UPDATE_ALL = 0,
89 REQUEST_UPDATE_3DWINDOWS
103 static bool HasFactory();
109 static bool IsInstantiated();
113 void AddRenderWindow(vtkRenderWindow *renderWindow);
116 void RemoveRenderWindow(vtkRenderWindow *renderWindow);
119 const RenderWindowVector &GetAllRegisteredRenderWindows();
123 void RequestUpdate(vtkRenderWindow *renderWindow);
126 void ForceImmediateUpdate(vtkRenderWindow *renderWindow);
131 void RequestUpdateAll(RequestType type = REQUEST_UPDATE_ALL);
136 void ForceImmediateUpdateAll(RequestType type = REQUEST_UPDATE_ALL);
144 virtual void InitializeViewsByBoundingObjects(
const DataStorage* dataStorage);
158 virtual void InitializeViewByBoundingObjects(vtkRenderWindow* renderWindow,
160 bool resetCamera =
true);
181 virtual bool InitializeViews(
const BaseGeometry *geometry,
182 RequestType type = REQUEST_UPDATE_ALL,
183 bool resetCamera =
true);
204 virtual bool InitializeViews(
const TimeGeometry *geometry,
205 RequestType type = REQUEST_UPDATE_ALL,
206 bool resetCamera =
true);
220 virtual bool InitializeViews(RequestType type = REQUEST_UPDATE_ALL);
235 virtual bool InitializeView(vtkRenderWindow *renderWindow,
237 bool resetCamera =
true);
252 virtual bool InitializeView(vtkRenderWindow *renderWindow,
254 bool resetCamera =
true);
262 virtual bool InitializeView(vtkRenderWindow *renderWindow);
277 virtual void ExecutePendingRequests();
279 bool IsRendering()
const;
280 void AbortRendering();
283 itkSetMacro(LODIncreaseBlocked,
bool);
286 itkGetMacro(LODIncreaseBlocked,
bool);
289 itkBooleanMacro(LODIncreaseBlocked);
292 itkSetMacro(LODAbortMechanismEnabled,
bool);
295 itkGetMacro(LODAbortMechanismEnabled,
bool);
298 itkBooleanMacro(LODAbortMechanismEnabled);
304 void ExecutePendingHighResRenderingRequest();
313 void SetMaximumLOD(
unsigned int max);
315 void SetShading(
bool state,
unsigned int lod);
316 bool GetShading(
unsigned int lod);
318 void SetClippingPlaneStatus(
bool status);
319 bool GetClippingPlaneStatus();
321 void SetShadingValues(
float ambient,
float diffuse,
float specular,
float specpower);
323 FloatVector &GetShadingValues();
329 BaseProperty *GetProperty(
const char *propertyKey)
const;
332 void SetProperty(
const char *propertyKey,
BaseProperty *propertyValue);
359 void SetRenderWindowFocus(vtkRenderWindow *focusWindow);
360 itkGetMacro(FocusedRenderWindow, vtkRenderWindow *);
362 void SetConstrainedPanningZooming(
bool constrain);
363 itkGetConstMacro(ConstrainedPanningZooming,
bool);
371 RENDERING_INACTIVE = 0,
380 virtual void GenerateRenderingRequestEvent() = 0;
382 virtual void InitializePropertyList();
405 static void RenderingStartCallback(vtkObject *caller,
unsigned long eid,
void *clientdata,
void *calldata);
406 static void RenderingProgressCallback(vtkObject *caller,
unsigned long eid,
void *clientdata,
void *calldata);
407 static void RenderingEndCallback(vtkObject *caller,
unsigned long eid,
void *clientdata,
void *calldata);
416 vtkCallbackCommand *commands[3u];
454 void InternalViewInitialization(
BaseRenderer *baseRenderer,
456 bool boundingBoxInitialized,
469 vtkRenderWindow *m_FocusedRenderWindow;
473 #pragma GCC visibility push(default)
478 #pragma GCC visibility pop
493 itkFactorylessNewMacro(
Self);