Documentation/4.1/Developers/DisplayableManagers

From Slicer Wiki
Revision as of 18:12, 20 April 2012 by Finetjul (talk | contribs) (Created page with '=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 …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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:

  1. vtkRenderWindowInteractor::Render() is called (by vtkInteractorStyle when the mouse is moved or by some vtkWidgets that call it internally). The request is blocked and ctkAbstractView::scheduleRender() is called on the view.
  2. or it is done by the vtkMRMLDisplayableManagers (e.g. vtkMRMLVolumeRenderingDisplayableManager) by the RequestRender() calls. They call vtkMRMLDisplayableManagerGroup::RequestRender() which fires a vtkCommand::UpdateEvent. The Qt view (e.g. qMRMLThreeDView) observes the UpdateEvent and calls ctkVTKAbstractView::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()