@cornerstonejs/tools 1.40.0 → 1.40.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 (24) hide show
  1. package/dist/cjs/stateManagement/segmentation/addSegmentationRepresentation.js +1 -2
  2. package/dist/cjs/stateManagement/segmentation/addSegmentationRepresentation.js.map +1 -1
  3. package/dist/cjs/tools/annotation/LivewireContourTool.js +5 -5
  4. package/dist/cjs/tools/annotation/LivewireContourTool.js.map +1 -1
  5. package/dist/cjs/tools/annotation/SplineROITool.js.map +1 -1
  6. package/dist/cjs/tools/segmentation/strategies/utils/stackVolumeCheck.js +1 -1
  7. package/dist/cjs/tools/segmentation/strategies/utils/stackVolumeCheck.js.map +1 -1
  8. package/dist/esm/stateManagement/segmentation/addSegmentationRepresentation.js +1 -2
  9. package/dist/esm/stateManagement/segmentation/addSegmentationRepresentation.js.map +1 -1
  10. package/dist/esm/tools/annotation/LivewireContourTool.js +2 -2
  11. package/dist/esm/tools/annotation/LivewireContourTool.js.map +1 -1
  12. package/dist/esm/tools/annotation/SplineROITool.js.map +1 -1
  13. package/dist/esm/tools/segmentation/strategies/utils/stackVolumeCheck.js +1 -1
  14. package/dist/esm/tools/segmentation/strategies/utils/stackVolumeCheck.js.map +1 -1
  15. package/dist/types/stateManagement/segmentation/addSegmentationRepresentation.d.ts.map +1 -1
  16. package/dist/types/tools/annotation/LivewireContourTool.d.ts.map +1 -1
  17. package/dist/types/tools/annotation/SplineROITool.d.ts.map +1 -1
  18. package/dist/umd/index.js +1 -1
  19. package/dist/umd/index.js.map +1 -1
  20. package/package.json +3 -3
  21. package/src/stateManagement/segmentation/addSegmentationRepresentation.ts +1 -2
  22. package/src/tools/annotation/LivewireContourTool.ts +3 -7
  23. package/src/tools/annotation/SplineROITool.ts +0 -2
  24. package/src/tools/segmentation/strategies/utils/stackVolumeCheck.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "1.40.0",
3
+ "version": "1.40.1",
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.40.0",
32
+ "@cornerstonejs/core": "^1.40.1",
33
33
  "comlink": "^4.4.1",
34
34
  "lodash.clonedeep": "4.5.0",
35
35
  "lodash.get": "^4.4.2"
@@ -53,5 +53,5 @@
53
53
  "type": "individual",
54
54
  "url": "https://ohif.org/donate"
55
55
  },
56
- "gitHead": "28ed3eaf75ccd5cab7c7c0df0f4b09950cc42d7c"
56
+ "gitHead": "499c0dc5d782bfb2d9d930ebb815aba72010c261"
57
57
  }
@@ -5,7 +5,6 @@ import {
5
5
  RepresentationPublicInput,
6
6
  ToolGroupSpecificRepresentation,
7
7
  } from '../../types/SegmentationStateTypes';
8
- import Representations from '../../enums/SegmentationRepresentations';
9
8
  import * as SegmentationConfig from './config/segmentationConfig';
10
9
  import {
11
10
  addSegmentationRepresentation as addSegmentationRepresentationToState,
@@ -44,7 +43,7 @@ async function addSegmentationRepresentation(
44
43
  const toolGroupSpecificRepresentation: ToolGroupSpecificRepresentation = {
45
44
  segmentationId,
46
45
  segmentationRepresentationUID,
47
- type: Representations.Labelmap,
46
+ type: representationInput.type,
48
47
  segmentsHidden,
49
48
  colorLUTIndex: colorLUTIndexToUse,
50
49
  active: true,
@@ -1,4 +1,4 @@
1
- import { glMatrix, mat4, vec3 } from 'gl-matrix';
1
+ import { vec3 } from 'gl-matrix';
2
2
  import { AnnotationTool } from '../base';
3
3
 
4
4
  import {
@@ -30,11 +30,7 @@ import {
30
30
  ToolProps,
31
31
  SVGDrawingHelper,
32
32
  } from '../../types';
33
- import {
34
- math,
35
- viewportFilters,
36
- triggerAnnotationRenderForViewportIds,
37
- } from '../../utilities';
33
+ import { math, triggerAnnotationRenderForViewportIds } from '../../utilities';
38
34
  import { LivewireContourAnnotation } from '../../types/ToolSpecificAnnotationTypes';
39
35
  import {
40
36
  AnnotationCompletedEventDetail,
@@ -44,8 +40,8 @@ import { StyleSpecifier } from '../../types/AnnotationStyle';
44
40
 
45
41
  import { LivewireScissors } from '../../utilities/livewire/LivewireScissors';
46
42
  import { LivewirePath } from '../../utilities/livewire/LiveWirePath';
43
+ import { getViewportIdsWithToolToRender } from '../../utilities/viewportFilters';
47
44
 
48
- const { getViewportIdsWithToolToRender } = viewportFilters;
49
45
  const CLICK_CLOSE_CURVE_SQR_DIST = 10 ** 2; // px
50
46
 
51
47
  class LivewireContourTool extends AnnotationTool {
@@ -52,8 +52,6 @@ import { CardinalSpline } from './splines/CardinalSpline';
52
52
  import { LinearSpline } from './splines/LinearSpline';
53
53
  import { CatmullRomSpline } from './splines/CatmullRomSpline';
54
54
  import { BSpline } from './splines/BSpline';
55
- import * as viewportFilters from '../../utilities/viewportFilters';
56
- import * as drawing from '../../utilities/drawing';
57
55
 
58
56
  const SPLINE_MIN_POINTS = 3;
59
57
  const SPLINE_CLICK_CLOSE_CURVE_DIST = 10;
@@ -26,7 +26,7 @@ function isVolumeSegmentation(
26
26
  | LabelmapToolOperationDataVolume
27
27
  | LabelmapSegmentationDataVolume {
28
28
  return (
29
- (operationData as LabelmapToolOperationDataVolume).volumeId !== undefined
29
+ (operationData as LabelmapToolOperationDataVolume)?.volumeId !== undefined
30
30
  );
31
31
  }
32
32