17 #ifndef MITKRENDERINGMANAGER_H_HEADER_INCLUDED_C135A197
18 #define MITKRENDERINGMANAGER_H_HEADER_INCLUDED_C135A197
22 #include <vtkCallbackCommand.h>
24 #include <itkObject.h>
25 #include <itkObjectFactory.h>
32 class vtkRenderWindow;
37 class RenderingManager;
38 class RenderingManagerFactory;
40 class SliceNavigationController;
92 REQUEST_UPDATE_ALL = 0,
94 REQUEST_UPDATE_3DWINDOWS
108 static bool HasFactory();
114 static bool IsInstantiated();
118 void AddRenderWindow(vtkRenderWindow *renderWindow);
121 void RemoveRenderWindow(vtkRenderWindow *renderWindow);
124 const RenderWindowVector &GetAllRegisteredRenderWindows();
128 void RequestUpdate(vtkRenderWindow *renderWindow);
131 void ForceImmediateUpdate(vtkRenderWindow *renderWindow);
136 void RequestUpdateAll(RequestType type = REQUEST_UPDATE_ALL);
141 void ForceImmediateUpdateAll(RequestType type = REQUEST_UPDATE_ALL);
152 virtual bool InitializeViews(
const BaseGeometry *geometry,
153 RequestType type = REQUEST_UPDATE_ALL,
154 bool preserveRoughOrientationInWorldSpace =
false);
155 virtual bool InitializeViews(
const TimeGeometry *geometry,
156 RequestType type = REQUEST_UPDATE_ALL,
157 bool preserveRoughOrientationInWorldSpace =
false);
161 virtual bool InitializeViews(RequestType type = REQUEST_UPDATE_ALL);
172 virtual bool InitializeView(vtkRenderWindow *renderWindow,
174 bool initializeGlobalTimeSNC =
false);
175 virtual bool InitializeView(vtkRenderWindow *renderWindow,
177 bool initializeGlobalTimeSNC =
false);
181 virtual bool InitializeView(vtkRenderWindow *renderWindow);
189 virtual void InitializeViewsByBoundingObjects(
const DataStorage *);
204 virtual void ExecutePendingRequests();
206 bool IsRendering()
const;
207 void AbortRendering();
210 itkSetMacro(LODIncreaseBlocked,
bool);
213 itkGetMacro(LODIncreaseBlocked,
bool);
216 itkBooleanMacro(LODIncreaseBlocked);
219 itkSetMacro(LODAbortMechanismEnabled,
bool);
222 itkGetMacro(LODAbortMechanismEnabled,
bool);
225 itkBooleanMacro(LODAbortMechanismEnabled);
231 void ExecutePendingHighResRenderingRequest();
240 void SetMaximumLOD(
unsigned int max);
242 void SetShading(
bool state,
unsigned int lod);
243 bool GetShading(
unsigned int lod);
245 void SetClippingPlaneStatus(
bool status);
246 bool GetClippingPlaneStatus();
248 void SetShadingValues(
float ambient,
float diffuse,
float specular,
float specpower);
250 FloatVector &GetShadingValues();
256 BaseProperty *GetProperty(
const char *propertyKey)
const;
259 void SetProperty(
const char *propertyKey,
BaseProperty *propertyValue);
289 void SetRenderWindowFocus(vtkRenderWindow *focusWindow);
291 itkGetMacro(FocusedRenderWindow, vtkRenderWindow *)
293 itkSetMacro(ConstrainedPanningZooming,
bool);
298 RENDERING_INACTIVE = 0,
309 virtual void InitializePropertyList();
332 static void RenderingStartCallback(vtkObject *caller,
unsigned long eid,
void *clientdata,
void *calldata);
333 static void RenderingProgressCallback(vtkObject *caller,
unsigned long eid,
void *clientdata,
void *calldata);
334 static void RenderingEndCallback(vtkObject *caller,
unsigned long eid,
void *clientdata,
void *calldata);
343 vtkCallbackCommand *commands[3u];
364 bool boundingBoxInitialized,
367 vtkRenderWindow *m_FocusedRenderWindow;
370 #pragma GCC visibility push(default)
373 itkEventMacro(RenderingManagerViewsInitializedEvent, RenderingManagerEvent);
375 #pragma GCC visibility pop
390 itkFactorylessNewMacro(Self) itkCloneMacro(Self)
itkEventMacroDeclaration(OverlayAddEvent, itk::AnyEvent) class BaseRenderer
RenderWindowList m_RenderWindowList
Data management class that handles 'was created by' relations.
itk::SmartPointer< DataStorage > DataStoragePointer
virtual void DoMonitorRendering()
RendererBoolMap m_RenderingAbortedMap
bool m_ClippingPlaneEnabled
static RenderingManager::Pointer s_Instance
std::vector< float > FloatVector
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
static mitk::DataStorage::Pointer GetDataStorage()
bool m_LODIncreaseBlocked
static RenderingManagerFactory * s_RenderingManagerFactory
RenderWindowVector m_AllRenderWindows
virtual void StartOrResetTimer()
Controls the selection of the slice the associated BaseRenderer will display.
bool m_ConstrainedPanningZooming
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)
virtual void GenerateRenderingRequestEvent() override
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
itkEventMacro(ContourModelEvent, itk::AnyEvent)
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
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.