13 #ifndef MITKRENDERINGMANAGER_H_HEADER_INCLUDED_C135A197 14 #define MITKRENDERINGMANAGER_H_HEADER_INCLUDED_C135A197 18 #include <vtkCallbackCommand.h> 20 #include <itkObject.h> 21 #include <itkObjectFactory.h> 29 class vtkRenderWindow;
34 class RenderingManager;
35 class RenderingManagerFactory;
37 class SliceNavigationController;
89 REQUEST_UPDATE_ALL = 0,
91 REQUEST_UPDATE_3DWINDOWS
105 static bool HasFactory();
111 static bool IsInstantiated();
115 void AddRenderWindow(vtkRenderWindow *renderWindow);
118 void RemoveRenderWindow(vtkRenderWindow *renderWindow);
121 const RenderWindowVector &GetAllRegisteredRenderWindows();
125 void RequestUpdate(vtkRenderWindow *renderWindow);
128 void ForceImmediateUpdate(vtkRenderWindow *renderWindow);
133 void RequestUpdateAll(
RequestType type = REQUEST_UPDATE_ALL);
138 void ForceImmediateUpdateAll(
RequestType type = REQUEST_UPDATE_ALL);
149 virtual bool InitializeViews(
const BaseGeometry *geometry,
151 bool preserveRoughOrientationInWorldSpace =
false);
152 virtual bool InitializeViews(
const TimeGeometry *geometry,
154 bool preserveRoughOrientationInWorldSpace =
false);
158 virtual bool InitializeViews(
RequestType type = REQUEST_UPDATE_ALL);
169 virtual bool InitializeView(vtkRenderWindow *renderWindow,
171 bool initializeGlobalTimeSNC =
false);
172 virtual bool InitializeView(vtkRenderWindow *renderWindow,
174 bool initializeGlobalTimeSNC =
false);
178 virtual bool InitializeView(vtkRenderWindow *renderWindow);
186 virtual void InitializeViewsByBoundingObjects(
const DataStorage *);
201 virtual void ExecutePendingRequests();
203 bool IsRendering()
const;
204 void AbortRendering();
207 itkSetMacro(LODIncreaseBlocked,
bool);
210 itkGetMacro(LODIncreaseBlocked,
bool);
213 itkBooleanMacro(LODIncreaseBlocked);
216 itkSetMacro(LODAbortMechanismEnabled,
bool);
219 itkGetMacro(LODAbortMechanismEnabled,
bool);
222 itkBooleanMacro(LODAbortMechanismEnabled);
228 void ExecutePendingHighResRenderingRequest();
237 void SetMaximumLOD(
unsigned int max);
239 void SetShading(
bool state,
unsigned int lod);
240 bool GetShading(
unsigned int lod);
242 void SetClippingPlaneStatus(
bool status);
243 bool GetClippingPlaneStatus();
245 void SetShadingValues(
float ambient,
float diffuse,
float specular,
float specpower);
247 FloatVector &GetShadingValues();
253 BaseProperty *GetProperty(
const char *propertyKey)
const;
256 void SetProperty(
const char *propertyKey,
BaseProperty *propertyValue);
286 void SetRenderWindowFocus(vtkRenderWindow *focusWindow);
288 itkGetMacro(FocusedRenderWindow, vtkRenderWindow *);
290 itkSetMacro(ConstrainedPanningZooming,
bool);
299 RENDERING_INACTIVE = 0,
308 virtual void GenerateRenderingRequestEvent() = 0;
310 virtual void InitializePropertyList();
333 static void RenderingStartCallback(vtkObject *caller,
unsigned long eid,
void *clientdata,
void *calldata);
334 static void RenderingProgressCallback(vtkObject *caller,
unsigned long eid,
void *clientdata,
void *calldata);
335 static void RenderingEndCallback(vtkObject *caller,
unsigned long eid,
void *clientdata,
void *calldata);
344 vtkCallbackCommand *commands[3u];
365 bool boundingBoxInitialized,
368 vtkRenderWindow *m_FocusedRenderWindow;
372 #pragma GCC visibility push(default) 375 itkEventMacro(RenderingManagerViewsInitializedEvent, RenderingManagerEvent);
377 #pragma GCC visibility pop 392 itkFactorylessNewMacro(
Self);
RenderWindowList m_RenderWindowList
Data management class that handles 'was created by' relations.
itk::SmartPointer< DataStorage > DataStoragePointer
itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent)
virtual void DoMonitorRendering()
static RenderingManagerFactory * s_RenderingManagerFactory
RendererBoolMap m_RenderingAbortedMap
bool m_ClippingPlaneEnabled
static RenderingManager::Pointer s_Instance
std::vector< float > FloatVector
itkEventMacroDeclaration(FocusChangedEvent, itk::AnyEvent)
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
bool m_LODIncreaseBlocked
RenderWindowVector m_AllRenderWindows
virtual void StartOrResetTimer()
Controls the selection of the slice the associated BaseRenderer will display.
bool m_ConstrainedPanningZooming
void GenerateRenderingRequestEvent() override
virtual void DoStartRendering()
Abstract base class for properties.
Manager for coordinating the rendering process.
RenderWindowCallbacksList m_RenderWindowCallbacksList
std::map< vtkRenderWindow *, int > RenderWindowList
#define mitkClassMacro(className, SuperClassName)
#define mitkClassMacroItkParent(className, SuperClassName)
Factory interface for facilitating the usage of a platform-specific mitk::RenderingManager instance...
DataStoragePointer m_DataStorage
std::vector< vtkRenderWindow * > RenderWindowVector
std::map< BaseRenderer *, unsigned int > RendererIntMap
RendererIntMap m_NextLODMap
std::map< vtkRenderWindow *, RenderWindowCallbacks > RenderWindowCallbacksList
bool m_LODAbortMechanismEnabled
PropertyList::Pointer m_PropertyList
FloatVector m_ShadingValues
virtual void DoFinishAbortRendering()
BaseGeometry Describes the geometry of a data object.
std::vector< bool > BoolVector
std::map< BaseRenderer *, bool > RendererBoolMap
itk::SmartPointer< SliceNavigationController > m_TimeNavigationController
BoolVector m_ShadingEnabled