-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
After having got some usage, it's time to consider missing features and other issues that could be addressed via a change in API...
Issues
- renderThumbnail() and renderImage() don't need to be different methods. They both do the same thing but some features are not supported in both (e.g. can't specify rendering settings in renderThumbnail(), calling renderImage() may try to render a very large image - no targetSize option)
renderThumbnail(url, targetSize, autoBoost, maxSize)with lots of optional arguments (and more to come) makes for a painful API if you just want to specify just one of the options- It would be nice to separate the rendering to rgb array from the conversion to a dataUrl (which uses
canvas). This would allow testing without needing browser API (see Test library using framework #18). Also it would support users who want the rgb values to render to their own canvas. - When setting
omerorendering settings, we currently have to load and update theomeroobject "manually", then pass it in as an argument to 'render'.
Proposal
Single render function that supports various options, behaves same as current renderThumbnail(), defaulting to smallest resolution:
omezarr.render(url, options)
Create a Multiscales object that we can update and render. This is equivalent of current getMultiscaleWithArray()
import { Multiscales } from omezarr
const img = new Multiscales(url)
img.axes // [{"name": "c", "type": "channel"}, {"name": "y", "type": "space"}, {"name": "x", "type": "space"}]
img.channels // [{"label": "DAPI", "window": {}, "active": True}...]
img.shapes // [[2, 236, 275, 271], [2, 236, 138, 136], [2, 236, 69, 68]]
img.setChannelActive(0, false)
img.setChannelColor(0, "FF0000")
img.render(options)
Options to render to rgb:
omezarr.renderRbg(url, options)
img.renderRbg(options)
Options
- targetSize
- autoBoost
- maxSize
- omero object. Can specify ONLY what you want to change. E.g. 2nd channel red:
{"channels": [{}, {"color": "FF0000"}] - attrs (add
attrsargument to renderThumbnail() #13)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels