dicom-microscopy-viewer 0.36.0 → 0.36.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/{build → dist}/08929516bda4c4fd2597.module.wasm +0 -0
- package/dist/4f2853de305c1b5afcac.module.wasm +0 -0
- package/{build → dist}/6ae9c6e051fd2bd70fad.module.wasm +0 -0
- package/dist/6b62efd6c7f30afd4c78.module.wasm +0 -0
- package/{build → dist}/7e1d2da75b59525e1933.module.wasm +0 -0
- package/{build → dist}/d051f2d564fae150ce94.module.wasm +0 -0
- package/dist/dicom-microscopy-viewer.js +2 -0
- package/{build → dist}/dicom-microscopy-viewer.js.LICENSE.txt +0 -0
- package/dist/dicom-microscopy-viewer.js.map +1 -0
- package/{build → dist}/e6305f756142e57c92cd.module.wasm +0 -0
- package/{build → dist}/f3e0c999ad06a34a7f75.module.wasm +0 -0
- package/docs/annotation.AnnotationGroup.html +2 -2
- package/docs/annotation.html +4 -3
- package/docs/annotation.js.html +8 -8
- package/docs/annotations__AnnotationManager.js.html +5 -5
- package/docs/annotations_markups__MarkupManager.js.html +52 -7
- package/docs/api.html +3 -3
- package/docs/color.PaletteColorLookupTable.html +688 -0
- package/docs/color.html +671 -0
- package/docs/color.js.html +30 -5
- package/docs/dicom-microscopy-viewer.js.html +30 -13
- package/docs/events.html +3 -3
- package/docs/events.js.html +2 -2
- package/docs/index.html +23 -24
- package/docs/mapping.ParameterMapping.html +10 -10
- package/docs/mapping.Transformation.html +180 -0
- package/docs/mapping.html +7 -4
- package/docs/mapping.js.html +7 -3
- package/docs/metadata.Comprehensive3DSR.html +2 -2
- package/docs/metadata.MicroscopyBulkSimpleAnnotations.html +2 -2
- package/docs/metadata.ParametricMap.html +2 -2
- package/docs/metadata.Segmentation.html +2 -2
- package/docs/metadata.VLWholeSlideMicroscopyImage.html +2 -2
- package/docs/metadata.html +3 -3
- package/docs/metadata.js.html +2 -2
- package/docs/opticalPath.OpticalPath.html +2 -2
- package/docs/opticalPath.html +3 -3
- package/docs/opticalPath.js.html +2 -2
- package/docs/pyramid.js.html +6 -4
- package/docs/roi.ROI.html +2 -2
- package/docs/roi.html +4 -4
- package/docs/roi.js.html +4 -4
- package/docs/scoord3d.Ellipse.html +2 -2
- package/docs/scoord3d.Ellipsoid.html +2 -2
- package/docs/scoord3d.Multipoint.html +2 -2
- package/docs/scoord3d.Point.html +2 -2
- package/docs/scoord3d.Polygon.html +2 -2
- package/docs/scoord3d.Polyline.html +2 -2
- package/docs/scoord3d.html +3 -3
- package/docs/scoord3d.js.html +4 -4
- package/docs/segment.Segment.html +2 -2
- package/docs/segment.html +4 -4
- package/docs/segment.js.html +2 -2
- package/docs/utils.html +2812 -5
- package/docs/utils.js.html +77 -14
- package/docs/viewer.LabelImageViewer.html +3 -3
- package/docs/viewer.OverviewImageViewer.html +3 -3
- package/docs/viewer.VolumeImageViewer.html +87 -87
- package/docs/viewer.html +3 -3
- package/docs/viewer.js.html +45 -14
- package/package.json +8 -7
- package/src/annotation.js +6 -6
- package/src/annotations/_AnnotationManager.js +3 -3
- package/src/annotations/markers/arrow.js +11 -2
- package/src/annotations/markups/_MarkupManager.js +49 -4
- package/src/annotations/markups/measurement.js +14 -6
- package/src/annotations/markups/textEvaluation.js +23 -8
- package/src/color.js +28 -3
- package/src/dicom-microscopy-viewer.js +28 -11
- package/src/mapping.js +5 -1
- package/src/pyramid.js +4 -2
- package/src/roi.js +2 -2
- package/src/scoord3d.js +2 -2
- package/src/utils.js +75 -12
- package/src/viewer.js +37 -10
- package/webpack.config.js +11 -1
- package/build/33ef438573e49fde75eb.module.wasm +0 -0
- package/build/510fe8aff40dafc5b19b.module.wasm +0 -0
- package/build/713dba1fa973be4d97f4.module.wasm +0 -0
- package/build/86e23957894a6f373e11.module.wasm +0 -0
- package/build/c337ef929a626d7e5353.module.wasm +0 -0
- package/build/ce3907ececff7b46856f.wasm +0 -0
- package/build/dicom-microscopy-viewer.js +0 -2
- package/build/dicom-microscopy-viewer.js.map +0 -1
- package/docs/PaletteColorLookupTable.html +0 -364
- package/docs/Transformation.html +0 -179
- package/docs/annotations_markers_arrow.js.html +0 -224
- package/docs/annotations_markups_measurement.js.html +0 -136
- package/docs/annotations_markups_textEvaluation.js.html +0 -184
- package/docs/annotations_markups_utils_getShortestLineBetweenOverlayAndFeature.js.html +0 -96
- package/docs/global.html +0 -6062
- package/examples/basic/index.html +0 -77
- package/examples/blend/index.html +0 -209
- package/examples/events/index.html +0 -436
- package/examples/index.html +0 -32
- package/examples/js/FileSaver.min.js +0 -3
- package/examples/js/jquery.min.js +0 -4
- package/examples/js/jquery.min.map +0 -1
- package/examples/simple_viewer/index.html +0 -520
- package/examples/simple_viewer/scripts/dicomdict.js +0 -34030
- package/examples/simple_viewer/scripts/metadata.js +0 -79
- package/examples/simple_viewer/styles/main.css +0 -238
- package/examples/structured_report/index.html +0 -278
- package/examples/styles.js +0 -46
- package/src/annotations/markups/utils/getShortestLineBetweenOverlayAndFeature.js +0 -45
- package/src/annotations/markups/utils/index.js +0 -1
|
@@ -1,436 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta
|
|
6
|
-
name="viewport"
|
|
7
|
-
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
|
8
|
-
/>
|
|
9
|
-
<meta name="theme-color" content="#000000" />
|
|
10
|
-
|
|
11
|
-
<title>dicom-microscopy-viewer example</title>
|
|
12
|
-
|
|
13
|
-
<!-- Latest compiled and minified CSS -->
|
|
14
|
-
<link
|
|
15
|
-
rel="stylesheet"
|
|
16
|
-
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
|
|
17
|
-
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
|
|
18
|
-
crossorigin="anonymous"
|
|
19
|
-
/>
|
|
20
|
-
<link
|
|
21
|
-
rel="stylesheet"
|
|
22
|
-
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
|
|
23
|
-
integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0="
|
|
24
|
-
crossorigin="anonymous"
|
|
25
|
-
/>
|
|
26
|
-
</head>
|
|
27
|
-
|
|
28
|
-
<body>
|
|
29
|
-
<noscript>
|
|
30
|
-
You need to enable JavaScript to run this app.
|
|
31
|
-
</noscript>
|
|
32
|
-
|
|
33
|
-
<script src="https://unpkg.com/dicomweb-client"></script>
|
|
34
|
-
<!-- <script src="https://unpkg.com/dicom-microscopy-viewer"></script> -->
|
|
35
|
-
<script src="build/dicom-microscopy-viewer.js"></script>
|
|
36
|
-
<script src="../styles.js"></script>
|
|
37
|
-
|
|
38
|
-
<script>
|
|
39
|
-
const CORE_ACTIONS = {
|
|
40
|
-
ACTIVATE_DRAW: "activate_draw",
|
|
41
|
-
DEACTIVATE_DRAW: "deactivate_draw",
|
|
42
|
-
ACTIVATE_SELECTION: "activate_selection",
|
|
43
|
-
ACTIVATE_MODIFICATIONS: "activate_modifications",
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
document.addEventListener("DOMContentLoaded", () => {
|
|
47
|
-
document
|
|
48
|
-
.getElementById("tools-list")
|
|
49
|
-
.addEventListener("click", (event) => {
|
|
50
|
-
let geometryType = event.target.id;
|
|
51
|
-
disableToolList();
|
|
52
|
-
|
|
53
|
-
const toolToGeometryType = {
|
|
54
|
-
/** Annotations */
|
|
55
|
-
freetext: "point",
|
|
56
|
-
arrow: "point",
|
|
57
|
-
length: "line",
|
|
58
|
-
"polygon-markup": "polygon",
|
|
59
|
-
/** Built-in */
|
|
60
|
-
polygon: "polygon",
|
|
61
|
-
circle: "circle",
|
|
62
|
-
point: "point",
|
|
63
|
-
box: "box",
|
|
64
|
-
freehandpolygon: "freehandpolygon",
|
|
65
|
-
line: "line",
|
|
66
|
-
freehandline: "freehandline",
|
|
67
|
-
};
|
|
68
|
-
const toolToDrawOptions = {
|
|
69
|
-
freetext: {
|
|
70
|
-
markup: "text",
|
|
71
|
-
label: "default label",
|
|
72
|
-
},
|
|
73
|
-
arrow: {
|
|
74
|
-
marker: "arrow",
|
|
75
|
-
markup: "text",
|
|
76
|
-
label: "default label",
|
|
77
|
-
},
|
|
78
|
-
length: {
|
|
79
|
-
markup: "measurement",
|
|
80
|
-
maxPoints: 1,
|
|
81
|
-
minPoints: 1,
|
|
82
|
-
vertexEnabled: false,
|
|
83
|
-
},
|
|
84
|
-
"polygon-markup": {
|
|
85
|
-
markup: "measurement",
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
const drawOptions = toolToDrawOptions[geometryType] || {};
|
|
89
|
-
|
|
90
|
-
window.viewer.activateDrawInteraction({
|
|
91
|
-
geometryType: toolToGeometryType[geometryType],
|
|
92
|
-
styleOptions: openLayersStyles.default,
|
|
93
|
-
...drawOptions,
|
|
94
|
-
});
|
|
95
|
-
document
|
|
96
|
-
.getElementById(`${geometryType}`)
|
|
97
|
-
.setAttribute("class", "list-group-item active");
|
|
98
|
-
disableCoreActions();
|
|
99
|
-
toggleElement("activate_draw", true);
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
// Event list
|
|
103
|
-
document
|
|
104
|
-
.getElementById("event-list")
|
|
105
|
-
.addEventListener("click", (event) => {
|
|
106
|
-
const eventType = event.target.id;
|
|
107
|
-
|
|
108
|
-
if (
|
|
109
|
-
document.getElementById(eventType).classList.contains("active")
|
|
110
|
-
) {
|
|
111
|
-
document.removeEventListener(
|
|
112
|
-
`dicommicroscopyviewer_${eventType}`,
|
|
113
|
-
logEvent
|
|
114
|
-
);
|
|
115
|
-
} else {
|
|
116
|
-
addEventListener(eventType);
|
|
117
|
-
}
|
|
118
|
-
document.getElementById(eventType).classList.toggle("active");
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
Object.keys(CORE_ACTIONS).forEach((action) =>
|
|
122
|
-
document
|
|
123
|
-
.getElementById(CORE_ACTIONS[action])
|
|
124
|
-
.addEventListener("click", toggleCoreAction, false)
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
const rois = document.getElementById("rois");
|
|
128
|
-
|
|
129
|
-
rois.addEventListener(
|
|
130
|
-
"click",
|
|
131
|
-
(e) => {
|
|
132
|
-
const li = e.target.closest("li");
|
|
133
|
-
let nodes = Array.from(rois.children);
|
|
134
|
-
nodes = Array.from(li.closest("ul").children);
|
|
135
|
-
const index = nodes.indexOf(li);
|
|
136
|
-
viewer.removeROI(index);
|
|
137
|
-
// if there is a selection when deleting the structure, the selection keeps there
|
|
138
|
-
if (viewer.isSelectInteractionActive) {
|
|
139
|
-
viewer.deactivateSelectInteraction();
|
|
140
|
-
viewer.deactivateDrawInteraction();
|
|
141
|
-
disableCoreActions();
|
|
142
|
-
toggleElement("deactivate_draw", true);
|
|
143
|
-
}
|
|
144
|
-
rois.removeChild(rois.children[index]);
|
|
145
|
-
},
|
|
146
|
-
false
|
|
147
|
-
);
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
function disableCoreActions() {
|
|
151
|
-
const elements = document
|
|
152
|
-
.getElementById("core-actions")
|
|
153
|
-
.querySelector("a.active");
|
|
154
|
-
if (elements !== null) {
|
|
155
|
-
elements.classList.remove("active");
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
function toggleElement(element, state) {
|
|
160
|
-
if (state) {
|
|
161
|
-
document.getElementById(element).classList.add("active");
|
|
162
|
-
} else {
|
|
163
|
-
document.getElementById(element).classList.remove("active");
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function toggleCoreAction(event) {
|
|
168
|
-
const targetId = event.target.id;
|
|
169
|
-
disableCoreActions();
|
|
170
|
-
|
|
171
|
-
window.viewer.deactivateDrawInteraction();
|
|
172
|
-
window.viewer.deactivateSelectInteraction();
|
|
173
|
-
window.viewer.deactivateModifyInteraction();
|
|
174
|
-
|
|
175
|
-
switch (targetId) {
|
|
176
|
-
case CORE_ACTIONS.ACTIVATE_SELECTION:
|
|
177
|
-
if (!window.viewer.isSelectInteractionActive) {
|
|
178
|
-
disableToolList();
|
|
179
|
-
window.viewer.deactivateDrawInteraction();
|
|
180
|
-
window.viewer.activateSelectInteraction();
|
|
181
|
-
}
|
|
182
|
-
break;
|
|
183
|
-
case CORE_ACTIONS.ACTIVATE_MODIFICATIONS:
|
|
184
|
-
if (!window.viewer.isModifyInteractionActive) {
|
|
185
|
-
disableToolList();
|
|
186
|
-
window.viewer.deactivateDrawInteraction();
|
|
187
|
-
window.viewer.activateModifyInteraction();
|
|
188
|
-
}
|
|
189
|
-
break;
|
|
190
|
-
case CORE_ACTIONS.DEACTIVATE_DRAW:
|
|
191
|
-
disableToolList();
|
|
192
|
-
break;
|
|
193
|
-
case CORE_ACTIONS.ACTIVATE_DRAW:
|
|
194
|
-
viewer.activateDrawInteraction({ geometryType: "polygon" });
|
|
195
|
-
document
|
|
196
|
-
.getElementById("polygon")
|
|
197
|
-
.setAttribute("class", "list-group-item active");
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
toggleElement(targetId, true);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
function addEventListener(eventType) {
|
|
204
|
-
document.addEventListener(
|
|
205
|
-
`dicommicroscopyviewer_${eventType}`,
|
|
206
|
-
logEvent
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
function disableToolList() {
|
|
211
|
-
const toolList = document
|
|
212
|
-
.getElementById("tools-list")
|
|
213
|
-
.querySelector("a.active");
|
|
214
|
-
if (toolList !== null) {
|
|
215
|
-
toolList.classList.remove("active");
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
function logEvent(event) {
|
|
220
|
-
console.log(event);
|
|
221
|
-
const eventType = event.type.split("dicommicroscopyviewer_")[1];
|
|
222
|
-
const content = event.detail;
|
|
223
|
-
const activeElements = document
|
|
224
|
-
.getElementById("log")
|
|
225
|
-
.querySelector("a.active");
|
|
226
|
-
if (activeElements) {
|
|
227
|
-
activeElements.classList.remove("active");
|
|
228
|
-
}
|
|
229
|
-
const new_event = `<a class="list-group-item active">
|
|
230
|
-
<h4 class="list-group-item-heading">${eventType}</h4>
|
|
231
|
-
<p class="list-group-item-text">${new Date(
|
|
232
|
-
content.time
|
|
233
|
-
).toLocaleTimeString()}</p>
|
|
234
|
-
</a>`;
|
|
235
|
-
|
|
236
|
-
const log = document.getElementById("log");
|
|
237
|
-
|
|
238
|
-
let newNode = document.createElement("div");
|
|
239
|
-
newNode.innerHTML = new_event.trim();
|
|
240
|
-
log.prepend(newNode);
|
|
241
|
-
|
|
242
|
-
if (eventType === "roi_added") {
|
|
243
|
-
const rois = document.getElementById("rois");
|
|
244
|
-
const json = JSON.stringify(
|
|
245
|
-
content.payload.scoord3d.graphicData,
|
|
246
|
-
undefined,
|
|
247
|
-
2
|
|
248
|
-
).replace(/"/g, "");
|
|
249
|
-
const newROI = `<div class="list-group-item" title="${json}">
|
|
250
|
-
<h4 class="list-group-item-heading">${
|
|
251
|
-
Object.keys(content.payload.properties)[0]
|
|
252
|
-
}</h4>
|
|
253
|
-
<p class="list-group-item-text">${new Date(
|
|
254
|
-
content.time
|
|
255
|
-
).toLocaleTimeString()}</p>
|
|
256
|
-
</div>`;
|
|
257
|
-
let newROIDivElement = document.createElement("li");
|
|
258
|
-
newROIDivElement.innerHTML = newROI.trim();
|
|
259
|
-
rois.append(newROIDivElement);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
const url = "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs";
|
|
264
|
-
const client = new DICOMwebClient.api.DICOMwebClient({ url });
|
|
265
|
-
const studyInstanceUID = '1.2.392.200140.2.1.1.1.2.799008771.2156.1519721160.421';
|
|
266
|
-
const seriesInstanceUID = '1.2.392.200140.2.1.1.1.3.799008771.2156.1519721160.422';
|
|
267
|
-
|
|
268
|
-
const searchInstanceOptions = {
|
|
269
|
-
studyInstanceUID,
|
|
270
|
-
seriesInstanceUID,
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
client.searchForInstances(searchInstanceOptions).then((instances) => {
|
|
274
|
-
const promises = []
|
|
275
|
-
for (let i = 0; i < instances.length; i++) {
|
|
276
|
-
const seriesInstanceUID = instances[i]["0020000E"]["Value"][0];
|
|
277
|
-
const sopInstanceUID = instances[i]["00080018"]["Value"][0];
|
|
278
|
-
const retrieveInstanceOptions = {
|
|
279
|
-
studyInstanceUID,
|
|
280
|
-
seriesInstanceUID,
|
|
281
|
-
sopInstanceUID,
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
const promise = client.retrieveInstanceMetadata(retrieveInstanceOptions).then(metadata => {
|
|
285
|
-
const image = DICOMMicroscopyViewer.metadata.formatMetadata(metadata[0]);
|
|
286
|
-
if (image.ImageType[2] === "VOLUME") {
|
|
287
|
-
return(metadata[0]);
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
promises.push(promise);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
return(Promise.all(promises));
|
|
295
|
-
}).then(metadata => {
|
|
296
|
-
const viewer = new DICOMMicroscopyViewer.api.VLWholeSlideMicroscopyImageViewer({
|
|
297
|
-
client,
|
|
298
|
-
metadata,
|
|
299
|
-
controls: ['fullscreen', 'zoom'],
|
|
300
|
-
retrieveRendered: true
|
|
301
|
-
});
|
|
302
|
-
|
|
303
|
-
const container = document.getElementById("dicomImage");
|
|
304
|
-
viewer.render({ container });
|
|
305
|
-
|
|
306
|
-
viewer.activateDrawInteraction({ geometryType: "polygon" });
|
|
307
|
-
window.viewer = viewer;
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
addEventListener("move_started");
|
|
311
|
-
addEventListener("move_ended");
|
|
312
|
-
addEventListener("roi_added");
|
|
313
|
-
</script>
|
|
314
|
-
</body>
|
|
315
|
-
|
|
316
|
-
<body>
|
|
317
|
-
<div class="container">
|
|
318
|
-
<div class="page-header">
|
|
319
|
-
<h1>Microscopy viewer Events Handler</h1>
|
|
320
|
-
<p>This example demonstrates how to interact with Microscopy Events.</p>
|
|
321
|
-
<a href="../">Go back to the Examples page</a>
|
|
322
|
-
</div>
|
|
323
|
-
|
|
324
|
-
<div class="bs-example" data-example-id="simple-thumbnails">
|
|
325
|
-
<div class="row">
|
|
326
|
-
<div class="col-xs-6 col-md-4">
|
|
327
|
-
<div class="alert alert-warning text-center" role="alert">
|
|
328
|
-
Attach/Detach event listeners
|
|
329
|
-
</div>
|
|
330
|
-
<div class="list-group" id="event-list">
|
|
331
|
-
<a id="roi_added" class="list-group-item active">ROI Added</a>
|
|
332
|
-
<a id="roi_removed" class="list-group-item">ROI Removed</a>
|
|
333
|
-
<a id="roi_drawn" class="list-group-item">ROI Drawn</a>
|
|
334
|
-
<a id="roi_selected" class="list-group-item">ROI Selected</a>
|
|
335
|
-
<a id="roi_modified" class="list-group-item">ROI Modified</a>
|
|
336
|
-
<a id="move_started" class="list-group-item active"
|
|
337
|
-
>Move Started</a
|
|
338
|
-
>
|
|
339
|
-
<a id="move_ended" class="list-group-item active">Move Ended</a>
|
|
340
|
-
</div>
|
|
341
|
-
</div>
|
|
342
|
-
<div class="col-xs-6 col-md-4">
|
|
343
|
-
<div class="alert alert-warning text-center" role="alert">
|
|
344
|
-
Select the tool to use for drawing
|
|
345
|
-
</div>
|
|
346
|
-
<div class="list-group" id="tools-list">
|
|
347
|
-
<a id="length" class="list-group-item">Length</a>
|
|
348
|
-
<a id="arrow" class="list-group-item">Arrow</a>
|
|
349
|
-
<a id="freetext" class="list-group-item">FreeText</a>
|
|
350
|
-
<a id="polygon-markup" class="list-group-item"
|
|
351
|
-
>Polygon with markup</a
|
|
352
|
-
>
|
|
353
|
-
<a id="polygon" class="list-group-item active">Polygon</a>
|
|
354
|
-
<a id="point" class="list-group-item">Point</a>
|
|
355
|
-
<a id="circle" class="list-group-item">Circle</a>
|
|
356
|
-
<a id="box" class="list-group-item">Box</a>
|
|
357
|
-
<a id="freehandpolygon" class="list-group-item"
|
|
358
|
-
>Freehand Polygon</a
|
|
359
|
-
>
|
|
360
|
-
<a id="line" class="list-group-item">Line</a>
|
|
361
|
-
<a id="freehandline" class="list-group-item">Freehand Line</a>
|
|
362
|
-
</div>
|
|
363
|
-
<br />
|
|
364
|
-
</div>
|
|
365
|
-
<div class="col-xs-12 col-md-4">
|
|
366
|
-
<div class="alert alert-warning text-center" role="alert">
|
|
367
|
-
Core actions
|
|
368
|
-
</div>
|
|
369
|
-
<div class="list-group" id="core-actions">
|
|
370
|
-
<a id="activate_draw" class="list-group-item active"
|
|
371
|
-
>Activate Draw</a
|
|
372
|
-
>
|
|
373
|
-
<a id="deactivate_draw" class="list-group-item"
|
|
374
|
-
>Deactivate Draw</a
|
|
375
|
-
>
|
|
376
|
-
<a id="activate_selection" class="list-group-item"
|
|
377
|
-
>Activation ROI Selection</a
|
|
378
|
-
>
|
|
379
|
-
<a id="activate_modifications" class="list-group-item"
|
|
380
|
-
>Activate ROI Modification</a
|
|
381
|
-
>
|
|
382
|
-
</div>
|
|
383
|
-
</div>
|
|
384
|
-
<div class="col-xs-12 col-md-12">
|
|
385
|
-
<div
|
|
386
|
-
style="
|
|
387
|
-
width: 100%;
|
|
388
|
-
height: 550px;
|
|
389
|
-
position: relative;
|
|
390
|
-
display: inline-block;
|
|
391
|
-
"
|
|
392
|
-
oncontextmenu="return false"
|
|
393
|
-
class="cornerstone-enabled-image"
|
|
394
|
-
unselectable="on"
|
|
395
|
-
onselectstart="return false;"
|
|
396
|
-
onmousedown="return false;"
|
|
397
|
-
>
|
|
398
|
-
<div
|
|
399
|
-
id="dicomImage"
|
|
400
|
-
style="
|
|
401
|
-
width: 100%;
|
|
402
|
-
height: 550px;
|
|
403
|
-
top: 0px;
|
|
404
|
-
left: 0px;
|
|
405
|
-
position: absolute;
|
|
406
|
-
border: 1px solid black;
|
|
407
|
-
"
|
|
408
|
-
></div>
|
|
409
|
-
</div>
|
|
410
|
-
</div>
|
|
411
|
-
<div class="col-xs-6 col-md-6">
|
|
412
|
-
<div class="alert alert-warning text-center" role="alert">
|
|
413
|
-
ROIs added (mouseover to see the coordinates or click to remove)
|
|
414
|
-
</div>
|
|
415
|
-
<ul class="list-group" id="rois"></ul>
|
|
416
|
-
</div>
|
|
417
|
-
<div class="col-xs-6 col-md-6">
|
|
418
|
-
<div class="alert alert-warning text-center" role="alert">
|
|
419
|
-
Event Log
|
|
420
|
-
</div>
|
|
421
|
-
<div class="list-group scrollable" id="log"></div>
|
|
422
|
-
</div>
|
|
423
|
-
</div>
|
|
424
|
-
</div>
|
|
425
|
-
</div>
|
|
426
|
-
<style>
|
|
427
|
-
.scrollable {
|
|
428
|
-
height: 600px;
|
|
429
|
-
overflow-y: scroll;
|
|
430
|
-
}
|
|
431
|
-
#rois li {
|
|
432
|
-
list-style-type: none;
|
|
433
|
-
}
|
|
434
|
-
</style>
|
|
435
|
-
</body>
|
|
436
|
-
</html>
|
package/examples/index.html
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE HTML>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
-
<link
|
|
6
|
-
rel="stylesheet"
|
|
7
|
-
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
|
|
8
|
-
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
|
|
9
|
-
crossorigin="anonymous"
|
|
10
|
-
/>
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<div class="container">
|
|
14
|
-
<div class="page-header">
|
|
15
|
-
<h1>dicom-microscopy-viewer Examples</h1>
|
|
16
|
-
<p>
|
|
17
|
-
These examples are meant to demonstrate various aspects of the dicom-microscopy-viewer library in an interactive way.
|
|
18
|
-
They are written such that they can be opened directly in your web browser from a local copy of the repository.
|
|
19
|
-
</p>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<ul>
|
|
23
|
-
<li><a href="basic/index.html">Rendering whole slide images</a> - The basic usage of the library to view a whole slide image</li>
|
|
24
|
-
<li><a href="blend/index.html">Blending whole slide images</a> - The basic usage of the library to blend whole slide images</li>
|
|
25
|
-
<li><a href="events/index.html">Handling viewer events</a> - Use custom viewer events to handle actions</li>
|
|
26
|
-
<li><a href="structured_report/index.html">Annotating whole slide images</a> - Annotate regions of interest and save annotations as a structured report</li>
|
|
27
|
-
<li><a href="simple_viewer/index.html">Simple whole slide image viewer</a> - List and navigate available studies/series</li>
|
|
28
|
-
</ul>
|
|
29
|
-
<br>
|
|
30
|
-
</div>
|
|
31
|
-
</body>
|
|
32
|
-
</html>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
(function(a,b){if("function"==typeof define&&define.amd)define([],b);else if("undefined"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error("could not download file")},d.send()}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,"undefined"!=typeof module&&(module.exports=g)});
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=FileSaver.min.js.map
|