New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to customize style of controls and annotations #4
Comments
Hello @hackermd, My idea is to add the style's properties as an option at the constructor level and then, set the style properties at the VectorLayer: In the end of this MVP, styling might look like this example: As you mentioned, we could wrap some styling tools from OpenLayers and expose them all, or customize some styling features such as Cornerstone does, like https://github.com/cornerstonejs/cornerstoneTools/blob/master/src/stateManagement/toolColors.js I prefer the second option, it looks more controlled by Microscopy than OpenLayers. Are you aiming to end users styling each geometry with a different color? Or is it just a single style for all geometries? What do you think? |
I like the idea of adding style parameters to the constructor. We will also need to add those to the activateDrawInteraction() method (see use case below).
Definitely. Users may want to draw ROIs for different categories (e.g. "diseased" vs "normal") and display them in different colors.
I would also prefer to implement an abstraction layer that is independent from OpenLayers, which should be motivated by microscopy/medical imaging use cases. However, I like the way the OpenLayers Style API is implemented - maybe we can draw inspiration from it. |
We may also want to allow users to change some of the styles via CSS, for example color or line thickness of selected or modified ROIs. To which extent do we want to abstract OpenLayers CSS? Users may want to customize the style of controls via CSS (e.g., the position of the overview map or the fullscreen button): Since we want to fully abstract OpenLayers, we don't want to rely on OpenLayers CSS classes, but provide our own. |
@swederik @biharck Do we want to handle display of ROI Measurements or Qualitative Evaluations? We could store those values on ROI.properties and allow applications to render them next to the geometry (i.e. |
This feature has meanwhile been implemented and is available since version 0.22.0. |
At the moment, regions of interest (geometries rendered by the viewer) and controls (buttons for the overview map, fullscreen mode, etc.) are rendered with the Openlayers default style. We want to allow an application to customize styling, such that the style of library elements can be matched to that of the application.
Openlayers provides a nice styling API (see Style). The following types may be worth looking into:
However, we don't want to expose the Openlayers API directly. We could either wrap Openlayers classes or implement our own styling logic.
Further, we may want to override some Openlayers CSS classes, such that an application can specify dicom-microscopy-viewer rather than Openlayers CSS.
The text was updated successfully, but these errors were encountered: