@cornerstonejs/tools 0.30.7 → 0.31.0

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 (101) hide show
  1. package/dist/cjs/index.d.ts +2 -2
  2. package/dist/cjs/index.js +2 -1
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/store/ToolGroupManager/ToolGroup.d.ts +4 -1
  5. package/dist/cjs/store/ToolGroupManager/ToolGroup.js +90 -29
  6. package/dist/cjs/store/ToolGroupManager/ToolGroup.js.map +1 -1
  7. package/dist/cjs/store/state.d.ts +4 -6
  8. package/dist/cjs/tools/base/BaseTool.d.ts +1 -1
  9. package/dist/cjs/tools/index.d.ts +2 -1
  10. package/dist/cjs/tools/index.js +3 -1
  11. package/dist/cjs/tools/index.js.map +1 -1
  12. package/dist/cjs/tools/segmentation/BrushTool.d.ts +9 -5
  13. package/dist/cjs/tools/segmentation/BrushTool.js +95 -115
  14. package/dist/cjs/tools/segmentation/BrushTool.js.map +1 -1
  15. package/dist/cjs/tools/segmentation/PaintFillTool.d.ts +12 -0
  16. package/dist/cjs/tools/segmentation/PaintFillTool.js +213 -0
  17. package/dist/cjs/tools/segmentation/PaintFillTool.js.map +1 -0
  18. package/dist/cjs/tools/segmentation/strategies/eraseCircle.d.ts +15 -0
  19. package/dist/cjs/tools/segmentation/strategies/eraseCircle.js +10 -0
  20. package/dist/cjs/tools/segmentation/strategies/eraseCircle.js.map +1 -0
  21. package/dist/cjs/tools/segmentation/strategies/eraseSphere.d.ts +13 -0
  22. package/dist/cjs/tools/segmentation/strategies/eraseSphere.js +12 -0
  23. package/dist/cjs/tools/segmentation/strategies/eraseSphere.js.map +1 -0
  24. package/dist/cjs/tools/segmentation/strategies/fillCircle.d.ts +3 -0
  25. package/dist/cjs/tools/segmentation/strategies/fillCircle.js +41 -12
  26. package/dist/cjs/tools/segmentation/strategies/fillCircle.js.map +1 -1
  27. package/dist/cjs/types/FloodFillTypes.d.ts +15 -0
  28. package/dist/cjs/types/FloodFillTypes.js +3 -0
  29. package/dist/cjs/types/FloodFillTypes.js.map +1 -0
  30. package/dist/cjs/types/IToolClassReference.d.ts +3 -0
  31. package/dist/cjs/types/IToolClassReference.js +3 -0
  32. package/dist/cjs/types/IToolClassReference.js.map +1 -0
  33. package/dist/cjs/types/IToolGroup.d.ts +3 -0
  34. package/dist/cjs/types/index.d.ts +3 -1
  35. package/dist/cjs/utilities/segmentation/brushSizeForToolGroup.d.ts +2 -0
  36. package/dist/cjs/utilities/segmentation/brushSizeForToolGroup.js +49 -0
  37. package/dist/cjs/utilities/segmentation/brushSizeForToolGroup.js.map +1 -0
  38. package/dist/cjs/utilities/segmentation/brushThresholdForToolGroup.d.ts +3 -0
  39. package/dist/cjs/utilities/segmentation/brushThresholdForToolGroup.js +49 -0
  40. package/dist/cjs/utilities/segmentation/brushThresholdForToolGroup.js.map +1 -0
  41. package/dist/cjs/utilities/segmentation/floodFill.d.ts +3 -0
  42. package/dist/cjs/utilities/segmentation/floodFill.js +131 -0
  43. package/dist/cjs/utilities/segmentation/floodFill.js.map +1 -0
  44. package/dist/cjs/utilities/segmentation/index.d.ts +4 -1
  45. package/dist/cjs/utilities/segmentation/index.js +9 -1
  46. package/dist/cjs/utilities/segmentation/index.js.map +1 -1
  47. package/dist/cjs/utilities/segmentation/utilities.d.ts +2 -0
  48. package/dist/cjs/utilities/segmentation/utilities.js +21 -0
  49. package/dist/cjs/utilities/segmentation/utilities.js.map +1 -0
  50. package/dist/esm/index.d.ts +2 -2
  51. package/dist/esm/index.js +2 -2
  52. package/dist/esm/index.js.map +1 -1
  53. package/dist/esm/store/ToolGroupManager/ToolGroup.d.ts +4 -1
  54. package/dist/esm/store/ToolGroupManager/ToolGroup.js +90 -29
  55. package/dist/esm/store/ToolGroupManager/ToolGroup.js.map +1 -1
  56. package/dist/esm/store/state.d.ts +4 -6
  57. package/dist/esm/tools/base/BaseTool.d.ts +1 -1
  58. package/dist/esm/tools/index.d.ts +2 -1
  59. package/dist/esm/tools/index.js +2 -1
  60. package/dist/esm/tools/index.js.map +1 -1
  61. package/dist/esm/tools/segmentation/BrushTool.d.ts +9 -5
  62. package/dist/esm/tools/segmentation/BrushTool.js +98 -119
  63. package/dist/esm/tools/segmentation/BrushTool.js.map +1 -1
  64. package/dist/esm/tools/segmentation/PaintFillTool.d.ts +12 -0
  65. package/dist/esm/tools/segmentation/PaintFillTool.js +210 -0
  66. package/dist/esm/tools/segmentation/PaintFillTool.js.map +1 -0
  67. package/dist/esm/tools/segmentation/strategies/eraseCircle.d.ts +15 -0
  68. package/dist/esm/tools/segmentation/strategies/eraseCircle.js +9 -0
  69. package/dist/esm/tools/segmentation/strategies/eraseCircle.js.map +1 -0
  70. package/dist/esm/tools/segmentation/strategies/eraseSphere.d.ts +13 -0
  71. package/dist/esm/tools/segmentation/strategies/eraseSphere.js +8 -0
  72. package/dist/esm/tools/segmentation/strategies/eraseSphere.js.map +1 -0
  73. package/dist/esm/tools/segmentation/strategies/fillCircle.d.ts +3 -0
  74. package/dist/esm/tools/segmentation/strategies/fillCircle.js +38 -10
  75. package/dist/esm/tools/segmentation/strategies/fillCircle.js.map +1 -1
  76. package/dist/esm/types/FloodFillTypes.d.ts +15 -0
  77. package/dist/esm/types/FloodFillTypes.js +2 -0
  78. package/dist/esm/types/FloodFillTypes.js.map +1 -0
  79. package/dist/esm/types/IToolClassReference.d.ts +3 -0
  80. package/dist/esm/types/IToolClassReference.js +2 -0
  81. package/dist/esm/types/IToolClassReference.js.map +1 -0
  82. package/dist/esm/types/IToolGroup.d.ts +3 -0
  83. package/dist/esm/types/index.d.ts +3 -1
  84. package/dist/esm/utilities/segmentation/brushSizeForToolGroup.d.ts +2 -0
  85. package/dist/esm/utilities/segmentation/brushSizeForToolGroup.js +41 -0
  86. package/dist/esm/utilities/segmentation/brushSizeForToolGroup.js.map +1 -0
  87. package/dist/esm/utilities/segmentation/brushThresholdForToolGroup.d.ts +3 -0
  88. package/dist/esm/utilities/segmentation/brushThresholdForToolGroup.js +41 -0
  89. package/dist/esm/utilities/segmentation/brushThresholdForToolGroup.js.map +1 -0
  90. package/dist/esm/utilities/segmentation/floodFill.d.ts +3 -0
  91. package/dist/esm/utilities/segmentation/floodFill.js +128 -0
  92. package/dist/esm/utilities/segmentation/floodFill.js.map +1 -0
  93. package/dist/esm/utilities/segmentation/index.d.ts +4 -1
  94. package/dist/esm/utilities/segmentation/index.js +4 -1
  95. package/dist/esm/utilities/segmentation/index.js.map +1 -1
  96. package/dist/esm/utilities/segmentation/utilities.d.ts +2 -0
  97. package/dist/esm/utilities/segmentation/utilities.js +15 -0
  98. package/dist/esm/utilities/segmentation/utilities.js.map +1 -0
  99. package/dist/umd/index.js +1 -1
  100. package/dist/umd/index.js.map +1 -1
  101. package/package.json +2 -2
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.eraseInsideCircle = void 0;
4
+ const fillCircle_1 = require("./fillCircle");
5
+ function eraseInsideCircle(enabledElement, operationData) {
6
+ const eraseOperationData = Object.assign(Object.assign({}, operationData), { segmentIndex: 0 });
7
+ (0, fillCircle_1.fillInsideCircle)(enabledElement, eraseOperationData);
8
+ }
9
+ exports.eraseInsideCircle = eraseInsideCircle;
10
+ //# sourceMappingURL=eraseCircle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eraseCircle.js","sourceRoot":"","sources":["../../../../../src/tools/segmentation/strategies/eraseCircle.ts"],"names":[],"mappings":";;;AAEA,6CAAgD;AAehD,SAAgB,iBAAiB,CAC/B,cAAqC,EACrC,aAA4B;IAI5B,MAAM,kBAAkB,mCACnB,aAAa,KAChB,YAAY,EAAE,CAAC,GAChB,CAAC;IAEF,IAAA,6BAAgB,EAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;AACvD,CAAC;AAZD,8CAYC"}
@@ -0,0 +1,13 @@
1
+ import type { Types } from '@cornerstonejs/core';
2
+ declare type OperationData = {
3
+ points: [Types.Point3, Types.Point3, Types.Point3, Types.Point3];
4
+ volume: Types.IImageVolume;
5
+ segmentIndex: number;
6
+ segmentationId: string;
7
+ segmentsLocked: number[];
8
+ viewPlaneNormal: Types.Point3;
9
+ viewUp: Types.Point3;
10
+ constraintFn: () => boolean;
11
+ };
12
+ export declare function eraseInsideSphere(enabledElement: Types.IEnabledElement, operationData: OperationData): void;
13
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.eraseInsideSphere = void 0;
4
+ const fillSphere_1 = require("./fillSphere");
5
+ function eraseInsideSphere(enabledElement, operationData) {
6
+ const eraseOperationData = Object.assign({}, operationData, {
7
+ segmentIndex: 0,
8
+ });
9
+ (0, fillSphere_1.fillInsideSphere)(enabledElement, eraseOperationData);
10
+ }
11
+ exports.eraseInsideSphere = eraseInsideSphere;
12
+ //# sourceMappingURL=eraseSphere.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eraseSphere.js","sourceRoot":"","sources":["../../../../../src/tools/segmentation/strategies/eraseSphere.ts"],"names":[],"mappings":";;;AAEA,6CAAgD;AAahD,SAAgB,iBAAiB,CAC/B,cAAqC,EACrC,aAA4B;IAI5B,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,EAAE;QAC1D,YAAY,EAAE,CAAC;KAChB,CAAC,CAAC;IAEH,IAAA,6BAAgB,EAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;AACvD,CAAC;AAXD,8CAWC"}
@@ -1,14 +1,17 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  declare type OperationData = {
3
3
  segmentationId: string;
4
+ imageVolume: Types.IImageVolume;
4
5
  points: any;
5
6
  volume: Types.IImageVolume;
6
7
  segmentIndex: number;
7
8
  segmentsLocked: number[];
8
9
  viewPlaneNormal: number[];
9
10
  viewUp: number[];
11
+ strategySpecificConfiguration: any;
10
12
  constraintFn: () => boolean;
11
13
  };
12
14
  export declare function fillInsideCircle(enabledElement: Types.IEnabledElement, operationData: OperationData): void;
15
+ export declare function thresholdInsideCircle(enabledElement: Types.IEnabledElement, operationData: OperationData): void;
13
16
  export declare function fillOutsideCircle(enabledElement: Types.IEnabledElement, operationData: OperationData): void;
14
17
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fillOutsideCircle = exports.fillInsideCircle = void 0;
3
+ exports.fillOutsideCircle = exports.thresholdInsideCircle = exports.fillInsideCircle = void 0;
4
4
  const gl_matrix_1 = require("gl-matrix");
5
5
  const core_1 = require("@cornerstonejs/core");
6
6
  const ellipse_1 = require("../../../utilities/math/ellipse");
@@ -8,8 +8,8 @@ const boundingBox_1 = require("../../../utilities/boundingBox");
8
8
  const triggerSegmentationEvents_1 = require("../../../stateManagement/segmentation/triggerSegmentationEvents");
9
9
  const utilities_1 = require("../../../utilities");
10
10
  const { transformWorldToIndex } = core_1.utilities;
11
- function fillCircle(enabledElement, operationData, inside = true) {
12
- const { volume: segmentationVolume, points, segmentsLocked, segmentIndex, segmentationId, } = operationData;
11
+ function fillCircle(enabledElement, operationData, threshold = false) {
12
+ const { volume: segmentationVolume, imageVolume, points, segmentsLocked, segmentIndex, segmentationId, strategySpecificConfiguration, } = operationData;
13
13
  const { imageData, dimensions, scalarData } = segmentationVolume;
14
14
  const { viewport } = enabledElement;
15
15
  const center = gl_matrix_1.vec3.fromValues(0, 0, 0);
@@ -36,23 +36,52 @@ function fillCircle(enabledElement, operationData, inside = true) {
36
36
  zRadius: Math.abs(topLeftWorld[2] - bottomRightWorld[2]) / 2,
37
37
  };
38
38
  const modifiedSlicesToUse = new Set();
39
- const callback = ({ value, index, pointIJK }) => {
40
- if (segmentsLocked.includes(value)) {
41
- return;
42
- }
43
- scalarData[index] = segmentIndex;
44
- modifiedSlicesToUse.add(pointIJK[2]);
45
- };
39
+ let callback;
40
+ if (threshold) {
41
+ callback = ({ value, index, pointIJK }) => {
42
+ if (segmentsLocked.includes(value)) {
43
+ return;
44
+ }
45
+ if (isWithinThreshold(index, imageVolume, strategySpecificConfiguration)) {
46
+ scalarData[index] = segmentIndex;
47
+ modifiedSlicesToUse.add(pointIJK[2]);
48
+ }
49
+ };
50
+ }
51
+ else {
52
+ callback = ({ value, index, pointIJK }) => {
53
+ if (segmentsLocked.includes(value)) {
54
+ return;
55
+ }
56
+ scalarData[index] = segmentIndex;
57
+ modifiedSlicesToUse.add(pointIJK[2]);
58
+ };
59
+ }
46
60
  (0, utilities_1.pointInShapeCallback)(imageData, (pointLPS, pointIJK) => (0, ellipse_1.pointInEllipse)(ellipseObj, pointLPS), callback, boundsIJK);
47
61
  const arrayOfSlices = Array.from(modifiedSlicesToUse);
48
62
  (0, triggerSegmentationEvents_1.triggerSegmentationDataModified)(segmentationId, arrayOfSlices);
49
63
  }
64
+ function isWithinThreshold(index, imageVolume, strategySpecificConfiguration) {
65
+ const { THRESHOLD_INSIDE_CIRCLE } = strategySpecificConfiguration;
66
+ const voxelValue = imageVolume.scalarData[index];
67
+ const { threshold } = THRESHOLD_INSIDE_CIRCLE;
68
+ return threshold[0] <= voxelValue && voxelValue <= threshold[1];
69
+ }
50
70
  function fillInsideCircle(enabledElement, operationData) {
51
- fillCircle(enabledElement, operationData, true);
71
+ fillCircle(enabledElement, operationData, false);
52
72
  }
53
73
  exports.fillInsideCircle = fillInsideCircle;
74
+ function thresholdInsideCircle(enabledElement, operationData) {
75
+ const { volume, imageVolume } = operationData;
76
+ if (!core_1.utilities.isEqual(volume.dimensions, imageVolume.dimensions) ||
77
+ !core_1.utilities.isEqual(volume.direction, imageVolume.direction)) {
78
+ throw new Error('Only source data the same dimensions/size/orientation as the segmentation currently supported.');
79
+ }
80
+ fillCircle(enabledElement, operationData, true);
81
+ }
82
+ exports.thresholdInsideCircle = thresholdInsideCircle;
54
83
  function fillOutsideCircle(enabledElement, operationData) {
55
- fillCircle(enabledElement, operationData, false);
84
+ throw new Error('Not yet implemented');
56
85
  }
57
86
  exports.fillOutsideCircle = fillOutsideCircle;
58
87
  //# sourceMappingURL=fillCircle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fillCircle.js","sourceRoot":"","sources":["../../../../../src/tools/segmentation/strategies/fillCircle.ts"],"names":[],"mappings":";;;AAAA,yCAAiC;AAEjC,8CAA2D;AAE3D,6DAGyC;AACzC,gEAA2E;AAC3E,+GAAkH;AAClH,kDAA0D;AAE1D,MAAM,EAAE,qBAAqB,EAAE,GAAG,gBAAO,CAAC;AAa1C,SAAS,UAAU,CACjB,cAAqC,EACrC,aAA4B,EAC5B,MAAM,GAAG,IAAI;IAEb,MAAM,EACJ,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EACN,cAAc,EACd,YAAY,EACZ,cAAc,GACf,GAAG,aAAa,CAAC;IAClB,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,kBAAkB,CAAC;IACjE,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;IAGpC,MAAM,MAAM,GAAG,gBAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACxC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACvB,gBAAI,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IACH,gBAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IAE9C,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IAIvE,MAAM,CAAC,aAAa,EAAE,iBAAiB,CAAC,GACtC,IAAA,iCAAuB,EAAC,iBAAiB,CAAC,CAAC;IAG7C,MAAM,YAAY,GAAG,QAAQ,C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B,EAAC,cAAc,EAAE,aAAa,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,iBAAiB,CACxB,KAAa,EACb,WAA+B,EAC/B,6BAAkC;IAElC,MAAM,EAAE,uBAAuB,EAAE,GAAG,6BAA6B,CAAC;IAElE,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACjD,MAAM,EAAE,SAAS,EAAE,GAAG,uBAAuB,CAAC;IAE9C,OAAO,SAAS,CAAC,CAAC,CAAC,IAAI,UAAU,IAAI,UAAU,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAQD,SAAgB,gBAAgB,CAC9B,cAAqC,EACrC,aAA4B;IAE5B,UAAU,CAAC,cAAc,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;AACnD,CAAC;AALD,4CAKC;AAQD,SAAgB,qBAAqB,CACnC,cAAqC,EACrC,aAA4B;IAE5B,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,aAAa,CAAC;IAE9C,IACE,CAAC,gBAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC;QAC3D,CAAC,gBAAO,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,SAAS,CAAC,EACzD;QACA,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAC;KACH;IAED,UAAU,CAAC,cAAc,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;AAClD,CAAC;AAhBD,sDAgBC;AAQD,SAAgB,iBAAiB,CAC/B,cAAqC,EACrC,aAA4B;IAE5B,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AALD,8CAKC"}
@@ -0,0 +1,15 @@
1
+ import { Types } from '@cornerstonejs/core';
2
+ declare type FloodFillResult = {
3
+ flooded: Types.Point2[] | Types.Point3[];
4
+ boundaries: Types.Point2[] | Types.Point3[];
5
+ };
6
+ declare type FloodFillGetter3D = (x: number, y: number, z: number) => number;
7
+ declare type FloodFillGetter2D = (x: number, y: number) => number;
8
+ declare type FloodFillGetter = FloodFillGetter2D | FloodFillGetter3D;
9
+ declare type FloodFillOptions = {
10
+ onFlood?: (x: any, y: any) => void;
11
+ onBoundary?: (x: any, y: any) => void;
12
+ equals?: (a: any, b: any) => boolean;
13
+ diagonals?: boolean;
14
+ };
15
+ export { FloodFillResult, FloodFillGetter, FloodFillOptions };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FloodFillTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloodFillTypes.js","sourceRoot":"","sources":["../../../src/types/FloodFillTypes.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { BaseTool } from '../tools';
2
+ declare type IToolClassReference = new <T extends BaseTool>(config: any) => T;
3
+ export default IToolClassReference;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IToolClassReference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IToolClassReference.js","sourceRoot":"","sources":["../../../src/types/IToolClassReference.ts"],"names":[],"mappings":""}
@@ -13,6 +13,9 @@ export default interface IToolGroup {
13
13
  addTool: {
14
14
  (toolName: string, toolConfiguration?: any): void;
15
15
  };
16
+ addToolInstance: {
17
+ (ttoolName: string, parentClassName: string, configuration?: any): void;
18
+ };
16
19
  addViewport: {
17
20
  (viewportId: string, renderingEngineId?: string): void;
18
21
  };
@@ -19,4 +19,6 @@ import type SVGDrawingHelper from './SVGDrawingHelper';
19
19
  import type * as CINETypes from './CINETypes';
20
20
  import type { Color, ColorLUT, RepresentationConfig, SegmentationRepresentationConfig, SegmentationRepresentationData, Segmentation, ToolGroupSpecificRepresentationState, ToolGroupSpecificLabelmapRepresentation, ToolGroupSpecificRepresentation, SegmentationState, RepresentationPublicInput } from './SegmentationStateTypes';
21
21
  import ISynchronizerEventHandler from './ISynchronizerEventHandler';
22
- export type { Annotation, Annotations, FrameOfReferenceSpecificAnnotations, AnnotationState, AnnotationStyle, ToolSpecificAnnotationTypes, JumpToSliceOptions, PlanarBoundingBox, ToolProps, PublicToolProps, EventTypes, IPoints, IToolBinding, SetToolBindingsType, ToolOptionsType, InteractionTypes, IToolGroup, ISynchronizerEventHandler, ToolHandle, AnnotationHandle, TextBoxHandle, Segmentation, SegmentationState, SegmentationRepresentationData, SegmentationRepresentationConfig, RepresentationConfig, ToolGroupSpecificRepresentationState, ToolGroupSpecificLabelmapRepresentation, ToolGroupSpecificRepresentation, RepresentationPublicInput, Color, ColorLUT, LabelmapTypes, SVGCursorDescriptor, SVGPoint, ScrollOptions, CINETypes, BoundsIJK, SVGDrawingHelper, };
22
+ import { FloodFillGetter, FloodFillOptions, FloodFillResult } from './FloodFillTypes';
23
+ import IToolClassReference from './IToolClassReference';
24
+ export type { Annotation, Annotations, FrameOfReferenceSpecificAnnotations, AnnotationState, AnnotationStyle, ToolSpecificAnnotationTypes, JumpToSliceOptions, PlanarBoundingBox, ToolProps, PublicToolProps, EventTypes, IPoints, IToolBinding, SetToolBindingsType, ToolOptionsType, InteractionTypes, IToolGroup, IToolClassReference, ISynchronizerEventHandler, ToolHandle, AnnotationHandle, TextBoxHandle, Segmentation, SegmentationState, SegmentationRepresentationData, SegmentationRepresentationConfig, RepresentationConfig, ToolGroupSpecificRepresentationState, ToolGroupSpecificLabelmapRepresentation, ToolGroupSpecificRepresentation, RepresentationPublicInput, Color, ColorLUT, LabelmapTypes, SVGCursorDescriptor, SVGPoint, ScrollOptions, CINETypes, BoundsIJK, SVGDrawingHelper, FloodFillResult, FloodFillGetter, FloodFillOptions, };
@@ -0,0 +1,2 @@
1
+ export declare function setBrushSizeForToolGroup(toolGroupId: string, brushSize: number): void;
2
+ export declare function getBrushSizeForToolGroup(toolGroupId: string): void;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getBrushSizeForToolGroup = exports.setBrushSizeForToolGroup = void 0;
7
+ const ToolGroupManager_1 = require("../../store/ToolGroupManager");
8
+ const triggerAnnotationRenderForViewportIds_1 = __importDefault(require("../triggerAnnotationRenderForViewportIds"));
9
+ const core_1 = require("@cornerstonejs/core");
10
+ const utilities_1 = __importDefault(require("./utilities"));
11
+ function setBrushSizeForToolGroup(toolGroupId, brushSize) {
12
+ const toolGroup = (0, ToolGroupManager_1.getToolGroup)(toolGroupId);
13
+ if (toolGroup === undefined) {
14
+ return;
15
+ }
16
+ const brushBasedToolInstances = (0, utilities_1.default)(toolGroupId);
17
+ brushBasedToolInstances.forEach((tool) => {
18
+ tool.configuration.brushSize = brushSize;
19
+ tool.invalidateBrushCursor();
20
+ });
21
+ const viewportsInfo = toolGroup.getViewportsInfo();
22
+ const viewportsInfoArray = Object.keys(viewportsInfo).map((key) => viewportsInfo[key]);
23
+ if (!viewportsInfoArray.length) {
24
+ return;
25
+ }
26
+ const { renderingEngineId } = viewportsInfoArray[0];
27
+ const viewportIds = toolGroup.getViewportIds();
28
+ const renderingEngine = (0, core_1.getRenderingEngine)(renderingEngineId);
29
+ (0, triggerAnnotationRenderForViewportIds_1.default)(renderingEngine, viewportIds);
30
+ }
31
+ exports.setBrushSizeForToolGroup = setBrushSizeForToolGroup;
32
+ function getBrushSizeForToolGroup(toolGroupId) {
33
+ const toolGroup = (0, ToolGroupManager_1.getToolGroup)(toolGroupId);
34
+ if (toolGroup === undefined) {
35
+ return;
36
+ }
37
+ const toolInstances = toolGroup._toolInstances;
38
+ if (!Object.keys(toolInstances).length) {
39
+ return;
40
+ }
41
+ const brushBasedToolInstances = (0, utilities_1.default)(toolGroupId);
42
+ const brushToolInstance = brushBasedToolInstances[0];
43
+ if (!brushToolInstance) {
44
+ return;
45
+ }
46
+ return brushToolInstance.configuration.brushSize;
47
+ }
48
+ exports.getBrushSizeForToolGroup = getBrushSizeForToolGroup;
49
+ //# sourceMappingURL=brushSizeForToolGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brushSizeForToolGroup.js","sourceRoot":"","sources":["../../../../src/utilities/segmentation/brushSizeForToolGroup.ts"],"names":[],"mappings":";;;;;;AAAA,mEAA4D;AAE5D,qHAA6F;AAC7F,8CAAyD;AACzD,4DAAgD;AAEhD,SAAgB,wBAAwB,CACtC,WAAmB,EACnB,SAAiB;IAEjB,MAAM,SAAS,GAAG,IAAA,+BAAY,EAAC,WAAW,CAAC,CAAC;IAE5C,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,OAAO;KACR;IAED,MAAM,uBAAuB,GAAG,IAAA,mBAAqB,EAAC,WAAW,CAAC,CAAC;IAEnE,uBAAuB,CAAC,OAAO,CAAC,CAAC,IAAe,EAAE,EAAE;QAClD,IAAI,CAAC,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;QAGzC,IAAI,CAAC,qBAAqB,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;IAGH,MAAM,aAAa,GAAG,SAAS,CAAC,gBAAgB,EAAE,CAAC;IAEnD,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,CACvD,CAAC,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAC5B,CAAC;IAEF,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE;QAC9B,OAAO;KACR;IAED,MAAM,EAAE,iBAAiB,EAAE,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAIpD,MAAM,WAAW,GAAG,SAAS,CAAC,cAAc,EAAE,CAAC;IAE/C,MAAM,eAAe,GAAG,IAAA,yBAAkB,EAAC,iBAAiB,CAAC,CAAC;IAE9D,IAAA,+CAAqC,EAAC,eAAe,EAAE,WAAW,CAAC,CAAC;AACtE,CAAC;AAvCD,4DAuCC;AAED,SAAgB,wBAAwB,CAAC,WAAmB;IAC1D,MAAM,SAAS,GAAG,IAAA,+BAAY,EAAC,WAAW,CAAC,CAAC;IAE5C,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,OAAO;KACR;IAED,MAAM,aAAa,GAAG,SAAS,CAAC,cAAc,CAAC;IAE/C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,EAAE;QACtC,OAAO;KACR;IAED,MAAM,uBAAuB,GAAG,IAAA,mBAAqB,EAAC,WAAW,CAAC,CAAC;IAGnE,MAAM,iBAAiB,GAAG,uBAAuB,CAAC,CAAC,CAAC,CAAC;IAErD,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAO;KACR;IAGD,OAAO,iBAAiB,CAAC,aAAa,CAAC,SAAS,CAAC;AACnD,CAAC;AAxBD,4DAwBC"}
@@ -0,0 +1,3 @@
1
+ import type { Types } from '@cornerstonejs/core';
2
+ export declare function setBrushThresholdForToolGroup(toolGroupId: string, threshold: Types.Point2): void;
3
+ export declare function getBrushThresholdForToolGroup(toolGroupId: string): any;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getBrushThresholdForToolGroup = exports.setBrushThresholdForToolGroup = void 0;
7
+ const ToolGroupManager_1 = require("../../store/ToolGroupManager");
8
+ const triggerAnnotationRenderForViewportIds_1 = __importDefault(require("../triggerAnnotationRenderForViewportIds"));
9
+ const core_1 = require("@cornerstonejs/core");
10
+ const utilities_1 = __importDefault(require("./utilities"));
11
+ function setBrushThresholdForToolGroup(toolGroupId, threshold) {
12
+ const toolGroup = (0, ToolGroupManager_1.getToolGroup)(toolGroupId);
13
+ if (toolGroup === undefined) {
14
+ return;
15
+ }
16
+ const brushBasedToolInstances = (0, utilities_1.default)(toolGroupId);
17
+ brushBasedToolInstances.forEach((tool) => {
18
+ tool.configuration.strategySpecificConfiguration.THRESHOLD_INSIDE_CIRCLE.threshold =
19
+ threshold;
20
+ });
21
+ const viewportsInfo = toolGroup.getViewportsInfo();
22
+ if (!viewportsInfo.length) {
23
+ return;
24
+ }
25
+ const { renderingEngineId } = viewportsInfo[0];
26
+ const viewportIds = toolGroup.getViewportIds();
27
+ const renderingEngine = (0, core_1.getRenderingEngine)(renderingEngineId);
28
+ (0, triggerAnnotationRenderForViewportIds_1.default)(renderingEngine, viewportIds);
29
+ }
30
+ exports.setBrushThresholdForToolGroup = setBrushThresholdForToolGroup;
31
+ function getBrushThresholdForToolGroup(toolGroupId) {
32
+ const toolGroup = (0, ToolGroupManager_1.getToolGroup)(toolGroupId);
33
+ if (toolGroup === undefined) {
34
+ return;
35
+ }
36
+ const toolInstances = toolGroup._toolInstances;
37
+ if (!Object.keys(toolInstances).length) {
38
+ return;
39
+ }
40
+ const brushBasedToolInstances = (0, utilities_1.default)(toolGroupId);
41
+ const brushToolInstance = brushBasedToolInstances[0];
42
+ if (!brushToolInstance) {
43
+ return;
44
+ }
45
+ return brushToolInstance.configuration.strategySpecificConfiguration
46
+ .THRESHOLD_INSIDE_CIRCLE.threshold;
47
+ }
48
+ exports.getBrushThresholdForToolGroup = getBrushThresholdForToolGroup;
49
+ //# sourceMappingURL=brushThresholdForToolGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brushThresholdForToolGroup.js","sourceRoot":"","sources":["../../../../src/utilities/segmentation/brushThresholdForToolGroup.ts"],"names":[],"mappings":";;;;;;AACA,mEAA4D;AAC5D,qHAA6F;AAC7F,8CAAyD;AACzD,4DAAgD;AAEhD,SAAgB,6BAA6B,CAC3C,WAAmB,EACnB,SAAuB;IAEvB,MAAM,SAAS,GAAG,IAAA,+BAAY,EAAC,WAAW,CAAC,CAAC;IAE5C,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,OAAO;KACR;IAED,M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loodFillOptions } from '../../types';
2
+ import { Types } from '@cornerstonejs/core';
3
+ export default function (getter: FloodFillGetter, seed: Types.Point2 | Types.Point3, options?: FloodFillOptions): FloodFillResult;
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function default_1(getter, seed, options = {}) {
4
+ const onFlood = options.onFlood;
5
+ const onBoundary = options.onBoundary;
6
+ const equals = options.equals || defaultEquals;
7
+ const diagonals = options.diagonals || false;
8
+ const startNode = get(seed);
9
+ const permutations = prunedPermutations();
10
+ const stack = [];
11
+ const flooded = [];
12
+ const visits = {};
13
+ const bounds = {};
14
+ stack.push({ currentArgs: seed });
15
+ while (stack.length > 0) {
16
+ flood(stack.pop());
17
+ }
18
+ return {
19
+ flooded,
20
+ boundaries: boundaries(),
21
+ };
22
+ function flood(job) {
23
+ const getArgs = job.currentArgs;
24
+ const prevArgs = job.previousArgs;
25
+ if (visited(getArgs)) {
26
+ return;
27
+ }
28
+ markAsVisited(getArgs);
29
+ if (member(getArgs)) {
30
+ markAsFlooded(getArgs);
31
+ pushAdjacent(getArgs);
32
+ }
33
+ else {
34
+ markAsBoundary(prevArgs);
35
+ }
36
+ }
37
+ function visited(key) {
38
+ return visits[key] === true;
39
+ }
40
+ function markAsVisited(key) {
41
+ visits[key] = true;
42
+ }
43
+ function member(getArgs) {
44
+ const node = safely(get, [getArgs]);
45
+ return safely(equals, [node, startNode]);
46
+ }
47
+ function markAsFlooded(getArgs) {
48
+ flooded.push(getArgs);
49
+ if (onFlood) {
50
+ onFlood(...getArgs);
51
+ }
52
+ }
53
+ function markAsBoundary(prevArgs) {
54
+ bounds[prevArgs] = prevArgs;
55
+ if (onBoundary) {
56
+ onBoundary(...prevArgs);
57
+ }
58
+ }
59
+ function pushAdjacent(getArgs) {
60
+ for (let i = 0; i < permutations.length; i += 1) {
61
+ const perm = permutations[i];
62
+ const nextArgs = getArgs.slice(0);
63
+ for (let j = 0; j < getArgs.length; j += 1) {
64
+ nextArgs[j] += perm[j];
65
+ }
66
+ stack.push({
67
+ currentArgs: nextArgs,
68
+ previousArgs: getArgs,
69
+ });
70
+ }
71
+ }
72
+ function get(getArgs) {
73
+ return getter(...getArgs);
74
+ }
75
+ function safely(f, args) {
76
+ try {
77
+ return f(...args);
78
+ }
79
+ catch (error) {
80
+ return;
81
+ }
82
+ }
83
+ function prunedPermutations() {
84
+ const permutations = permute(seed.length);
85
+ return permutations.filter(function (perm) {
86
+ const count = countNonZeroes(perm);
87
+ return count !== 0 && (count === 1 || diagonals);
88
+ });
89
+ }
90
+ function permute(length) {
91
+ const perms = [];
92
+ const permutation = function (string) {
93
+ return string.split('').map(function (c) {
94
+ return parseInt(c, 10) - 1;
95
+ });
96
+ };
97
+ for (let i = 0; i < Math.pow(3, length); i += 1) {
98
+ const string = lpad(i.toString(3), '0', length);
99
+ perms.push(permutation(string));
100
+ }
101
+ return perms;
102
+ }
103
+ function boundaries() {
104
+ const array = [];
105
+ for (const key in bounds) {
106
+ if (bounds[key] !== undefined) {
107
+ array.unshift(bounds[key]);
108
+ }
109
+ }
110
+ return array;
111
+ }
112
+ }
113
+ exports.default = default_1;
114
+ function defaultEquals(a, b) {
115
+ return a === b;
116
+ }
117
+ function countNonZeroes(array) {
118
+ let count = 0;
119
+ for (let i = 0; i < array.length; i += 1) {
120
+ if (array[i] !== 0) {
121
+ count += 1;
122
+ }
123
+ }
124
+ return count;
125
+ }
126
+ function lpad(string, character, length) {
127
+ const array = new Array(length + 1);
128
+ const pad = array.join(character);
129
+ return (pad + string).slice(-length);
130
+ }
131
+ //# sourceMappingURL=floodFill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floodFill.js","sourceRoot":"","sources":["../../../../src/utilities/segmentation/floodFill.ts"],"names":[],"mappings":";;AA0BA,mBACE,MAAuB,EACvB,IAAiC,EACjC,UAA4B,EAAE;IAE9B,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,MAAM,UAAU,GAAG,OA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CAAC,CAAC,CAAC;aAC5B;SACF;QAED,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AA9ID,4BA8IC;AAED,SAAS,aAAa,CAAC,CAAC,EAAE,CAAC;IACzB,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC;AAED,SAAS,cAAc,CAAC,KAAK;IAC3B,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QACxC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;YAClB,KAAK,IAAI,CAAC,CAAC;SACZ;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM;IACrC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACpC,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAElC,OAAO,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC"}
@@ -5,4 +5,7 @@ import isValidRepresentationConfig from './isValidRepresentationConfig';
5
5
  import getDefaultRepresentationConfig from './getDefaultRepresentationConfig';
6
6
  import createLabelmapVolumeForViewport from './createLabelmapVolumeForViewport';
7
7
  import { triggerSegmentationRender } from './triggerSegmentationRender';
8
- export { thresholdVolumeByRange, createMergedLabelmapForIndex, isValidRepresentationConfig, getDefaultRepresentationConfig, createLabelmapVolumeForViewport, rectangleROIThresholdVolumeByRange, triggerSegmentationRender, };
8
+ import floodFill from './floodFill';
9
+ import { getBrushSizeForToolGroup, setBrushSizeForToolGroup } from './brushSizeForToolGroup';
10
+ import { getBrushThresholdForToolGroup, setBrushThresholdForToolGroup } from './brushThresholdForToolGroup';
11
+ export { thresholdVolumeByRange, createMergedLabelmapForIndex, isValidRepresentationConfig, getDefaultRepresentationConfig, createLabelmapVolumeForViewport, rectangleROIThresholdVolumeByRange, triggerSegmentationRender, floodFill, getBrushSizeForToolGroup, setBrushSizeForToolGroup, getBrushThresholdForToolGroup, setBrushThresholdForToolGroup, };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.triggerSegmentationRender = exports.rectangleROIThresholdVolumeByRange = exports.createLabelmapVolumeForViewport = exports.getDefaultRepresentationConfig = exports.isValidRepresentationConfig = exports.createMergedLabelmapForIndex = exports.thresholdVolumeByRange = void 0;
6
+ exports.setBrushThresholdForToolGroup = exports.getBrushThresholdForToolGroup = exports.setBrushSizeForToolGroup = exports.getBrushSizeForToolGroup = exports.floodFill = exports.triggerSegmentationRender = exports.rectangleROIThresholdVolumeByRange = exports.createLabelmapVolumeForViewport = exports.getDefaultRepresentationConfig = exports.isValidRepresentationConfig = exports.createMergedLabelmapForIndex = exports.thresholdVolumeByRange = void 0;
7
7
  const thresholdVolumeByRange_1 = __importDefault(require("./thresholdVolumeByRange"));
8
8
  exports.thresholdVolumeByRange = thresholdVolumeByRange_1.default;
9
9
  const rectangleROIThresholdVolumeByRange_1 = __importDefault(require("./rectangleROIThresholdVolumeByRange"));
@@ -18,4 +18,12 @@ const createLabelmapVolumeForViewport_1 = __importDefault(require("./createLabel
18
18
  exports.createLabelmapVolumeForViewport = createLabelmapVolumeForViewport_1.default;
19
19
  const triggerSegmentationRender_1 = require("./triggerSegmentationRender");
20
20
  Object.defineProperty(exports, "triggerSegmentationRender", { enumerable: true, get: function () { return triggerSegmentationRender_1.triggerSegmentationRender; } });
21
+ const floodFill_1 = __importDefault(require("./floodFill"));
22
+ exports.floodFill = floodFill_1.default;
23
+ const brushSizeForToolGroup_1 = require("./brushSizeForToolGroup");
24
+ Object.defineProperty(exports, "getBrushSizeForToolGroup", { enumerable: true, get: function () { return brushSizeForToolGroup_1.getBrushSizeForToolGroup; } });
25
+ Object.defineProperty(exports, "setBrushSizeForToolGroup", { enumerable: true, get: function () { return brushSizeForToolGroup_1.setBrushSizeForToolGroup; } });
26
+ const brushThresholdForToolGroup_1 = require("./brushThresholdForToolGroup");
27
+ Object.defineProperty(exports, "getBrushThresholdForToolGroup", { enumerable: true, get: function () { return brushThresholdForToolGroup_1.getBrushThresholdForToolGroup; } });
28
+ Object.defineProperty(exports, "setBrushThresholdForToolGroup", { enumerable: true, get: function () { return brushThresholdForToolGroup_1.setBrushThresholdForToolGroup; } });
21
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/segmentation/index.ts"],"names":[],"mappings":";;;;;;AAAA,sFAA8D;AAS5D,iCATK,gCAAsB,CASL;AARxB,8GAAsF;AAapF,6CAbK,4CAAkC,CAaL;AAZpC,kGAA0E;AAQxE,uCARK,sCAA4B,CAQL;AAP9B,gGAAwE;AAQtE,sCARK,qCAA2B,CAQL;AAP7B,sGAA8E;AAQ5E,yCARK,wCAA8B,CAQL;AAPhC,wGAAgF;AAQ9E,0CARK,yCAA+B,CAQL;AAPjC,2EAAwE;AAStE,0GATO,qDAAyB,OASP"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/segmentation/index.ts"],"names":[],"mappings":";;;;;;AAAA,sFAA8D;AAkB5D,iCAlBK,gCAAsB,CAkBL;AAjBxB,8GAAsF;AAsBpF,6CAtBK,4CAAkC,CAsBL;AArBpC,kGAA0E;AAiBxE,uCAjBK,sCAA4B,CAiBL;AAhB9B,gGAAwE;AAiBtE,sCAjBK,qCAA2B,CAiBL;AAhB7B,sGAA8E;AAiB5E,yCAjBK,wCAA8B,CAiBL;AAhBhC,wGAAgF;AAiB9E,0CAjBK,yCAA+B,CAiBL;AAhBjC,2EAAwE;AAkBtE,0GAlBO,qDAAyB,OAkBP;AAjB3B,4DAAoC;AAkBlC,oBAlBK,mBAAS,CAkBL;AAjBX,mEAGiC;AAe/B,yGAjBA,gDAAwB,OAiBA;AACxB,yGAjBA,gDAAwB,OAiBA;AAf1B,6EAGsC;AAapC,8GAfA,0DAA6B,OAeA;AAC7B,8GAfA,0DAA6B,OAeA"}
@@ -0,0 +1,2 @@
1
+ import BrushTool from '../../tools/segmentation/BrushTool';
2
+ export default function getBrushToolInstances(toolGroupId: any): BrushTool[];
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const ToolGroupManager_1 = require("../../store/ToolGroupManager");
7
+ const BrushTool_1 = __importDefault(require("../../tools/segmentation/BrushTool"));
8
+ function getBrushToolInstances(toolGroupId) {
9
+ const toolGroup = (0, ToolGroupManager_1.getToolGroup)(toolGroupId);
10
+ if (toolGroup === undefined) {
11
+ return;
12
+ }
13
+ const toolInstances = toolGroup._toolInstances;
14
+ if (!Object.keys(toolInstances).length) {
15
+ return;
16
+ }
17
+ const brushBasedToolInstances = Object.values(toolInstances).filter((toolInstance) => toolInstance instanceof BrushTool_1.default);
18
+ return brushBasedToolInstances;
19
+ }
20
+ exports.default = getBrushToolInstances;
21
+ //# sourceMappingURL=utilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../../../src/utilities/segmentation/utilities.ts"],"names":[],"mappings":";;;;;AAAA,mEAA4D;AAC5D,mFAA2D;AAE3D,SAAwB,qBAAqB,CAAC,WAAW;IACvD,MAAM,SAAS,GAAG,IAAA,+BAAY,EAAC,WAAW,CAAC,CAAC;IAE5C,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,OAAO;KACR;IAED,MAAM,aAAa,GAAG,SAAS,CAAC,cAAc,CAAC;IAE/C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,EAAE;QACtC,OAAO;KACR;IAGD,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,CACjE,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,YAAY,mBAAS,CACrC,CAAC;IAEjB,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAnBD,wCAmBC"}
@@ -8,6 +8,6 @@ import * as cursors from './cursors';
8
8
  import * as Types from './types';
9
9
  import * as annotation from './stateManagement/annotation';
10
10
  import * as segmentation from './stateManagement/segmentation';
11
- import { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, MagnifyTool, ReferenceCursors, ReferenceLines } from './tools';
11
+ import { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, MagnifyTool, ReferenceCursors, ReferenceLines, PaintFillTool } from './tools';
12
12
  import * as Enums from './enums';
13
- export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ReferenceLinesTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, MagnifyTool, ReferenceCursors, ReferenceLines, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
13
+ export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ReferenceLinesTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, MagnifyTool, ReferenceCursors, ReferenceLines, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
package/dist/esm/index.js CHANGED
@@ -8,7 +8,7 @@ import * as cursors from './cursors';
8
8
  import * as Types from './types';
9
9
  import * as annotation from './stateManagement/annotation';
10
10
  import * as segmentation from './stateManagement/segmentation';
11
- import { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, MagnifyTool, ReferenceCursors, ReferenceLines, } from './tools';
11
+ import { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, MagnifyTool, ReferenceCursors, ReferenceLines, PaintFillTool, } from './tools';
12
12
  import * as Enums from './enums';
13
- export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ReferenceLinesTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, MagnifyTool, ReferenceCursors, ReferenceLines, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
13
+ export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ReferenceLinesTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, MagnifyTool, ReferenceCursors, ReferenceLines, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
14
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EACL,OAAO,EACP,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,yBAAyB,GAC1B,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAGzC,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EACL,QAAQ,EACR,cAAc,EACd,OAAO,EACP,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,eAAe,EACf,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,iCAAiC,EACjC,uBAAuB,EACvB,SAAS,EACT,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,cAAc,GACf,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EAEL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,UAAU,EACV,yBAAyB,EAEzB,QAAQ,EACR,cAAc,EAEd,OAAO,EACP,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,eAAe,EACf,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAElB,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,cAAc,EAEd,uBAAuB,EAEvB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,iCAAiC,EACjC,SAAS,EAET,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,KAAK,EACL,KAAK,EAEL,gBAAgB,EAEhB,KAAK,EAEL,SAAS,EAET,OAAO,EAEP,UAAU,EAEV,YAAY,EAEZ,SAAS,EACT,OAAO,GACR,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EACL,OAAO,EACP,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,yBAAyB,GAC1B,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAGzC,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,SAAS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