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,77 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
6
|
-
<meta name="theme-color" content="#000000">
|
|
7
|
-
|
|
8
|
-
<title>dicom-microscopy-viewer example</title>
|
|
9
|
-
|
|
10
|
-
<!-- Latest compiled and minified CSS -->
|
|
11
|
-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
|
12
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
|
|
13
|
-
</head>
|
|
14
|
-
|
|
15
|
-
<body>
|
|
16
|
-
<noscript>
|
|
17
|
-
You need to enable JavaScript to run this app.
|
|
18
|
-
</noscript>
|
|
19
|
-
<script src="https://unpkg.com/dicomweb-client"></script>
|
|
20
|
-
<!-- <script src="https://unpkg.com/build/dicom-microscopy-viewer.js"></script> -->
|
|
21
|
-
<script src="build/dicom-microscopy-viewer.js"></script>
|
|
22
|
-
<script>
|
|
23
|
-
const url = 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs';
|
|
24
|
-
const client = new DICOMwebClient.api.DICOMwebClient({url});
|
|
25
|
-
const studyInstanceUID = '1.2.392.200140.2.1.1.1.2.799008771.2156.1519721160.421';
|
|
26
|
-
const seriesInstanceUID = '1.2.392.200140.2.1.1.1.3.799008771.2156.1519721160.422';
|
|
27
|
-
const searchInstanceOptions = {
|
|
28
|
-
studyInstanceUID,
|
|
29
|
-
seriesInstanceUID
|
|
30
|
-
};
|
|
31
|
-
client.searchForInstances(searchInstanceOptions).then((instances) => {
|
|
32
|
-
const promises = []
|
|
33
|
-
for (let i = 0; i < instances.length; i++) {
|
|
34
|
-
const sopInstanceUID = instances[i]["00080018"]["Value"][0];
|
|
35
|
-
const retrieveInstanceOptions = {
|
|
36
|
-
studyInstanceUID,
|
|
37
|
-
seriesInstanceUID,
|
|
38
|
-
sopInstanceUID,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const promise = client.retrieveInstanceMetadata(retrieveInstanceOptions).then(metadata => {
|
|
42
|
-
const image = DICOMMicroscopyViewer.metadata.formatMetadata(metadata[0]);
|
|
43
|
-
if (image.ImageType[2] === "VOLUME") {
|
|
44
|
-
return(metadata[0]);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
promises.push(promise);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return(Promise.all(promises));
|
|
52
|
-
}).then(metadata => {
|
|
53
|
-
const viewer = new DICOMMicroscopyViewer.api.VLWholeSlideMicroscopyImageViewer({
|
|
54
|
-
client,
|
|
55
|
-
metadata,
|
|
56
|
-
controls: ['overview'],
|
|
57
|
-
retrieveRendered: true
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
var container = document.getElementById('root');
|
|
61
|
-
viewer.render({container});
|
|
62
|
-
});
|
|
63
|
-
</script>
|
|
64
|
-
<div class="container">
|
|
65
|
-
<div class="page-header">
|
|
66
|
-
<h1>
|
|
67
|
-
DICOM Microscopy Viewer Example
|
|
68
|
-
</h1>
|
|
69
|
-
<p>
|
|
70
|
-
This is a simple example rendering a Microscopy image
|
|
71
|
-
</p>
|
|
72
|
-
<a href="../">Go back to the Examples page</a>
|
|
73
|
-
</div>
|
|
74
|
-
<div id="root" style="height:1000px; width:1000px"></div>
|
|
75
|
-
</div>
|
|
76
|
-
</body>
|
|
77
|
-
</html>
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
6
|
-
<meta name="theme-color" content="#000000">
|
|
7
|
-
|
|
8
|
-
<title>dicom-microscopy-viewer example</title>
|
|
9
|
-
|
|
10
|
-
<!-- Latest compiled and minified CSS -->
|
|
11
|
-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
|
12
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
|
|
13
|
-
</head>
|
|
14
|
-
|
|
15
|
-
<body>
|
|
16
|
-
<noscript>
|
|
17
|
-
You need to enable JavaScript to run this app.
|
|
18
|
-
</noscript>
|
|
19
|
-
<script src="https://unpkg.com/dicomweb-client"></script>
|
|
20
|
-
<!-- <script src="https://unpkg.com/dicom-microscopy-viewer"></script> -->
|
|
21
|
-
<script src="build/dicom-microscopy-viewer.js"></script>
|
|
22
|
-
|
|
23
|
-
<script>
|
|
24
|
-
var colorPicker;
|
|
25
|
-
var channelToggle;
|
|
26
|
-
var minRange;
|
|
27
|
-
window.addEventListener("load", startup, false);
|
|
28
|
-
|
|
29
|
-
function startup() {
|
|
30
|
-
colorPicker = document.querySelector("#colorpicker");
|
|
31
|
-
colorPicker.addEventListener("change", updateChannelColor, false);
|
|
32
|
-
colorPicker.select();
|
|
33
|
-
|
|
34
|
-
channelToggle = document.querySelector("#toggleChannel");
|
|
35
|
-
channelToggle.addEventListener("change", updateChannelToggle, false);
|
|
36
|
-
|
|
37
|
-
minRange = document.querySelector("#minRange");
|
|
38
|
-
minRange.oninput = function() {
|
|
39
|
-
const minValue = this.value;
|
|
40
|
-
const thresholdValues = [minValue, 255.];
|
|
41
|
-
const blendingInformation = {
|
|
42
|
-
thresholdValues : thresholdValues,
|
|
43
|
-
opticalPathIdentifier : `15`,
|
|
44
|
-
};
|
|
45
|
-
viewer.setBlendingInformation(blendingInformation);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function updateChannelColor(event) {
|
|
50
|
-
const hexColor = event.target.value;
|
|
51
|
-
const color = [parseInt(hexColor.substr(1, 2), 16) / 255.,
|
|
52
|
-
parseInt(hexColor.substr(3, 2), 16) / 255.,
|
|
53
|
-
parseInt(hexColor.substr(5, 2), 16) / 255.];
|
|
54
|
-
const blendingInformation = {
|
|
55
|
-
color : color,
|
|
56
|
-
opticalPathIdentifier : `15`,
|
|
57
|
-
};
|
|
58
|
-
viewer.setBlendingInformation(blendingInformation);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function updateChannelToggle() {
|
|
62
|
-
const OpticalPathIdentifier = `15`;
|
|
63
|
-
if(channelToggle.checked) {
|
|
64
|
-
viewer.activateOpticalPath(OpticalPathIdentifier);
|
|
65
|
-
viewer.showOpticalPath(OpticalPathIdentifier);
|
|
66
|
-
} else {
|
|
67
|
-
viewer.deactivateOpticalPath(OpticalPathIdentifier);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const url = 'http://34.68.90.36/';
|
|
72
|
-
const client = new DICOMwebClient.api.DICOMwebClient({url});
|
|
73
|
-
const studyInstanceUID = '1.3.6.1.4.1.5962.99.1.3456320082.756362073.1622659023442.3.0';
|
|
74
|
-
const seriesInstanceUIDOne = '1.3.6.1.4.1.5962.1.1.0.0.0.1595262375.18986.1';
|
|
75
|
-
const seriesInstanceUIDTwo = '1.3.6.1.4.1.5962.1.1.0.0.0.1595262375.18986.15';
|
|
76
|
-
const seriesInstanceUIDThree = '1.3.6.1.4.1.5962.1.1.0.0.0.1595262375.18986.35';
|
|
77
|
-
const seriesInstanceUIDs = [seriesInstanceUIDOne, seriesInstanceUIDTwo, seriesInstanceUIDThree];
|
|
78
|
-
// NOTE: for parsing all the series of the study to the DICOMMicroscopyViewer, just setup seriesInstanceUIDs = [];
|
|
79
|
-
|
|
80
|
-
const searchInstanceOptions = {
|
|
81
|
-
studyInstanceUID,
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
client.searchForInstances(searchInstanceOptions).then((instances) => {
|
|
85
|
-
const promises = []
|
|
86
|
-
for (let i = 0; i < instances.length; i++) {
|
|
87
|
-
const seriesInstanceUID = instances[i]["0020000E"]["Value"][0];
|
|
88
|
-
if (seriesInstanceUIDs.length !== 0 && seriesInstanceUIDs.findIndex(uid => uid === seriesInstanceUID) === -1) {
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
const sopInstanceUID = instances[i]["00080018"]["Value"][0];
|
|
92
|
-
const retrieveInstanceOptions = {
|
|
93
|
-
studyInstanceUID,
|
|
94
|
-
seriesInstanceUID,
|
|
95
|
-
sopInstanceUID,
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const promise = client.retrieveInstanceMetadata(retrieveInstanceOptions).then(metadata => {
|
|
99
|
-
const image = DICOMMicroscopyViewer.metadata.formatMetadata(metadata[0]);
|
|
100
|
-
if (image.ImageType[2] === "VOLUME") {
|
|
101
|
-
return(metadata[0]);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
promises.push(promise);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return(Promise.all(promises));
|
|
108
|
-
}).then(metadata => {
|
|
109
|
-
|
|
110
|
-
// Example of custom initialization of the channel visualization parameters (this is optional)
|
|
111
|
-
const BIOne = new DICOMMicroscopyViewer.metadata.BlendingInformation({
|
|
112
|
-
opticalPathIdentifier: `35`,
|
|
113
|
-
color: [0.,0.5,0.5],
|
|
114
|
-
opacity: 1.0,
|
|
115
|
-
thresholdValues: [125., 255.],
|
|
116
|
-
limitValues:[0, 255.],
|
|
117
|
-
visible: true,
|
|
118
|
-
});
|
|
119
|
-
const BITwo = new DICOMMicroscopyViewer.metadata.BlendingInformation({
|
|
120
|
-
opticalPathIdentifier: `1`,
|
|
121
|
-
color: [0.5, 0.5, 0.],
|
|
122
|
-
opacity: 1.0,
|
|
123
|
-
thresholdValues: [0., 255.],
|
|
124
|
-
limitValues:[0, 255.],
|
|
125
|
-
visible: true,
|
|
126
|
-
});
|
|
127
|
-
const BIThree = new DICOMMicroscopyViewer.metadata.BlendingInformation({
|
|
128
|
-
opticalPathIdentifier: `15`,
|
|
129
|
-
color: [1, 0., 0.],
|
|
130
|
-
opacity: 1.0,
|
|
131
|
-
thresholdValues: [30., 255.],
|
|
132
|
-
limitValues:[0, 255.],
|
|
133
|
-
visible: true,
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
const viewer = new DICOMMicroscopyViewer.api.VLWholeSlideMicroscopyImageViewer({
|
|
137
|
-
client,
|
|
138
|
-
metadata,
|
|
139
|
-
blendingInformation: [BIOne, BITwo, BIThree],
|
|
140
|
-
controls: ['fullscreen', 'overview', 'zoom']
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
const container = document.getElementById("dicomImage");
|
|
144
|
-
viewer.render({ container });
|
|
145
|
-
window.viewer = viewer;
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
</script>
|
|
149
|
-
<div class="container">
|
|
150
|
-
<div class="page-header">
|
|
151
|
-
<h1>
|
|
152
|
-
DICOM Microscopy Viewer Example
|
|
153
|
-
</h1>
|
|
154
|
-
<p>
|
|
155
|
-
This is a simple example blending 3 channels (DAPI 1, KERATIN and ASMA) of a Microscopy image. <br />
|
|
156
|
-
Data credit : Rashid et al. Sci Data Manuscript 2019 (DOI: <a href="https://doi.org/10.7303/syn17865732"> https://doi.org/10.7303/syn17865732</a>).
|
|
157
|
-
</p>
|
|
158
|
-
<a href="../">Go back to the Examples page</a>
|
|
159
|
-
</div>
|
|
160
|
-
<div id="root" style="height:10px; width:10px"></div>
|
|
161
|
-
</div>
|
|
162
|
-
|
|
163
|
-
<div class="bs-example" data-example-id="simple-thumbnails">
|
|
164
|
-
<div class="row">
|
|
165
|
-
<div class="col-xs-3 col-md-4">
|
|
166
|
-
<div class="alert alert-warning text-center" role="alert">Toggle KERATIN Channel</div>
|
|
167
|
-
<input type="checkbox" checked id="toggleChannel" style="margin:auto; width:100%; height:40px"/>
|
|
168
|
-
</div>
|
|
169
|
-
<div class="col-xs-3 col-md-4" >
|
|
170
|
-
<div class="alert alert-warning text-center" role="alert">Select Color</div>
|
|
171
|
-
<input type="color" id="colorpicker" value="#ff0000" style="margin:auto; width:100%; height:40px">
|
|
172
|
-
<br/>
|
|
173
|
-
</div>
|
|
174
|
-
<div class="col-xs-3 col-md-4" >
|
|
175
|
-
<div class="alert alert-warning text-center" role="alert">Clip Min Values</div>
|
|
176
|
-
<input type="range" min="0" max="256" value="30" class="slider" id="minRange" style="margin:auto; width:100%; height:40px">
|
|
177
|
-
<br/>
|
|
178
|
-
</div>
|
|
179
|
-
|
|
180
|
-
<div class="col-xs-12 col-md-12">
|
|
181
|
-
<div
|
|
182
|
-
style="width:100%;height:200px;position:relative;display:inline-block;"
|
|
183
|
-
oncontextmenu="return false"
|
|
184
|
-
class="cornerstone-enabled-image"
|
|
185
|
-
unselectable="on"
|
|
186
|
-
onselectstart="return false;"
|
|
187
|
-
onmousedown="return false;"
|
|
188
|
-
>
|
|
189
|
-
<div
|
|
190
|
-
id="dicomImage"
|
|
191
|
-
style="width:100%;height:850px;top:0px;left:0px; position:absolute; border: 1px solid black;"
|
|
192
|
-
></div>
|
|
193
|
-
|
|
194
|
-
</div>
|
|
195
|
-
</div>
|
|
196
|
-
</div>
|
|
197
|
-
</div>
|
|
198
|
-
</div>
|
|
199
|
-
<style>
|
|
200
|
-
.scrollable {
|
|
201
|
-
height: 600px;
|
|
202
|
-
overflow-y: scroll;
|
|
203
|
-
}
|
|
204
|
-
#rois li {
|
|
205
|
-
list-style-type: none;
|
|
206
|
-
}
|
|
207
|
-
</style>
|
|
208
|
-
</body>
|
|
209
|
-
</html>
|