Documentation/4.1/Developers/DisplayableManagers
From Slicer Wiki
Home < Documentation < 4.1 < Developers < DisplayableManagers
Displayable Managers
To be written.
How a view is refreshed
It's the 3D view (ctkVTKAbstractView) that controls WHEN the vtkRenderWindow::Render is called. There are 2 ways to tell the view to re-render:
vtkRenderWindowInteractor::Render()
is called (byvtkInteractorStyle
when the mouse is moved or by some vtkWidgets that call it internally). The request is blocked andctkAbstractView::scheduleRender()
is called on the view.- or it is done by the
vtkMRMLDisplayableManager
s (e.g.vtkMRMLVolumeRenderingDisplayableManager
) by the RequestRender() calls. They call vtkMRMLDisplayableManagerGroup::RequestRender() which fires a vtkCommand::UpdateEvent. The Qt view (e.g.qMRMLThreeDView
) observes theUpdateEvent
and callsctkVTKAbstractView::scheduleRender()
.
The CTK view compacts the render requests and ensure the FPS (vtkRenderWindow::GetDesiredUpdateRate()
) is respected.
vtkInteractorStyle ---------------------------\ vtkWidget -------------------------------------> vtkRenderWindowInteractor::Render() ------------------------------\ vtkMRML???DisplayableManager::RequestRender() -> vtkMRML???DisplayableManagerGroup::RequestRender() -> UpdateEvent -> ctkVTKAbstractView::scheduleRender()