emigre / openseadragon-annotations

Draw annotations over deep zoom images
BSD 3-Clause "New" or "Revised" License
97 stars 39 forks source link

Annotation not working with OSD Reference Strip #9

Open imoutsatsos opened 7 years ago

imoutsatsos commented 7 years ago

Greetings and thanks for this nice plugin! I have run into issues trying to annotate using the OSD with a reference image strip

 var viewer = OpenSeadragon({
        id: "openseadragon1",
        prefixUrl: "/userContent/lib/openseadragon-2.2.1/images/",
        sequenceMode: true,
        showReferenceStrip: true,
        referenceStripScroll: 'horizontal',
        viewportMargins:{bottom:120},
    tileSources:  [tilesArray]                            
    });
     viewer.initializeAnnotations();

I can always annotate the first image fine, but once I move on to the next image it stops working. The mouse just pans the image instead of annotating. Is a viewer with a reference strip supported?

Attaching an example below. Thanks again for your open source work! image

apricea4 commented 7 years ago

Hey @imoutsatsos I have the same issue, but I am just experiencing it. Have you tried to work around it in any way? There is another post in the OpenSeadragon issues with a guy who is putting a reference strip outside of the viewer. I wonder if that could help at all. Just seeing if you have made any progress or knows what doesn't work.
Thanks

emigre commented 7 years ago

@imoutsatsos, thanks to you for your interest and for taking the time of creating this detailed issue. I have to confess that I just never thought about reference strips, I don't think it's supported to be honest.

If you have an example repo that you can share in github I can take a look and work on implementing this feature in the next version of the plugin, or in this one.

imoutsatsos commented 7 years ago

@Emigre Thank you for the latest updates. Even without the reference strip I'm unable to get annotations to work. Now, instead of using a reference strip I load images in an specific positions in the viewer.world. In this case the plugin adds the buttons, but I can't annotate at all. The draw button just moves the images

image

and using this code to activate annotations

var viewer = OpenSeadragon({
     id: "openseadragon1",
     prefixUrl: "/userContent/js/openseadragon-2.2.1/images/",
     preserveViewport: true,
     crossOriginPolicy:"Anonymous",
     viewportMargins: {
       bottom: 120
     },
     tileSources: []
   });
   viewer.initializeAnnotations();

Update: If I use viewer.initializeAnnotations(); AFTER the images are loaded into the viewer.world then it works. However, any time I add a new image to the 'world' it stops working. Also, if I try to initialize with the suggested constructor const annotations = new OpenSeadragon.Annotations({ viewer }); I get an error #16

emigre commented 7 years ago

@imoutsatsos, if you could provide me a github repo with an example of what you are doing, it would help me to identify the issue.

imoutsatsos commented 7 years ago

@Emigre Thank you for reviewing this. I will create a use case on github next week for you to be able to test the environment I work with.

imoutsatsos commented 7 years ago

@Emigre I have now create a use case example that you can clone and test. https://github.com/imoutsatsos/osdUseCaseHCS

The annotation plugin should be active when the page is first laid out and you should be able to annotate with the pencil tool. However, if you change the layout of the page you can no longer add annotations. Happy to assist with any question, and I much appreciate you looking into this!

emigre commented 4 years ago

@imoutsatsos hi, I hope that all is fine. I'm not sure if I got back to you regarding this? Apologies if not. I'm really sorry but I lack the time to invest in this plugin, I'm planning on terminating it. Sorry for not getting back to you earlier. Please, if you need this plugin, keep a fork and feel free to continue its development. I hope that all is well, best regards.

imoutsatsos commented 4 years ago

Thanks for the update @Emigre ! Hope all is well with you as well. I think your plugin was a great start! I will fork it in case I need to go back to use it in the future. But I understand how we all refocus on what is important for our daily work. Best regards

iangilman commented 4 years ago

@Emigre I'm sorry to hear that, but I certainly understand!

I believe there are people who have found this plug-in useful… It would be great to see if we could find someone to adopt it.

@imoutsatsos any interest in being that person?

emigre commented 4 years ago

Thanks @iangilman ! Yes, sure... If there is somebody interested in it, we can do that.

imoutsatsos commented 4 years ago

@Emigre and @iangilman thanks for the invitation! I'm currently using OSD but have not revisited annotations. I will review the plugin source code to understand whether this is something I can tackle. Best regards

iangilman commented 4 years ago

@imoutsatsos Great! We mostly need someone willing to "mind the store"; host the plug-in on their GitHub, respond to issues, review pull requests.

My strategy for open source management without burnout is to help people help themselves… I manage the OpenSeadragon community, but I don't do coding on it myself. When people come with questions or bugs, I give them information for how they can help fix the problems. Otherwise all I would ever do is fix things for people! It's working so far…

emigre commented 4 years ago

@iangilman, that makes sense, sounds like a good approach.

If not @imoutsatsos, maybe you are interested?...

iangilman commented 4 years ago

Well, it doesn't appear anyone has raised their hand, so we can shift this over to the OpenSeadragon organization if you want. I'm actually not entirely sure how one does that… Do you know?