Skip to content

Instantly share code, notes, and snippets.

@birm
Last active May 9, 2020 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save birm/380a52951e5e0af7ccdc164582484d0f to your computer and use it in GitHub Desktop.
Save birm/380a52951e5e0af7ccdc164582484d0f to your computer and use it in GitHub Desktop.
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/openseadragon/2.3.0/openseadragon.min.js"></script>
</head>
<body>
<div id="head"></div>
<div id="about"></div>
<div id="windows">
<div id="first" style="width: 800px; height: 600px;"></div>
</div>
<script src="custom_tile_sources.js"></script>
</body>
</html>
var prefixurl = "https://cdn.jsdelivr.net/npm/openseadragon@2.3/build/openseadragon/images/";
var viewer1 = OpenSeadragon({
id: "first",
prefixUrl: prefixurl,
tileSources: {
height: 172*512,
width: 100*512,
tileSize: 512,
minLevel: 1,
maxLevel:10,
getTileUrl: function( level, x, y ){
level = 10 - level;
//console.log("{level:" + level+ ", x:"+x + ",y:" + y);
return "http://dragon.cci.emory.edu:8000/saved-" + level + "-" + x + "-" + y + ".png";
}
}
});
viewer1.addTiledImage({tileSource: {
height: 172*512,
width: 100*512,
tileSize: 512,
minLevel: 1,
maxLevel:10,
getTileUrl: function( level, x, y ){
level = 10 - level;
return "http://dragon.cci.emory.edu:8081/overlay_img_test/saved-" + level + "-" + x + "-" + y + ".png";
}
}});
// add this to camicroscopr
viewer.addTiledImage({tileSource: {
height: 172*512,
width: 100*512,
tileSize: 512,
minLevel: 1,
maxLevel:10,
getTileUrl: function( level, x, y ){
level = 10 - level;
return "http://dragon.cci.emory.edu:8081/overlay_img_test/saved-" + level + "-" + x + "-" + y + ".png";
}
}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment