This page is part of the dwv architecture description and describes the dwv layering mechanism.
Summary:
View config
The library uses a dataId
indexed list of view configurations (ViewConfig) mainly to provide the divId
of the HTML element where to generate the canvas associated to dicom data. It also allows to set window/level, colour map, orientation and opacity. The *
allows to use the same configuration for all data. The App
class provides various methods to manipulate the 'DataViewConfig'.
Layers
The first level is the Stage, this class handles a list of LayerGroup for optional synchronisation. A layerGroup is a group of layers associated to an HTML element, for now of type View
(ViewLayer) or Draw
(DrawLayer). The configuration of the stage is done at the creation of the app. See app::init method for details. Each layer class will create its own HTML div with an id created by getLayerDivId. Layers will typically contain a HTML canvas to display its content. Use the getLayerDetailsFromEvent method to extract the layer details from an event generated from a layer canvas. You can then access the layer group object via the app getLayerGroupByDivId
method.
The View class contains a 2D view of the image that could be 3D + t. Layers follow the model-view-controller (MVC) design. In the view case, the model is the View, the view the ViewLayer and the controller the ViewController.
In the case of the draw, the model is the AnnotationGroup, the view is the DrawLayer and the controller is the DrawController. The shape will use the ViewController for quantification when it needs to access the underlying pixel values.