andreped commited on
Commit
68d68c5
1 Parent(s): f9bd5ee

Implemented HTML for demo

Browse files
Files changed (1) hide show
  1. index.html +75 -0
index.html ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <title>Whole Slide Image Annotation</title>
4
+
5
+ <link rel="stylesheet" href="node_modules/@recogito/annotorious/dist/annotorious.min.css">
6
+ <link rel="stylesheet" href="node_modules/@recogito/annotorious-selector-pack/dist/annotorious-selector-pack.min.css">
7
+
8
+ <!-- Dependencies -->
9
+ <script src="node_modules/openseadragon/build/openseadragon/openseadragon.min.js"></script>
10
+ <script src="node_modules/@recogito/annotorious-openseadragon/dist/openseadragon-annotorious.min.js"></script>
11
+ <script src="https://cdn.jsdelivr.net/npm/@recogito/[email protected]/dist/annotorious-toolbar.min.js"></script>
12
+ <script src="https://cdn.jsdelivr.net/npm/@recogito/[email protected]/dist/annotorious-selector-pack.min.js"></script>
13
+ </head>
14
+ <body>
15
+ <div style="padding: 0 0em; height: 95%; background: #303030">
16
+ <div class="sidebar-left" style="float: left; width: 10%;">
17
+ <h1 style="color: white; font-size: 16; padding: 0 1.5em;">Whole Slide Image Annotation Demo</h1>
18
+
19
+ <hr style="border: 1px solid white;">
20
+
21
+ <div class="position"></div>
22
+ <div class="zoom" style="margin-top: 3em;"></div>
23
+ </div>
24
+ <div id="wsi-canvas" style="float: left; width: 80%; height: 100%; background: white;"></div>
25
+ <div id="annotation-toolbar"></div>
26
+
27
+ <div class="sidebar-right" style="float: right; width: 10%;">
28
+ <div class="position"></div>
29
+ <div class="zoom" style="margin-top: 3em;"></div>
30
+ </div>
31
+
32
+ <div id="annotation_list" style="display: none;"></div>
33
+ </div>
34
+ <link rel="stylesheet" href="annotorious.min.css">
35
+ <script type="text/javascript">
36
+ var viewer = OpenSeadragon({
37
+ id: "wsi-canvas",
38
+ prefixUrl: "node_modules/openseadragon/build/openseadragon/images/",
39
+ zoomPerScroll: 2,
40
+ zoomPerClick: 1,
41
+ showNavigator: true,
42
+ showHomeControl: false,
43
+ showFullPageControl: false,
44
+ showZoomControl: false,
45
+ minZoomLevel: 0.25,
46
+ maxZoomLevel: 40,
47
+ tileSources: {
48
+ Image: {
49
+ xmlns: "http://schemas.microsoft.com/deepzoom/2008",
50
+ Url: "A05_files/",
51
+ Format: "jpeg",
52
+ Overlap: "0",
53
+ TileSize: "256",
54
+ Size: {
55
+ Height: 42625,
56
+ Width: 51553
57
+ }
58
+ },
59
+ overlays: [],
60
+ },
61
+ });
62
+ viewer.innerTracker.keyHandler = null;
63
+
64
+ var anno = OpenSeadragon.Annotorious(viewer);
65
+ Annotorious.SelectorPack(anno);
66
+
67
+ const toolbar = new Annotorious.Toolbar(anno, document.getElementById('annotation-toolbar'));
68
+ viewer.addControl(document.getElementById("annotation-toolbar"), {anchor: OpenSeadragon.ControlAnchor.TOP_LEFT});
69
+
70
+ document.getElementById('annotation-toolbar').addEventListener('click', function(event) {
71
+ event.preventDefault();
72
+ });
73
+ </script>
74
+ </body>
75
+ </html>