These are chat archives for openseadragon/openseadragon

26th
Jun 2015
Conner Wingard
@ConnerMan
Jun 26 2015 18:35
Screen Shot 2015-06-26 at 2.11.27 PM.PNG
Hey all. There was a need on a project I work on to support tile sources where the tiles are not square. I forked OSD and made changes to TileSource so the getTileSize returns an OpenSeadragon.Point. I then had to change some other functions in TileSource so they would behave correctly with the different return type. The image above shows an image with OSD and not-quite square tiles in DebugMode.
I think the feature might be useful to others, and got approval from my org to contribute the change back. A link to the commit with the change on my fork is here ConnerMan/openseadragon@7e950fd .
Conner Wingard
@ConnerMan
Jun 26 2015 18:42
Tests passed after also slightly modifying IIIFTileSource, because it seems to inherit TileSource's prototype, and uses tileSize to construct tile urls. Any desire for this feature in the wider OSD community?
Ian Gilman
@iangilman
Jun 26 2015 18:53
@ConnerMan As it so happens, this just came in yesterday! openseadragon/openseadragon#670
Conner Wingard
@ConnerMan
Jun 26 2015 18:54
I believe it should be backwards compatible for people providing tileSize in the options for TileSources, but it would require change for people overidding getTileSize to return an OpenSeadragon.Point. Is there a better solution, or is that workable?
Ian Gilman
@iangilman
Jun 26 2015 18:55
In the issue I comment about the complexity, but your patch doesn't look too bad. I would be concerned about the breaking change to the API, so I'll give some thought to how to handle that, but really I don't know that there are many people overriding getTileSize, so if that's the only difference, it should be pretty minimal.
Conner Wingard
@ConnerMan
Jun 26 2015 18:56
@iangilman huh, funny thing that! :) I guess the alternative implementation is to do a type check all places getTileSize() is called, and that seemed a bit more invasive to me.
Ian Gilman
@iangilman
Jun 26 2015 18:56
I'm curious, what format are you using? Did you write a new tilesource for it? None of the tile formats I know support non-square tiles (that I know of)
Heading out to lunch...back in a bit :)
Conner Wingard
@ConnerMan
Jun 26 2015 18:59
Its a file format produced by Mirax pathology digitizers. For use in Pathology
Conner Wingard
@ConnerMan
Jun 26 2015 19:24
Our current implentation for OSD just provides width/height and a custom getTileUrl function within tileSources when constructing a new viewer. A backend servlet then uses the provided information to provide the correct tiles, and provides abstraction for multiple image formats.
Ian Gilman
@iangilman
Jun 26 2015 19:49
@ConnerMan Cool, good to know.
Please do file a PR with your change when you get a chance!
Conner Wingard
@ConnerMan
Jun 26 2015 19:51
Sure, found one bug I added in an effort to try clean up the code. Fixing it now, then will open a PR for review.
Also, how do I generate the docs? I added the TileSource option, tileWidth and tileHeight and want to make sure it looks okay.
Antoine Vandecreme
@avandecreme
Jun 26 2015 20:12
ConnerMan: you need to look at https://github.com/openseadragon/site-build
Conner Wingard
@ConnerMan
Jun 26 2015 20:13
Oh, okay that answers my question. Thanks!
Conner Wingard
@ConnerMan
Jun 26 2015 20:41
PR for non-square tiles: openseadragon/openseadragon#673
Ian Gilman
@iangilman
Jun 26 2015 22:46
@ConnerMan Awesome, thanks! I'll probably review on Monday