These are chat archives for openseadragon/openseadragon

11th
Feb 2016
Ian Gilman
@iangilman
Feb 11 2016 00:00
@dwrogers Welcome! Do you know if those XML files are DZI? If not, can you share the contents of one?
This is the getting started you're referring to? http://openseadragon.github.io/docs/ We don't really have anything more hand-holdy than that, but I'm happy to answer questions here
David Rogers
@dwrogers
Feb 11 2016 00:05
@iangilman Thanks! They are not DZI, but they are XML. They look like this:
<?xml version="1.0"?>
<root>
<imageset url="J100_ZYXXY02_files/{l}/{c}_{r}.jpg" levels="17" width="51584" height="52480" projection="perspective" maxZoom="2.000000" tileWidth="254" tileHeight="254" tileOverlap="1" />
</root>
....
Ian Gilman
@iangilman
Feb 11 2016 00:07
Interesting...looks similar to DZI but not quite
And how are the tiles arranged? Do you know if they are in the same style as DZI?
I guess if the url param is to be believed, they are
David Rogers
@dwrogers
Feb 11 2016 00:09

Actually, I just found this other xml file that might be closer (I used to think of it as a worthless artifact of HDMake):
<?xml version="1.0"?>

<Image TileSize="254" Overlap="1" Format="jpg" xmlns="http://schemas.microsoft.com/deepzoom/2008">
<Size Width="51584" Height="52480"/>
</Image>

Ian Gilman
@iangilman
Feb 11 2016 00:09
Yup, that's a DZI file
So just point your OpenSeadragon viewer at it and you should be good to go!
David Rogers
@dwrogers
Feb 11 2016 00:10
Ah. so I just rename it. But how does the image directory tree get linked up - there's no reference to it in the DZI file?
Ian Gilman
@iangilman
Feb 11 2016 00:11
They have to have the same name and be next to each other
foo.dzi next to foo_files
foo.xml is fine instead of foo.dzi OpenSeadragon doesn't care
David Rogers
@dwrogers
Feb 11 2016 00:11
Too simple to suss out... :-) thanks, I'll give that a whack.
Ian Gilman
@iangilman
Feb 11 2016 00:13
Yeah, unspoken conventions :-/
Antoine Vandecreme
@avandecreme
Feb 11 2016 15:17
@dwrogers your first XML file is a HDView file. I opened an issue a while back to support it but I never got down to it: openseadragon/openseadragon#497
Also, the HDView pyramid is not compatible with the DZI one. But if you have a DZI file too, maybe you got both pyramids generated?
David Rogers
@dwrogers
Feb 11 2016 16:25
@avandecreme "the HDView pyramid is not compatible with the DZI one" Oops! I only have one pyramid. Do you know offhand what is incompatible about it?
Antoine Vandecreme
@avandecreme
Feb 11 2016 16:29
the way the tiles are organized
DZI expect the tile at level 2, colum 1, row 3 to be: foo_files/2/3_1.png
Ha just writing that, and I realize your pyramids are indeed compatibles!
My HDView looks like: l_2/c_1/tile_3.png
Yours looks like a DZI. See the pattern you posted above: J100ZYXXY02_files/{l}/{c}{r}.jpg
David Rogers
@dwrogers
Feb 11 2016 16:42
@avandecreme Whew! It's been a few years since I did this image pipeline and I forgot that I used tileFormat=2:
"-tileformat {0 = flat, 1 = hierarachy, 2 = Seadragon}"
Antoine Vandecreme
@avandecreme
Feb 11 2016 16:49
Nice :) I never actually generated those pyramids myself so I had no idea you could have different kind of hierarchies.
VoidVolker
@VoidVolker
Feb 11 2016 16:58
https://github.com/VoidVolker/MagickSlicer - here my slicer, there also description
Alexey Tikhonov
@altert
Feb 11 2016 18:59
vips is also a very good option to create pyramids because it's very fast
David Rogers
@dwrogers
Feb 11 2016 19:01

I have a project which starts with slides scanned to .ndpi files, and ends up with a viewer based on OpenSeadragon and various plugins. Can someone point me to the .ndpi OSD tile source? :-)

Currently, my pipeline uses ndpi2tiff, ImageMagick's convert to split into 8X8 jpg tiles and finally HDMake to merge the tiles into a single seadragon pyramid.

Anyone else have a different pipeline and/or other suggestions (saw: openseadragon/openseadragon#530)

Ian Gilman
@iangilman
Feb 11 2016 19:03
Looks like VIPS is the answer
Alexey Tikhonov
@altert
Feb 11 2016 19:06
@iangilman I've tried to incorporate your suggestions in OpenSeadragonCanvasOverlay. Now onRedraw callback is passed on overlay creation, and there is also an option not to clean before redraw
Ian Gilman
@iangilman
Feb 11 2016 19:08
Awesome...I'll take a look!
Alexey Tikhonov
@altert
Feb 11 2016 19:51
I've got a question. There is a conflict in fabricjs freedrawing mode and OSD
the culprit is $.stopEvent( event ); in OnMouseUpCaptured and OnMouseMoveCaptured
is there a way to disable that functions for a time?
viewer.setMouseNavEnabled(true); doesn't seem to affect them
err (false) of course
Ian Gilman
@iangilman
Feb 11 2016 19:57
@msalsbery might have some thoughts ^
It looks to me like setMouseEnabled should be stopping onMouseUpCaptured from being called...
Alexey Tikhonov
@altert
Feb 11 2016 19:59
you mean setMouseNavEnabled? Or there is separate setMouseEnabled?
Ian Gilman
@iangilman
Feb 11 2016 19:59
There are two trackers on the viewer though...and setMouseNavEnabled only disables one of them...it might be interesting to try adding viewer.outerTracker.setTracking(false)
Yes, sorry, setMouseNavEnabled
Mark Salsbery
@msalsbery
Feb 11 2016 19:59
Best thing to do is not let the down events bubble in the first place so capture doesn’t happen on the viewer
Alexey Tikhonov
@altert
Feb 11 2016 20:02
@iangilman oh. that did the trick!
@msalsbery in that case it would probably mean modifying fabric.js library
Ian Gilman
@iangilman
Feb 11 2016 20:03
We should probably be doing outerTracker.setTracking in setMouseNavEnabled anyway... @altert perhaps you could make a PR for that?
Alexey Tikhonov
@altert
Feb 11 2016 20:05
I'll try
David Rogers
@dwrogers
Feb 11 2016 20:50
@iangilman There is a "non-starter" problem with VIPS w/OpenSlide: neither support multiple focal planes.
David Rogers
@dwrogers
Feb 11 2016 21:11
Has anyone ever had a need to develop a measuring tool plugin for OSD? Basically such a tool allows you to measure an arbitrary distance in image units (using a units per pixel constant) by clicking on a start point and then dragging to an endpoint, displaying the length as the drag progresses. It would look something like: Breslow Tool
Hmm. Or something like: BreslowTool
Ian Gilman
@iangilman
Feb 11 2016 21:16
@dwrogers These are all the plugins I know about: http://openseadragon.github.io/#plugins The https://github.com/NIST-ISG/OpenSeadragonScalebar does measuring, but not with clicking and dragging...that might be a starting point?
...and https://github.com/picturae/openseadragonselection does overlays you can drag around...perhaps some of the code from that would be helpful
I'm curious about the multiple focal planes...how does that work? Are they basically just different layers? Are you planning on showing them in OSD?
David Rogers
@dwrogers
Feb 11 2016 21:22
The Hamamatsu scanner can include multiple passes over the slide with slight offsets (0.5um increments). At times, switching between these layers is needed in order to distinguish mitosis from intercellular cruft (or something like that - I'm way out of my league here but that is what the pathologists tell me.)
I would like to use OpenSlide with multiple focal plane support as a dynamic tile source for a version of OSD that also understands multiple focal planes. (Queue the theme from "Don Quixote.")
Antoine Vandecreme
@avandecreme
Feb 11 2016 21:26
@dwrogers Sounds similar to what they have here: http://www.proteinatlas.org/ENSG00000213463-SYNJ2BP/tissue/mouse+brain
David Rogers
@dwrogers
Feb 11 2016 21:26
My current watered-down plan is to instantiate n viewers, pointing to n different pyramids, each consisting of a unique focal plane. I would then hide and show viewers in order to cycle through the various focal planes. The end result is hopefully something like a fine focus on a microscope.
Ian Gilman
@iangilman
Feb 11 2016 21:28
@dwrogers The example @avandecreme just shared uses OSD
David Rogers
@dwrogers
Feb 11 2016 21:29
@avandecreme @iangilman I saw that site! But they don't have multiple focal plane support that I can see.
Antoine Vandecreme
@avandecreme
Feb 11 2016 21:29
For the distance measurement we have something there: https://isg.nist.gov/deepzoomweb/view/image/moche (check out the distance measurement menu on the left), but it is not pretty and not available as a plugin as of now. (though it does the job).

I saw that site! But they don't have multiple focal plane support that I can see.

What such support would do?

David Rogers
@dwrogers
Feb 11 2016 21:32
@avandecreme Yes, that looks like a great place to start! Would making it a plugin be a huge undertaking? (for an OSD newbie?)
Ian Gilman
@iangilman
Feb 11 2016 21:33
Rather than having multiple viewers, I recommend a single viewer with multiple images. That way you can coordinate zoom and pan, and there are various other nice things you get.
David Rogers
@dwrogers
Feb 11 2016 21:33
@avandecreme The end result is hopefully something like a fine focus on a microscope.
Ian Gilman
@iangilman
Feb 11 2016 21:33
One issue though is that all of the images you add to the viewer load their tiles even if they are opacity 0: openseadragon/openseadragon#806 should be easy to fix if you want to, though
Antoine Vandecreme
@avandecreme
Feb 11 2016 21:34

Yes, that looks like a great place to start! Would making it a plugin be a huge undertaking? (for an OSD newbie?)

You would need to re-implement it entirely but as @iangilman said, starting from the scalebar plugin and the selection plugin should help you a lot.

The end result is hopefully something like a fine focus on a microscope.

How should OSD know how to merge the different planes?

Ian Gilman
@iangilman
Feb 11 2016 21:37
@avandecreme I think just flipping between the different planes should be fine?
Antoine Vandecreme
@avandecreme
Feb 11 2016 21:38
Then this is supported by this website already http://www.proteinatlas.org/ENSG00000213463-SYNJ2BP/tissue/mouse+brain
David Rogers
@dwrogers
Feb 11 2016 21:40
The ultimate solution perhaps changes the tile location to something like url="J100XYZZY20_files/{z}/{l}/{c}{r}.jpg", where "z" is the z-plane.
Ian Gilman
@iangilman
Feb 11 2016 21:40
Right...with the "front-back" control in the lower right of the viewer?
David Rogers
@dwrogers
Feb 11 2016 21:41
@avandecreme I am not seeing the fine focus feature there.
Antoine Vandecreme
@avandecreme
Feb 11 2016 21:42
Bottom right corner of the viewer, you can click on a line to display that slice
David Rogers
@dwrogers
Feb 11 2016 21:52
@avandecreme Yes, sort of like that but the total loss of context (zoom level and viewport information) when moving from slice to slice is a deal killer. I want something that looks somewhat like a simple zoom. With multiple viewers, I should be able to keep them in sync by propagating this information from the active viewer to inactive viewers?
"active" s/b "visible" and "inactive" s/b "hidden"
Ian Gilman
@iangilman
Feb 11 2016 21:53
@dwrogers Yes, but as I said you're better off with a single viewer and multiple images
David Rogers
@dwrogers
Feb 11 2016 21:54
@iangilman Can the images overlap? and can I hide/show them individually?
Ian Gilman
@iangilman
Feb 11 2016 21:56
Yes, you have complete control over where the images are located on the canvas, and what their opacity is. The only caveat is that they still load their tiles even if they are opacity 0: #806
David Rogers
@dwrogers
Feb 11 2016 21:58
Sounds like a plan. I can try to limit the number of layers - perhaps adjust the number of layers in response to performance characteristics, if performance becomes an issue.
Ian Gilman
@iangilman
Feb 11 2016 21:59
Cool. You can also dynamically add them and remove them if you want
Also #806 should be an easy fix if you want to tackle it
David Rogers
@dwrogers
Feb 11 2016 21:59
@iangilman <smirk>
I just saw the label....
Antoine Vandecreme
@avandecreme
Feb 11 2016 22:00
@dwrogers We are doing that here: https://isg.nist.gov/deepzoomweb/view/image/replica1
In the "layer composition" title, you can add some layer and modify there opacity
Ian Gilman
@iangilman
Feb 11 2016 22:00
@dwrogers We try to mark things clearly! ;)
Here is some info on multi-image: http://openseadragon.github.io/examples/multi-image/
David Rogers
@dwrogers
Feb 11 2016 22:02
@avandecreme Yes, I can see that now in the layer composition feature.
Alexey Tikhonov
@altert
Feb 11 2016 22:08
@avandecreme do you use overlays for layers?
very impressive tool
David Rogers
@dwrogers
Feb 11 2016 22:11
Wow! Thanks guys! I am feeling a lot more confidence I can get this done and contribute a little along the way. Time to fork or clone or whatever the hell I am supposed to do. (TFS made life so easy...) I have not been involved in an open source project before... Is there a simple cheat sheet for the process? So I fork, fix, push and then pull request? The "fork" rather than "clone" allows me to push my changes up where someone can review and pull them?
Ian Gilman
@iangilman
Feb 11 2016 22:15
@dwrogers Yup, that's about the size of it!
VoidVolker
@VoidVolker
Feb 11 2016 22:29
@dwrogers welcome ) if you need easy image slicer - use my https://github.com/VoidVolker/MagickSlicer ^_^
Antoine Vandecreme
@avandecreme
Feb 11 2016 22:32

do you use overlays for layers?

@altert no each layer is a dzi pyramid (tiled image). This is using this api: http://openseadragon.github.io/examples/multi-image/

Alexey Tikhonov
@altert
Feb 11 2016 22:39
@avandecreme got it, thanks. Will need to do something similar for one project, now I know how)
David Rogers
@dwrogers
Feb 11 2016 22:41
@VoidVolker Would love to use your slicer but first we have to get OpenSlide to recognize and allow extraction to other focal planes.
Ian Gilman
@iangilman
Feb 11 2016 23:54
Btw, in other news, my OpenSeadragon-based music thing is coming along nicely: http://www.letsfathom.com/
Antoine Vandecreme
@avandecreme
Feb 11 2016 23:58
very cool :)
David Rogers
@dwrogers
Feb 11 2016 23:59
Indeed! :-)