dicom-microscopy-viewer 0.36.0 → 0.36.1

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.
Files changed (90) hide show
  1. package/README.md +5 -0
  2. package/build/6b62efd6c7f30afd4c78.module.wasm +0 -0
  3. package/build/dicom-microscopy-viewer.js +1 -1
  4. package/build/dicom-microscopy-viewer.js.map +1 -1
  5. package/docs/annotation.AnnotationGroup.html +2 -2
  6. package/docs/annotation.html +4 -3
  7. package/docs/annotation.js.html +8 -8
  8. package/docs/annotations__AnnotationManager.js.html +5 -5
  9. package/docs/annotations_markups__MarkupManager.js.html +52 -7
  10. package/docs/api.html +3 -3
  11. package/docs/color.PaletteColorLookupTable.html +688 -0
  12. package/docs/color.html +671 -0
  13. package/docs/color.js.html +30 -5
  14. package/docs/dicom-microscopy-viewer.js.html +30 -13
  15. package/docs/events.html +3 -3
  16. package/docs/events.js.html +2 -2
  17. package/docs/index.html +23 -24
  18. package/docs/mapping.ParameterMapping.html +10 -10
  19. package/docs/mapping.Transformation.html +180 -0
  20. package/docs/mapping.html +7 -4
  21. package/docs/mapping.js.html +7 -3
  22. package/docs/metadata.Comprehensive3DSR.html +2 -2
  23. package/docs/metadata.MicroscopyBulkSimpleAnnotations.html +2 -2
  24. package/docs/metadata.ParametricMap.html +2 -2
  25. package/docs/metadata.Segmentation.html +2 -2
  26. package/docs/metadata.VLWholeSlideMicroscopyImage.html +2 -2
  27. package/docs/metadata.html +3 -3
  28. package/docs/metadata.js.html +2 -2
  29. package/docs/opticalPath.OpticalPath.html +2 -2
  30. package/docs/opticalPath.html +3 -3
  31. package/docs/opticalPath.js.html +2 -2
  32. package/docs/pyramid.js.html +6 -4
  33. package/docs/roi.ROI.html +2 -2
  34. package/docs/roi.html +4 -4
  35. package/docs/roi.js.html +4 -4
  36. package/docs/scoord3d.Ellipse.html +2 -2
  37. package/docs/scoord3d.Ellipsoid.html +2 -2
  38. package/docs/scoord3d.Multipoint.html +2 -2
  39. package/docs/scoord3d.Point.html +2 -2
  40. package/docs/scoord3d.Polygon.html +2 -2
  41. package/docs/scoord3d.Polyline.html +2 -2
  42. package/docs/scoord3d.html +3 -3
  43. package/docs/scoord3d.js.html +4 -4
  44. package/docs/segment.Segment.html +2 -2
  45. package/docs/segment.html +4 -4
  46. package/docs/segment.js.html +2 -2
  47. package/docs/utils.html +2812 -5
  48. package/docs/utils.js.html +77 -14
  49. package/docs/viewer.LabelImageViewer.html +3 -3
  50. package/docs/viewer.OverviewImageViewer.html +3 -3
  51. package/docs/viewer.VolumeImageViewer.html +87 -87
  52. package/docs/viewer.html +3 -3
  53. package/docs/viewer.js.html +45 -14
  54. package/package.json +3 -3
  55. package/src/annotation.js +6 -6
  56. package/src/annotations/_AnnotationManager.js +3 -3
  57. package/src/annotations/markers/arrow.js +11 -2
  58. package/src/annotations/markups/_MarkupManager.js +49 -4
  59. package/src/annotations/markups/measurement.js +14 -6
  60. package/src/annotations/markups/textEvaluation.js +23 -8
  61. package/src/color.js +28 -3
  62. package/src/dicom-microscopy-viewer.js +28 -11
  63. package/src/mapping.js +5 -1
  64. package/src/pyramid.js +4 -2
  65. package/src/roi.js +2 -2
  66. package/src/scoord3d.js +2 -2
  67. package/src/utils.js +75 -12
  68. package/src/viewer.js +37 -10
  69. package/docs/PaletteColorLookupTable.html +0 -364
  70. package/docs/Transformation.html +0 -179
  71. package/docs/annotations_markers_arrow.js.html +0 -224
  72. package/docs/annotations_markups_measurement.js.html +0 -136
  73. package/docs/annotations_markups_textEvaluation.js.html +0 -184
  74. package/docs/annotations_markups_utils_getShortestLineBetweenOverlayAndFeature.js.html +0 -96
  75. package/docs/global.html +0 -6062
  76. package/examples/basic/index.html +0 -77
  77. package/examples/blend/index.html +0 -209
  78. package/examples/events/index.html +0 -436
  79. package/examples/index.html +0 -32
  80. package/examples/js/FileSaver.min.js +0 -3
  81. package/examples/js/jquery.min.js +0 -4
  82. package/examples/js/jquery.min.map +0 -1
  83. package/examples/simple_viewer/index.html +0 -520
  84. package/examples/simple_viewer/scripts/dicomdict.js +0 -34030
  85. package/examples/simple_viewer/scripts/metadata.js +0 -79
  86. package/examples/simple_viewer/styles/main.css +0 -238
  87. package/examples/structured_report/index.html +0 -278
  88. package/examples/styles.js +0 -46
  89. package/src/annotations/markups/utils/getShortestLineBetweenOverlayAndFeature.js +0 -45
  90. package/src/annotations/markups/utils/index.js +0 -1
@@ -1,96 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>JSDoc: Source: annotations/markups/utils/getShortestLineBetweenOverlayAndFeature.js</title>
6
-
7
- <script src="scripts/prettify/prettify.js"> </script>
8
- <script src="scripts/prettify/lang-css.js"> </script>
9
- <!--[if lt IE 9]>
10
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
- <![endif]-->
12
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14
- </head>
15
-
16
- <body>
17
-
18
- <div id="main">
19
-
20
- <h1 class="page-title">Source: annotations/markups/utils/getShortestLineBetweenOverlayAndFeature.js</h1>
21
-
22
-
23
-
24
-
25
-
26
-
27
- <section>
28
- <article>
29
- <pre class="prettyprint source linenums"><code>import LineString from 'ol/geom/LineString'
30
- import Circle from 'ol/geom/Circle'
31
- import { fromCircle } from 'ol/geom/Polygon'
32
-
33
- /**
34
- * Builds a new LineString instance with the shortest
35
- * distance between a given overlay and a feature.
36
- *
37
- * @param {object} feature The feature
38
- * @param {object} overlay The overlay instance
39
- * @returns {LineString} The smallest line between the overlay and feature
40
- */
41
- const getShortestLineBetweenOverlayAndFeature = (feature, overlay) => {
42
- let result
43
- let distanceSq = Infinity
44
-
45
- let featureGeometry = feature.getGeometry()
46
-
47
- if (featureGeometry instanceof Circle) {
48
- featureGeometry = fromCircle(featureGeometry).clone()
49
- }
50
-
51
- const geometry = featureGeometry.getLinearRing ? featureGeometry.getLinearRing(0) : featureGeometry;
52
-
53
- (geometry.getCoordinates() || geometry.getExtent()).forEach(coordinates => {
54
- const closest = overlay.getPosition()
55
- const distanceNew = Math.pow(closest[0] - coordinates[0], 2) + Math.pow(closest[1] - coordinates[1], 2)
56
- if (distanceNew &lt; distanceSq) {
57
- distanceSq = distanceNew
58
- result = [coordinates, closest]
59
- }
60
- })
61
-
62
- const coordinates = overlay.getPosition()
63
- const closest = geometry.getClosestPoint(coordinates)
64
- const distanceNew = Math.pow(closest[0] - coordinates[0], 2) + Math.pow(closest[1] - coordinates[1], 2)
65
- if (distanceNew &lt; distanceSq) {
66
- distanceSq = distanceNew
67
- result = [closest, coordinates]
68
- }
69
-
70
- return new LineString(result)
71
- }
72
-
73
- export default getShortestLineBetweenOverlayAndFeature
74
- </code></pre>
75
- </article>
76
- </section>
77
-
78
-
79
-
80
-
81
- </div>
82
-
83
- <nav>
84
- <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="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="PaletteColorLookupTable.html">PaletteColorLookupTable</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="Transformation.html">Transformation</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><h3>Global</h3><ul><li><a href="global.html#_applyStyle">_applyStyle</a></li><li><a href="global.html#_applyStyles">_applyStyles</a></li><li><a href="global.html#_computeImagePyramid">_computeImagePyramid</a></li><li><a href="global.html#_hasMarker">_hasMarker</a></li><li><a href="global.html#_hasMarkup">_hasMarkup</a></li><li><a href="global.html#_isMeasurement">_isMeasurement</a></li><li><a href="global.html#_onInteractionEventHandler">_onInteractionEventHandler</a></li><li><a href="global.html#_setFeatureStyle">_setFeatureStyle</a></li><li><a href="global.html#applyInverseTransform">applyInverseTransform</a></li><li><a href="global.html#applyTransform">applyTransform</a></li><li><a href="global.html#are1DArraysAlmostEqual">are1DArraysAlmostEqual</a></li><li><a href="global.html#are2DArraysAlmostEqual">are2DArraysAlmostEqual</a></li><li><a href="global.html#areCodedConceptsEqual">areCodedConceptsEqual</a></li><li><a href="global.html#areNumbersAlmostEqual">areNumbersAlmostEqual</a></li><li><a href="global.html#ArrowMarker">ArrowMarker</a></li><li><a href="global.html#buildInverseTransform">buildInverseTransform</a></li><li><a href="global.html#buildPaletteColorLookupTable">buildPaletteColorLookupTable</a></li><li><a href="global.html#buildTransform">buildTransform</a></li><li><a href="global.html#computeRotation">computeRotation</a></li><li><a href="global.html#createColormap">createColormap</a></li><li><a href="global.html#createRotationMatrix">createRotationMatrix</a></li><li><a href="global.html#createWindow">createWindow</a></li><li><a href="global.html#doContentItemsMatch">doContentItemsMatch</a></li><li><a href="global.html#format">format</a></li><li><a href="global.html#getContentItemNameCodedConcept">getContentItemNameCodedConcept</a></li><li><a href="global.html#getShortestLineBetweenOverlayAndFeature">getShortestLineBetweenOverlayAndFeature</a></li><li><a href="global.html#getUnitSuffix">getUnitSuffix</a></li><li><a href="global.html#MeasurementMarkup">MeasurementMarkup</a></li><li><a href="global.html#rescale">rescale</a></li><li><a href="global.html#TextEvaluationMarkup">TextEvaluationMarkup</a></li></ul>
85
- </nav>
86
-
87
- <br class="clear">
88
-
89
- <footer>
90
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu Mar 10 2022 12:00:32 GMT-0500 (Eastern Standard Time)
91
- </footer>
92
-
93
- <script> prettyPrint(); </script>
94
- <script src="scripts/linenumber.js"> </script>
95
- </body>
96
- </html>