annotorious / annotorious-openseadragon

An OpenSeadragon plugin for annotating high-res zoomable images
https://annotorious.github.io
BSD 3-Clause "New" or "Revised" License
121 stars 42 forks source link

Does annotorious support multi-image ?? #111

Closed Sadhikakichu closed 2 years ago

Sadhikakichu commented 2 years ago

How to work annotorious in this code. When i click on annotation i get [Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead. What i do

var tileSources = []; var width = 4096; var height = 2160; var numberofrows = 54; var numberofcols = 16; var tr; var tc;

for (r = 1; r <= numberofrows; r++) { if( r<10 ) { tr = "0" + r; } else { tr = "" + r; } for (c = 1; c <= numberofcols; c++) { if( c<10 ) { tc = "0" + c; } else { tc = "" + c; } var url = '../../DZIImages/ImageName_r00' + tr + '_c00' + tc + '_files/'; //dynamically forms tiled source filename

var tileSource = { Image: { xmlns: "http://schemas.microsoft.com/deepzoom/2008", Url: "../../data/testpattern_files/", Format: "png", Overlap: "2", TileSize: "128", Size: { Width: "4096", Height: "2160" } } };

tileSources.push({ tileSource: tileSource, x: c width, y: c height, width: width, // It figures out height automatically }); }

viewer = OpenSeadragon({ id: "openseadragon", prefixUrl: "../../DZIImages/openseadragon-bin-2.4.2/images/", homeFillsViewer: true, showNavigator: true, showRotationControl:true, tileSources: tileSources });

rsimon commented 2 years ago

Annotorious currently supports sequence mode only. (There are some extra steps you need to take care of in order to enable pagination of annotations - or use the Sequence Mode plugin.)

There is also a development branch for collection mode. But this hasn't been worked on for a while. Support for full multi-image is not planned at the moment.

rsimon commented 2 years ago

Update: in principle, Annotorious will just work fine in multi-image mode, too. And the message you are seeing ("[Viewport.imageToViewportRectangle] is not accurate with multi-image...") is only a warning. However: the coordinates of the annotations will then in the global world coordinate space, which will be different from the coordinates of the image.

Sadhikakichu commented 2 years ago

Thank you sir .Annotorious work in my program. But in my application when select an annotation for zoom view i get the zoom view of viewport portion which start from endpoint of my requested annotation rect. If my annotation start from half of a tiled image, then i get the zoom view of half portion of requested annotation and its next part image. When i zoom out the image i can see the requested annotation correctly. anno.setAnnotations(annotations_details); anno.fitBounds(annid, true); This works correctly in dzi image. I have this problem when i used multi-image(tiled image) . Any solution for this.

rsimon commented 2 years ago

I'm not sure I fully understand the problem. Do you maybe have an online demo I could look at?

However: if you create annotations on a (single) image, and then later use the same image in a multi-image display, then the annotations will not be placed correctly. That's a current limitation in Annotorious. I'd love to support this in the future, but can't say when or if I can make it happen. Sorry for not having better news :-(

rsimon commented 2 years ago

Closing this, since it's mostly a duplicate of #32.