-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
60 lines (58 loc) · 1.56 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
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Custom itk-viewer Boostrap UI Demo</title>
</head>
<body>
<div
class="content"
style="
position: absolute;
width: 100vw;
height: 100vh;
top: 0;
left: 0;
overflow: hidden;
background: black;
margin: 0;
padding: 0;
"
></div>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/itkVtkViewer.js"
></script>
<script>
const container = document.querySelector('.content')
const image = new URL(
'./test-data/HeadMRVolume.nrrd',
// 'http://localhost:8082/test-data/astronaut.zarr',
// 'http://localhost:8082/test-data/ome-ngff-prototypes/single_image/v0.4/tczyx.ome.zarr',
document.location.origin
)
const labelImage = new URL(
'./test-data/HeadMRVolumeLabels.nrrd',
document.location.origin
)
const uiMachineOptions = {
href: new URL(
'/src/bootstrapUIMachineOptions.js',
document.location.origin
).href
}
itkVtkViewer
.createViewer(container, {
image,
labelImage,
rotate: false,
config: { uiMachineOptions }
})
.then((viewer) => {
window.viewer = viewer
})
</script>
</body>
</html>