viscenter / layered-viewer

(Archive Repository) Registered image viewer based on OpenSeadragon
https://gitlab.com/educelab/vislayers
Other
6 stars 1 forks source link

Upgrade to OSD 2.0 #39

Open csparker247 opened 9 years ago

csparker247 commented 9 years ago

OSD 2.0 was just released and it includes "True Multi-Image Support": http://openseadragon.github.io/examples/multi-image/

Porting our viewer to work with this new mode seems doable and should fix some of the weird things we have to do to keep our two views in sync (e.g. We have to turn off animations because there's a slight delay in propagating the zoom changes)

stephenrparsons commented 8 years ago

I plan to look at this in the summer. OSD does have clipping, but only rectangular clipping at the moment. I am going to look at implementing arbitrary clipping for them. They gave me some pointers:

"This is where the clipping happens: https://github.com/openseadragon/openseadragon/blob/master/src/tiledimage.js#L1482 We just need to figure out how to get a more complicated shape there. I suppose you could just special case a circle option, but it seems better to provide for any arbitrary shape. So one option would be to send out an event that gives the chance to set the clip however you want, using canvas commands. It would be similar to how the tile-loaded event works: https://github.com/openseadragon/openseadragon/blob/master/src/tiledimage.js#L1222 Another option would be to have an explicit callback that you have to set on the tiled image that serves the same purpose Another option would be to come up with some way to describe arbitrary clipping paths, but that seems like reinventing the wheel."