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
|
File without changes
|
|
File without changes
|
|
@@ -1089,13 +1089,13 @@
|
|
|
1089
1089
|
</div>
|
|
1090
1090
|
|
|
1091
1091
|
<nav>
|
|
1092
|
-
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="
|
|
1092
|
+
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="color.html">color</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="color.PaletteColorLookupTable.html">PaletteColorLookupTable</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="mapping.Transformation.html">Transformation</a></li><li><a href="metadata.Comprehensive3DSR.html">Comprehensive3DSR</a></li><li><a href="metadata.MicroscopyBulkSimpleAnnotations.html">MicroscopyBulkSimpleAnnotations</a></li><li><a href="metadata.ParametricMap.html">ParametricMap</a></li><li><a href="metadata.Segmentation.html">Segmentation</a></li><li><a href="metadata.VLWholeSlideMicroscopyImage.html">VLWholeSlideMicroscopyImage</a></li><li><a href="opticalPath.OpticalPath.html">OpticalPath</a></li><li><a href="roi.ROI.html">ROI</a></li><li><a href="scoord3d.Ellipse.html">Ellipse</a></li><li><a href="scoord3d.Ellipsoid.html">Ellipsoid</a></li><li><a href="scoord3d.Multipoint.html">Multipoint</a></li><li><a href="scoord3d.Point.html">Point</a></li><li><a href="scoord3d.Polygon.html">Polygon</a></li><li><a href="scoord3d.Polyline.html">Polyline</a></li><li><a href="segment.Segment.html">Segment</a></li><li><a href="viewer.LabelImageViewer.html">LabelImageViewer</a></li><li><a href="viewer.OverviewImageViewer.html">OverviewImageViewer</a></li><li><a href="viewer.VolumeImageViewer.html">VolumeImageViewer</a></li></ul>
|
|
1093
1093
|
</nav>
|
|
1094
1094
|
|
|
1095
1095
|
<br class="clear">
|
|
1096
1096
|
|
|
1097
1097
|
<footer>
|
|
1098
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
1098
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Mar 11 2022 17:11:29 GMT-0500 (Eastern Standard Time)
|
|
1099
1099
|
</footer>
|
|
1100
1100
|
|
|
1101
1101
|
<script> prettyPrint(); </script>
|
package/docs/annotation.html
CHANGED
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
<div class="container-overview">
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
<div class="description">Namespace for annotations
|
|
40
|
+
<div class="description">Namespace for annotations of DICOM Micrsocopy Bulk Simple Annotations
|
|
41
|
+
instances.</div>
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
|
|
@@ -124,13 +125,13 @@
|
|
|
124
125
|
</div>
|
|
125
126
|
|
|
126
127
|
<nav>
|
|
127
|
-
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="
|
|
128
|
+
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="color.html">color</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="color.PaletteColorLookupTable.html">PaletteColorLookupTable</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="mapping.Transformation.html">Transformation</a></li><li><a href="metadata.Comprehensive3DSR.html">Comprehensive3DSR</a></li><li><a href="metadata.MicroscopyBulkSimpleAnnotations.html">MicroscopyBulkSimpleAnnotations</a></li><li><a href="metadata.ParametricMap.html">ParametricMap</a></li><li><a href="metadata.Segmentation.html">Segmentation</a></li><li><a href="metadata.VLWholeSlideMicroscopyImage.html">VLWholeSlideMicroscopyImage</a></li><li><a href="opticalPath.OpticalPath.html">OpticalPath</a></li><li><a href="roi.ROI.html">ROI</a></li><li><a href="scoord3d.Ellipse.html">Ellipse</a></li><li><a href="scoord3d.Ellipsoid.html">Ellipsoid</a></li><li><a href="scoord3d.Multipoint.html">Multipoint</a></li><li><a href="scoord3d.Point.html">Point</a></li><li><a href="scoord3d.Polygon.html">Polygon</a></li><li><a href="scoord3d.Polyline.html">Polyline</a></li><li><a href="segment.Segment.html">Segment</a></li><li><a href="viewer.LabelImageViewer.html">LabelImageViewer</a></li><li><a href="viewer.OverviewImageViewer.html">OverviewImageViewer</a></li><li><a href="viewer.VolumeImageViewer.html">VolumeImageViewer</a></li></ul>
|
|
128
129
|
</nav>
|
|
129
130
|
|
|
130
131
|
<br class="clear">
|
|
131
132
|
|
|
132
133
|
<footer>
|
|
133
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
134
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Mar 11 2022 17:11:29 GMT-0500 (Eastern Standard Time)
|
|
134
135
|
</footer>
|
|
135
136
|
|
|
136
137
|
<script> prettyPrint(); </script>
|
package/docs/annotation.js.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<section>
|
|
28
28
|
<article>
|
|
29
29
|
<pre class="prettyprint source linenums"><code>import {
|
|
30
|
-
|
|
30
|
+
_fetchBulkdata,
|
|
31
31
|
getContentItemNameCodedConcept
|
|
32
32
|
} from './utils.js'
|
|
33
33
|
|
|
@@ -229,12 +229,12 @@ async function _fetchGraphicData ({
|
|
|
229
229
|
)
|
|
230
230
|
} else {
|
|
231
231
|
if ('PointCoordinatesData' in bulkdataItem) {
|
|
232
|
-
return await
|
|
232
|
+
return await _fetchBulkdata({
|
|
233
233
|
client,
|
|
234
234
|
reference: bulkdataItem.PointCoordinatesData
|
|
235
235
|
})
|
|
236
236
|
} else if ('DoublePointCoordinatesData' in bulkdataItem) {
|
|
237
|
-
return await
|
|
237
|
+
return await _fetchBulkdata({
|
|
238
238
|
client,
|
|
239
239
|
reference: bulkdataItem.DoublePointCoordinatesData
|
|
240
240
|
})
|
|
@@ -281,7 +281,7 @@ async function _fetchGraphicIndex ({
|
|
|
281
281
|
}
|
|
282
282
|
} else {
|
|
283
283
|
if ('LongPrimitivePointIndexList' in bulkdataItem) {
|
|
284
|
-
return await
|
|
284
|
+
return await _fetchBulkdata({
|
|
285
285
|
client,
|
|
286
286
|
reference: bulkdataItem.LongPrimitivePointIndexList
|
|
287
287
|
})
|
|
@@ -339,7 +339,7 @@ async function _fetchMeasurementValues ({
|
|
|
339
339
|
measurementBulkdataItem.MeasurementValuesSequence[0]
|
|
340
340
|
)
|
|
341
341
|
if ('FloatingPointValues' in valuesBulkdataItem) {
|
|
342
|
-
return await
|
|
342
|
+
return await _fetchBulkdata({
|
|
343
343
|
client,
|
|
344
344
|
reference: valuesBulkdataItem.FloatingPointValues
|
|
345
345
|
})
|
|
@@ -395,7 +395,7 @@ async function _fetchMeasurementIndices ({
|
|
|
395
395
|
.MeasurementValuesSequence[0]
|
|
396
396
|
)
|
|
397
397
|
if ('AnnotationIndexList' in valuesBulkdataItem) {
|
|
398
|
-
return await
|
|
398
|
+
return await _fetchBulkdata({
|
|
399
399
|
client,
|
|
400
400
|
reference: valuesBulkdataItem.AnnotationIndexList
|
|
401
401
|
})
|
|
@@ -753,13 +753,13 @@ export {
|
|
|
753
753
|
</div>
|
|
754
754
|
|
|
755
755
|
<nav>
|
|
756
|
-
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="
|
|
756
|
+
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="color.html">color</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="color.PaletteColorLookupTable.html">PaletteColorLookupTable</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="mapping.Transformation.html">Transformation</a></li><li><a href="metadata.Comprehensive3DSR.html">Comprehensive3DSR</a></li><li><a href="metadata.MicroscopyBulkSimpleAnnotations.html">MicroscopyBulkSimpleAnnotations</a></li><li><a href="metadata.ParametricMap.html">ParametricMap</a></li><li><a href="metadata.Segmentation.html">Segmentation</a></li><li><a href="metadata.VLWholeSlideMicroscopyImage.html">VLWholeSlideMicroscopyImage</a></li><li><a href="opticalPath.OpticalPath.html">OpticalPath</a></li><li><a href="roi.ROI.html">ROI</a></li><li><a href="scoord3d.Ellipse.html">Ellipse</a></li><li><a href="scoord3d.Ellipsoid.html">Ellipsoid</a></li><li><a href="scoord3d.Multipoint.html">Multipoint</a></li><li><a href="scoord3d.Point.html">Point</a></li><li><a href="scoord3d.Polygon.html">Polygon</a></li><li><a href="scoord3d.Polyline.html">Polyline</a></li><li><a href="segment.Segment.html">Segment</a></li><li><a href="viewer.LabelImageViewer.html">LabelImageViewer</a></li><li><a href="viewer.OverviewImageViewer.html">OverviewImageViewer</a></li><li><a href="viewer.VolumeImageViewer.html">VolumeImageViewer</a></li></ul>
|
|
757
757
|
</nav>
|
|
758
758
|
|
|
759
759
|
<br class="clear">
|
|
760
760
|
|
|
761
761
|
<footer>
|
|
762
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
762
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Mar 11 2022 17:11:29 GMT-0500 (Eastern Standard Time)
|
|
763
763
|
</footer>
|
|
764
764
|
|
|
765
765
|
<script> prettyPrint(); </script>
|
|
@@ -34,14 +34,14 @@ import _MarkupManager from './markups/_MarkupManager'
|
|
|
34
34
|
import Enums from '../enums'
|
|
35
35
|
|
|
36
36
|
/** Markers */
|
|
37
|
-
import ArrowMarker, {
|
|
37
|
+
import ArrowMarker, { _format as arrowFormat } from './markers/arrow'
|
|
38
38
|
|
|
39
39
|
/** Markups */
|
|
40
40
|
import MeasurementMarkup, {
|
|
41
|
-
|
|
41
|
+
_format as measurementFormat
|
|
42
42
|
} from './markups/measurement'
|
|
43
43
|
import TextEvaluationMarkup, {
|
|
44
|
-
|
|
44
|
+
_format as textFormat
|
|
45
45
|
} from './markups/textEvaluation'
|
|
46
46
|
|
|
47
47
|
/** Utils */
|
|
@@ -222,13 +222,13 @@ export default _AnnotationManager
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<nav>
|
|
225
|
-
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="
|
|
225
|
+
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="color.html">color</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="color.PaletteColorLookupTable.html">PaletteColorLookupTable</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="mapping.Transformation.html">Transformation</a></li><li><a href="metadata.Comprehensive3DSR.html">Comprehensive3DSR</a></li><li><a href="metadata.MicroscopyBulkSimpleAnnotations.html">MicroscopyBulkSimpleAnnotations</a></li><li><a href="metadata.ParametricMap.html">ParametricMap</a></li><li><a href="metadata.Segmentation.html">Segmentation</a></li><li><a href="metadata.VLWholeSlideMicroscopyImage.html">VLWholeSlideMicroscopyImage</a></li><li><a href="opticalPath.OpticalPath.html">OpticalPath</a></li><li><a href="roi.ROI.html">ROI</a></li><li><a href="scoord3d.Ellipse.html">Ellipse</a></li><li><a href="scoord3d.Ellipsoid.html">Ellipsoid</a></li><li><a href="scoord3d.Multipoint.html">Multipoint</a></li><li><a href="scoord3d.Point.html">Point</a></li><li><a href="scoord3d.Polygon.html">Polygon</a></li><li><a href="scoord3d.Polyline.html">Polyline</a></li><li><a href="segment.Segment.html">Segment</a></li><li><a href="viewer.LabelImageViewer.html">LabelImageViewer</a></li><li><a href="viewer.OverviewImageViewer.html">OverviewImageViewer</a></li><li><a href="viewer.VolumeImageViewer.html">VolumeImageViewer</a></li></ul>
|
|
226
226
|
</nav>
|
|
227
227
|
|
|
228
228
|
<br class="clear">
|
|
229
229
|
|
|
230
230
|
<footer>
|
|
231
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
231
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Mar 11 2022 17:11:29 GMT-0500 (Eastern Standard Time)
|
|
232
232
|
</footer>
|
|
233
233
|
|
|
234
234
|
<script> prettyPrint(); </script>
|
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
|
|
27
27
|
<section>
|
|
28
28
|
<article>
|
|
29
|
-
<pre class="prettyprint source linenums"><code>import
|
|
29
|
+
<pre class="prettyprint source linenums"><code>import Circle from 'ol/geom/Circle'
|
|
30
|
+
import DragPan from 'ol/interaction/DragPan'
|
|
31
|
+
import LineString from 'ol/geom/LineString'
|
|
30
32
|
import Overlay from 'ol/Overlay'
|
|
31
33
|
import VectorLayer from 'ol/layer/Vector'
|
|
32
34
|
import 'ol/ol.css'
|
|
@@ -35,13 +37,56 @@ import Style from 'ol/style/Style'
|
|
|
35
37
|
import Stroke from 'ol/style/Stroke'
|
|
36
38
|
import Collection from 'ol/Collection'
|
|
37
39
|
import Feature from 'ol/Feature'
|
|
40
|
+
import { fromCircle } from 'ol/geom/Polygon'
|
|
38
41
|
|
|
39
42
|
import Enums from '../../enums'
|
|
40
|
-
import {
|
|
41
|
-
import { getUnitSuffix } from '../../utils'
|
|
43
|
+
import { _getUnitSuffix } from '../../utils'
|
|
42
44
|
import { coordinateWithOffset } from '../../scoord3dUtils'
|
|
43
45
|
import defaultStyles from '../styles'
|
|
44
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Build a new LineString instance with the shortest
|
|
49
|
+
* distance between a given overlay and a feature.
|
|
50
|
+
*
|
|
51
|
+
* @param {object} feature The feature
|
|
52
|
+
* @param {object} overlay The overlay instance
|
|
53
|
+
*
|
|
54
|
+
* @returns {LineString} The smallest line between the overlay and feature
|
|
55
|
+
*
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
const _getShortestLineBetweenOverlayAndFeature = (feature, overlay) => {
|
|
59
|
+
let result
|
|
60
|
+
let distanceSq = Infinity
|
|
61
|
+
|
|
62
|
+
let featureGeometry = feature.getGeometry()
|
|
63
|
+
|
|
64
|
+
if (featureGeometry instanceof Circle) {
|
|
65
|
+
featureGeometry = fromCircle(featureGeometry).clone()
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const geometry = featureGeometry.getLinearRing ? featureGeometry.getLinearRing(0) : featureGeometry;
|
|
69
|
+
|
|
70
|
+
(geometry.getCoordinates() || geometry.getExtent()).forEach(coordinates => {
|
|
71
|
+
const closest = overlay.getPosition()
|
|
72
|
+
const distanceNew = Math.pow(closest[0] - coordinates[0], 2) + Math.pow(closest[1] - coordinates[1], 2)
|
|
73
|
+
if (distanceNew < distanceSq) {
|
|
74
|
+
distanceSq = distanceNew
|
|
75
|
+
result = [coordinates, closest]
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
const coordinates = overlay.getPosition()
|
|
80
|
+
const closest = geometry.getClosestPoint(coordinates)
|
|
81
|
+
const distanceNew = Math.pow(closest[0] - coordinates[0], 2) + Math.pow(closest[1] - coordinates[1], 2)
|
|
82
|
+
if (distanceNew < distanceSq) {
|
|
83
|
+
distanceSq = distanceNew
|
|
84
|
+
result = [closest, coordinates]
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return new LineString(result)
|
|
88
|
+
}
|
|
89
|
+
|
|
45
90
|
class _MarkupManager {
|
|
46
91
|
constructor ({ map, pyramid, drawingSource, formatters, onClick, onStyle } = {}) {
|
|
47
92
|
this._map = map
|
|
@@ -232,7 +277,7 @@ class _MarkupManager {
|
|
|
232
277
|
(event) => {
|
|
233
278
|
if (this.has(id)) {
|
|
234
279
|
const view = this._map.getView()
|
|
235
|
-
const unitSuffix =
|
|
280
|
+
const unitSuffix = _getUnitSuffix(view)
|
|
236
281
|
const format = this._getFormatter(event.target)
|
|
237
282
|
const output = format(event.target, unitSuffix, this._pyramid)
|
|
238
283
|
this.update({
|
|
@@ -462,7 +507,7 @@ class _MarkupManager {
|
|
|
462
507
|
return
|
|
463
508
|
}
|
|
464
509
|
|
|
465
|
-
const line =
|
|
510
|
+
const line = _getShortestLineBetweenOverlayAndFeature(
|
|
466
511
|
feature,
|
|
467
512
|
markup.overlay
|
|
468
513
|
)
|
|
@@ -502,13 +547,13 @@ export default _MarkupManager
|
|
|
502
547
|
</div>
|
|
503
548
|
|
|
504
549
|
<nav>
|
|
505
|
-
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="
|
|
550
|
+
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="color.html">color</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="color.PaletteColorLookupTable.html">PaletteColorLookupTable</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="mapping.Transformation.html">Transformation</a></li><li><a href="metadata.Comprehensive3DSR.html">Comprehensive3DSR</a></li><li><a href="metadata.MicroscopyBulkSimpleAnnotations.html">MicroscopyBulkSimpleAnnotations</a></li><li><a href="metadata.ParametricMap.html">ParametricMap</a></li><li><a href="metadata.Segmentation.html">Segmentation</a></li><li><a href="metadata.VLWholeSlideMicroscopyImage.html">VLWholeSlideMicroscopyImage</a></li><li><a href="opticalPath.OpticalPath.html">OpticalPath</a></li><li><a href="roi.ROI.html">ROI</a></li><li><a href="scoord3d.Ellipse.html">Ellipse</a></li><li><a href="scoord3d.Ellipsoid.html">Ellipsoid</a></li><li><a href="scoord3d.Multipoint.html">Multipoint</a></li><li><a href="scoord3d.Point.html">Point</a></li><li><a href="scoord3d.Polygon.html">Polygon</a></li><li><a href="scoord3d.Polyline.html">Polyline</a></li><li><a href="segment.Segment.html">Segment</a></li><li><a href="viewer.LabelImageViewer.html">LabelImageViewer</a></li><li><a href="viewer.OverviewImageViewer.html">OverviewImageViewer</a></li><li><a href="viewer.VolumeImageViewer.html">VolumeImageViewer</a></li></ul>
|
|
506
551
|
</nav>
|
|
507
552
|
|
|
508
553
|
<br class="clear">
|
|
509
554
|
|
|
510
555
|
<footer>
|
|
511
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
556
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Mar 11 2022 17:11:29 GMT-0500 (Eastern Standard Time)
|
|
512
557
|
</footer>
|
|
513
558
|
|
|
514
559
|
<script> prettyPrint(); </script>
|
package/docs/api.html
CHANGED
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
|
|
75
75
|
<dt class="tag-source">Source:</dt>
|
|
76
76
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
77
|
-
<a href="dicom-microscopy-viewer.js.html">dicom-microscopy-viewer.js</a>, <a href="dicom-microscopy-viewer.js.html#
|
|
77
|
+
<a href="dicom-microscopy-viewer.js.html">dicom-microscopy-viewer.js</a>, <a href="dicom-microscopy-viewer.js.html#line60">line 60</a>
|
|
78
78
|
</li></ul></dd>
|
|
79
79
|
|
|
80
80
|
|
|
@@ -119,13 +119,13 @@
|
|
|
119
119
|
</div>
|
|
120
120
|
|
|
121
121
|
<nav>
|
|
122
|
-
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="
|
|
122
|
+
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="color.html">color</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="color.PaletteColorLookupTable.html">PaletteColorLookupTable</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="mapping.Transformation.html">Transformation</a></li><li><a href="metadata.Comprehensive3DSR.html">Comprehensive3DSR</a></li><li><a href="metadata.MicroscopyBulkSimpleAnnotations.html">MicroscopyBulkSimpleAnnotations</a></li><li><a href="metadata.ParametricMap.html">ParametricMap</a></li><li><a href="metadata.Segmentation.html">Segmentation</a></li><li><a href="metadata.VLWholeSlideMicroscopyImage.html">VLWholeSlideMicroscopyImage</a></li><li><a href="opticalPath.OpticalPath.html">OpticalPath</a></li><li><a href="roi.ROI.html">ROI</a></li><li><a href="scoord3d.Ellipse.html">Ellipse</a></li><li><a href="scoord3d.Ellipsoid.html">Ellipsoid</a></li><li><a href="scoord3d.Multipoint.html">Multipoint</a></li><li><a href="scoord3d.Point.html">Point</a></li><li><a href="scoord3d.Polygon.html">Polygon</a></li><li><a href="scoord3d.Polyline.html">Polyline</a></li><li><a href="segment.Segment.html">Segment</a></li><li><a href="viewer.LabelImageViewer.html">LabelImageViewer</a></li><li><a href="viewer.OverviewImageViewer.html">OverviewImageViewer</a></li><li><a href="viewer.VolumeImageViewer.html">VolumeImageViewer</a></li></ul>
|
|
123
123
|
</nav>
|
|
124
124
|
|
|
125
125
|
<br class="clear">
|
|
126
126
|
|
|
127
127
|
<footer>
|
|
128
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
128
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri Mar 11 2022 17:11:29 GMT-0500 (Eastern Standard Time)
|
|
129
129
|
</footer>
|
|
130
130
|
|
|
131
131
|
<script> prettyPrint(); </script>
|