@cornerstonejs/tools 1.72.4 → 1.72.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "1.72.4",
3
+ "version": "1.72.5",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "main": "src/index.ts",
6
6
  "types": "dist/types/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "webpack:watch": "webpack --mode development --progress --watch --config ./.webpack/webpack.dev.js"
30
30
  },
31
31
  "dependencies": {
32
- "@cornerstonejs/core": "^1.72.4",
32
+ "@cornerstonejs/core": "^1.72.5",
33
33
  "@icr/polyseg-wasm": "0.4.0",
34
34
  "@types/offscreencanvas": "2019.7.3",
35
35
  "comlink": "^4.4.1",
@@ -59,5 +59,5 @@
59
59
  "type": "individual",
60
60
  "url": "https://ohif.org/donate"
61
61
  },
62
- "gitHead": "d3800a7ce82f7ba1c585d6dc1bc701fbbfc9d732"
62
+ "gitHead": "475e831d61c00535b40c108a8b940e5bdf3ae0f6"
63
63
  }
@@ -1,4 +1,5 @@
1
1
  import type { Annotation } from '../types';
2
+ import type { Types } from '@cornerstonejs/core';
2
3
  import getViewportsForAnnotation from './getViewportsForAnnotation';
3
4
 
4
5
  /**
@@ -10,7 +11,9 @@ import getViewportsForAnnotation from './getViewportsForAnnotation';
10
11
  * @param annotation - to find a viewport that it could display in
11
12
  * @returns The viewport to display in
12
13
  */
13
- export default function getViewportForAnnotation(annotation: Annotation) {
14
+ export default function getViewportForAnnotation(
15
+ annotation: Annotation
16
+ ): Types.IStackViewport | Types.IVolumeViewport | undefined {
14
17
  const viewports = getViewportsForAnnotation(annotation);
15
18
 
16
19
  return viewports.length ? viewports[0] : undefined;
@@ -1,4 +1,5 @@
1
1
  import { getEnabledElements, utilities as csUtils } from '@cornerstonejs/core';
2
+ import type { Types } from '@cornerstonejs/core';
2
3
  import type { Annotation } from '../types';
3
4
 
4
5
  const { isEqual } = csUtils;
@@ -12,7 +13,9 @@ const { isEqual } = csUtils;
12
13
  * @param annotation - Annotation to find the viewports that it could display in
13
14
  * @returns All viewports to display in
14
15
  */
15
- export default function getViewportsForAnnotation(annotation: Annotation) {
16
+ export default function getViewportsForAnnotation(
17
+ annotation: Annotation
18
+ ): (Types.IStackViewport | Types.IVolumeViewport)[] {
16
19
  const { metadata } = annotation;
17
20
 
18
21
  return getEnabledElements()