-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (44 loc) · 1.93 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html>
<head>
<title>Pyodide test</title>
<script src="https://cdn.jsdelivr.net/pyodide/v0.17.0/full/pyodide.js"></script>
</head>
<body>
<span>Enter URL of MicroDraw project with segmentation hints</span>
<br />
<input
type="text"
id="md_url"
style="width: 600px"
value="https://microdraw.pasteur.fr/data?source=https://microdraw.pasteur.fr/bigbrain/bigbrain.json&slice=0"
/>
<br />
<select id="select">
<option disabled selected value>Select an option</option>
<option>https://microdraw.pasteur.fr/data?source=https://microdraw.pasteur.fr/bigbrain/bigbrain.json&slice=0</option>
<option>https://microdraw.pasteur.fr/data?source=https://microdraw.pasteur.fr/ferret1/ferret.json&project=SegmentFIIND&slice=29</option>
<option>https://microdraw.pasteur.fr/data?source=https://bigbrain-ftp.loris.ca/bigbrain-ftp/BigBrainRelease.2015/MicroDraw/MicroDraw_Coronal.json&project=BigBrain20um&slice=3702</option>
</select>
<script>
const selectElem = document.getElementById('select')
selectElem.addEventListener('change', () => {
const index = selectElem.selectedIndex;
document.querySelector('input').value = document.querySelectorAll('option')[index].innerText;
})
</script>
<br />
<button onclick="getSegmentationHints();">Start</button>
<button onclick="processAllSlices();">Process All</button>
<br />
<div style="position:relative">
<div id="osd" style="flex:1;top:0;left:0"></div>
<canvas id="pjs" hidpi="off" style="position:absolute;top:0;left:0"></canvas>
</div>
<div id="log"></div>
<img id="py_img" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/openseadragon/openseadragon.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.12.15/paper-core.min.js"></script>
<script src="index.js"></script>
</body>
</html>