@cornerstonejs/tools 0.27.2 → 0.28.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.
- package/dist/cjs/eventListeners/segmentation/segmentationDataModifiedEventListener.js +2 -2
- package/dist/cjs/eventListeners/segmentation/segmentationDataModifiedEventListener.js.map +1 -1
- package/dist/cjs/eventListeners/segmentation/segmentationModifiedEventListener.js +1 -1
- package/dist/cjs/eventListeners/segmentation/segmentationModifiedEventListener.js.map +1 -1
- package/dist/cjs/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.js +1 -1
- package/dist/cjs/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.js.map +1 -1
- package/dist/cjs/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.js +1 -1
- package/dist/cjs/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/stateManagement/annotation/config/ToolStyle.js +0 -9
- package/dist/cjs/stateManagement/annotation/config/ToolStyle.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/SegmentationStateManager.d.ts +6 -1
- package/dist/cjs/stateManagement/segmentation/SegmentationStateManager.js +42 -4
- package/dist/cjs/stateManagement/segmentation/SegmentationStateManager.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/config/index.d.ts +2 -2
- package/dist/cjs/stateManagement/segmentation/config/index.js +5 -1
- package/dist/cjs/stateManagement/segmentation/config/index.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/config/segmentationColor.d.ts +2 -1
- package/dist/cjs/stateManagement/segmentation/config/segmentationColor.js +9 -1
- package/dist/cjs/stateManagement/segmentation/config/segmentationColor.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/config/segmentationConfig.d.ts +6 -2
- package/dist/cjs/stateManagement/segmentation/config/segmentationConfig.js +18 -2
- package/dist/cjs/stateManagement/segmentation/config/segmentationConfig.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/config/segmentationVisibility.d.ts +2 -1
- package/dist/cjs/stateManagement/segmentation/config/segmentationVisibility.js +39 -1
- package/dist/cjs/stateManagement/segmentation/config/segmentationVisibility.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/removeSegmentationsFromToolGroup.d.ts +1 -1
- package/dist/cjs/stateManagement/segmentation/removeSegmentationsFromToolGroup.js +6 -7
- package/dist/cjs/stateManagement/segmentation/removeSegmentationsFromToolGroup.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/segmentationState.d.ts +8 -3
- package/dist/cjs/stateManagement/segmentation/segmentationState.js +44 -16
- package/dist/cjs/stateManagement/segmentation/segmentationState.js.map +1 -1
- package/dist/cjs/store/SynchronizerManager/Synchronizer.js +29 -18
- package/dist/cjs/store/SynchronizerManager/Synchronizer.js.map +1 -1
- package/dist/cjs/store/ToolGroupManager/ToolGroup.d.ts +2 -0
- package/dist/cjs/store/ToolGroupManager/ToolGroup.js +30 -5
- package/dist/cjs/store/ToolGroupManager/ToolGroup.js.map +1 -1
- package/dist/cjs/store/ToolGroupManager/destroyToolGroup.js +2 -0
- package/dist/cjs/store/ToolGroupManager/destroyToolGroup.js.map +1 -1
- package/dist/cjs/synchronizers/callbacks/stackImageSyncCallback.d.ts +3 -0
- package/dist/cjs/synchronizers/callbacks/stackImageSyncCallback.js +72 -0
- package/dist/cjs/synchronizers/callbacks/stackImageSyncCallback.js.map +1 -0
- package/dist/cjs/synchronizers/index.d.ts +2 -1
- package/dist/cjs/synchronizers/index.js +3 -1
- package/dist/cjs/synchronizers/index.js.map +1 -1
- package/dist/cjs/synchronizers/synchronizers/createStackImageSynchronizer.d.ts +2 -0
- package/dist/cjs/synchronizers/synchronizers/createStackImageSynchronizer.js +15 -0
- package/dist/cjs/synchronizers/synchronizers/createStackImageSynchronizer.js.map +1 -0
- package/dist/cjs/synchronizers/synchronizers/index.d.ts +2 -1
- package/dist/cjs/synchronizers/synchronizers/index.js +3 -1
- package/dist/cjs/synchronizers/synchronizers/index.js.map +1 -1
- package/dist/cjs/tools/CrosshairsTool.d.ts +6 -1
- package/dist/cjs/tools/CrosshairsTool.js +47 -15
- package/dist/cjs/tools/CrosshairsTool.js.map +1 -1
- package/dist/cjs/tools/displayTools/Labelmap/addLabelmapToElement.js +1 -0
- package/dist/cjs/tools/displayTools/Labelmap/addLabelmapToElement.js.map +1 -1
- package/dist/cjs/tools/displayTools/Labelmap/labelmapConfig.js +7 -3
- package/dist/cjs/tools/displayTools/Labelmap/labelmapConfig.js.map +1 -1
- package/dist/cjs/tools/displayTools/Labelmap/labelmapDisplay.d.ts +2 -2
- package/dist/cjs/tools/displayTools/Labelmap/labelmapDisplay.js +128 -86
- package/dist/cjs/tools/displayTools/Labelmap/labelmapDisplay.js.map +1 -1
- package/dist/cjs/tools/displayTools/SegmentationDisplayTool.js +14 -9
- package/dist/cjs/tools/displayTools/SegmentationDisplayTool.js.map +1 -1
- package/dist/cjs/types/LabelmapTypes.d.ts +2 -0
- package/dist/cjs/types/SegmentationStateTypes.d.ts +5 -0
- package/dist/cjs/utilities/index.d.ts +2 -1
- package/dist/cjs/utilities/index.js +3 -1
- package/dist/cjs/utilities/index.js.map +1 -1
- package/dist/cjs/utilities/segmentation/index.d.ts +2 -1
- package/dist/cjs/utilities/segmentation/index.js +3 -1
- package/dist/cjs/utilities/segmentation/index.js.map +1 -1
- package/dist/cjs/utilities/{triggerSegmentationRender.d.ts → segmentation/triggerSegmentationRender.d.ts} +1 -0
- package/dist/cjs/utilities/{triggerSegmentationRender.js → segmentation/triggerSegmentationRender.js} +9 -3
- package/dist/cjs/utilities/segmentation/triggerSegmentationRender.js.map +1 -0
- package/dist/cjs/utilities/viewport/index.d.ts +4 -0
- package/dist/cjs/utilities/viewport/index.js +13 -0
- package/dist/cjs/utilities/viewport/index.js.map +1 -0
- package/dist/esm/eventListeners/segmentation/segmentationDataModifiedEventListener.js +2 -2
- package/dist/esm/eventListeners/segmentation/segmentationDataModifiedEventListener.js.map +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationModifiedEventListener.js +2 -2
- package/dist/esm/eventListeners/segmentation/segmentationModifiedEventListener.js.map +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.js +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.js.map +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.js +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/stateManagement/annotation/config/ToolStyle.js +0 -9
- package/dist/esm/stateManagement/annotation/config/ToolStyle.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.d.ts +6 -1
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js +42 -4
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/config/index.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/config/index.js +2 -2
- package/dist/esm/stateManagement/segmentation/config/index.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/config/segmentationColor.d.ts +2 -1
- package/dist/esm/stateManagement/segmentation/config/segmentationColor.js +8 -1
- package/dist/esm/stateManagement/segmentation/config/segmentationColor.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/config/segmentationConfig.d.ts +6 -2
- package/dist/esm/stateManagement/segmentation/config/segmentationConfig.js +17 -2
- package/dist/esm/stateManagement/segmentation/config/segmentationConfig.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.d.ts +2 -1
- package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.js +15 -1
- package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/removeSegmentationsFromToolGroup.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/removeSegmentationsFromToolGroup.js +6 -7
- package/dist/esm/stateManagement/segmentation/removeSegmentationsFromToolGroup.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/segmentationState.d.ts +8 -3
- package/dist/esm/stateManagement/segmentation/segmentationState.js +38 -15
- package/dist/esm/stateManagement/segmentation/segmentationState.js.map +1 -1
- package/dist/esm/store/SynchronizerManager/Synchronizer.js +2 -2
- package/dist/esm/store/SynchronizerManager/Synchronizer.js.map +1 -1
- package/dist/esm/store/ToolGroupManager/ToolGroup.d.ts +2 -0
- package/dist/esm/store/ToolGroupManager/ToolGroup.js +30 -5
- package/dist/esm/store/ToolGroupManager/ToolGroup.js.map +1 -1
- package/dist/esm/store/ToolGroupManager/destroyToolGroup.js +2 -0
- package/dist/esm/store/ToolGroupManager/destroyToolGroup.js.map +1 -1
- package/dist/esm/synchronizers/callbacks/stackImageSyncCallback.d.ts +3 -0
- package/dist/esm/synchronizers/callbacks/stackImageSyncCallback.js +58 -0
- package/dist/esm/synchronizers/callbacks/stackImageSyncCallback.js.map +1 -0
- package/dist/esm/synchronizers/index.d.ts +2 -1
- package/dist/esm/synchronizers/index.js +2 -1
- package/dist/esm/synchronizers/index.js.map +1 -1
- package/dist/esm/synchronizers/synchronizers/createStackImageSynchronizer.d.ts +2 -0
- package/dist/esm/synchronizers/synchronizers/createStackImageSynchronizer.js +9 -0
- package/dist/esm/synchronizers/synchronizers/createStackImageSynchronizer.js.map +1 -0
- package/dist/esm/synchronizers/synchronizers/index.d.ts +2 -1
- package/dist/esm/synchronizers/synchronizers/index.js +2 -1
- package/dist/esm/synchronizers/synchronizers/index.js.map +1 -1
- package/dist/esm/tools/CrosshairsTool.d.ts +6 -1
- package/dist/esm/tools/CrosshairsTool.js +47 -15
- package/dist/esm/tools/CrosshairsTool.js.map +1 -1
- package/dist/esm/tools/displayTools/Labelmap/addLabelmapToElement.js +2 -1
- package/dist/esm/tools/displayTools/Labelmap/addLabelmapToElement.js.map +1 -1
- package/dist/esm/tools/displayTools/Labelmap/labelmapConfig.js +7 -3
- package/dist/esm/tools/displayTools/Labelmap/labelmapConfig.js.map +1 -1
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.d.ts +2 -2
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.js +119 -76
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.js.map +1 -1
- package/dist/esm/tools/displayTools/SegmentationDisplayTool.js +14 -9
- package/dist/esm/tools/displayTools/SegmentationDisplayTool.js.map +1 -1
- package/dist/esm/types/LabelmapTypes.d.ts +2 -0
- package/dist/esm/types/SegmentationStateTypes.d.ts +5 -0
- package/dist/esm/utilities/index.d.ts +2 -1
- package/dist/esm/utilities/index.js +2 -1
- package/dist/esm/utilities/index.js.map +1 -1
- package/dist/esm/utilities/segmentation/index.d.ts +2 -1
- package/dist/esm/utilities/segmentation/index.js +2 -1
- package/dist/esm/utilities/segmentation/index.js.map +1 -1
- package/dist/esm/utilities/{triggerSegmentationRender.d.ts → segmentation/triggerSegmentationRender.d.ts} +1 -0
- package/dist/esm/utilities/{triggerSegmentationRender.js → segmentation/triggerSegmentationRender.js} +9 -3
- package/dist/esm/utilities/segmentation/triggerSegmentationRender.js.map +1 -0
- package/dist/esm/utilities/viewport/index.d.ts +4 -0
- package/dist/esm/utilities/viewport/index.js +5 -0
- package/dist/esm/utilities/viewport/index.js.map +1 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/cjs/utilities/triggerSegmentationRender.js.map +0 -1
- package/dist/esm/utilities/triggerSegmentationRender.js.map +0 -1
|
@@ -27,7 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const core_1 = require("@cornerstonejs/core");
|
|
30
|
-
const triggerSegmentationRender_1 = __importDefault(require("../../utilities/triggerSegmentationRender"));
|
|
30
|
+
const triggerSegmentationRender_1 = __importDefault(require("../../utilities/segmentation/triggerSegmentationRender"));
|
|
31
31
|
const SegmentationRepresentations_1 = __importDefault(require("../../enums/SegmentationRepresentations"));
|
|
32
32
|
const SegmentationState = __importStar(require("../../stateManagement/segmentation/segmentationState"));
|
|
33
33
|
const onSegmentationDataModified = function (evt) {
|
|
@@ -54,7 +54,7 @@ const onSegmentationDataModified = function (evt) {
|
|
|
54
54
|
});
|
|
55
55
|
imageData.modified();
|
|
56
56
|
toolGroupIds =
|
|
57
|
-
SegmentationState.
|
|
57
|
+
SegmentationState.getToolGroupIdsWithSegmentation(segmentationId);
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
60
|
throw new Error(`onSegmentationDataModified: representationType ${type} not supported yet`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmentationDataModifiedEventListener.js","sourceRoot":"","sources":["../../../../src/eventListeners/segmentation/segmentationDataModifiedEventListener.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"segmentationDataModifiedEventListener.js","sourceRoot":"","sources":["../../../../src/eventListeners/segmentation/segmentationDataModifiedEventListener.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAA4C;AAE5C,uHAA+F;AAC/F,0GAAkF;AAClF,wGAA0F;AAM1F,MAAM,0BAA0B,GAAG,UACjC,GAAsC;IAEtC,MAAM,EAAE,cAAc,EAAE,mBAAmB,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IAE3D,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAChC,iBAAiB,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;IAEpD,IAAI,YAAY,CAAC;IACjB,IAAI,IAAI,KAAK,qCAA2B,CAAC,QAAQ,EAAE;QAEjD,MAAM,kBAAkB,GAAG,YAAK,CAAC,SAAS,CACxC,kBAAkB,CAAC,IAAI,CAAC,CAAC,QAAQ,CAClC,CAAC;QAEF,IAAI,CAAC,kBAAkB,EAAE;YACvB,OAAO,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;YAChD,OAAO;SACR;QAED,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAG,kBAAkB,CAAC;QAG3D,IAAI,cAAc,CAAC;QACnB,IAAI,mBAAmB,IAAI,KAAK,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE;YAC7D,cAAc,GAAG,mBAAmB,CAAC;SACtC;aAAM;YACL,MAAM,SAAS,GAAG,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC;YAC/C,cAAc,GAAG,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;SAC/C;QAED,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC3B,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;QAGH,SAAS,CAAC,QAAQ,EAAE,CAAC;QACrB,YAAY;YACV,iBAAiB,CAAC,+BAA+B,CAAC,cAAc,CAAC,CAAC;KACrE;SAAM;QACL,MAAM,IAAI,KAAK,CACb,kDAAkD,IAAI,oBAAoB,CAC3E,CAAC;KACH;IAED,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;QACnC,IAAA,mCAAyB,EAAC,WAAW,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,0BAA0B,CAAC"}
|
|
@@ -4,7 +4,7 @@ const segmentationState_1 = require("../../stateManagement/segmentation/segmenta
|
|
|
4
4
|
const triggerSegmentationEvents_1 = require("../../stateManagement/segmentation/triggerSegmentationEvents");
|
|
5
5
|
const segmentationModifiedListener = function (evt) {
|
|
6
6
|
const { segmentationId } = evt.detail;
|
|
7
|
-
const toolGroupIds = (0, segmentationState_1.
|
|
7
|
+
const toolGroupIds = (0, segmentationState_1.getToolGroupIdsWithSegmentation)(segmentationId);
|
|
8
8
|
toolGroupIds.forEach((toolGroupId) => {
|
|
9
9
|
const segRepresentations = (0, segmentationState_1.getSegmentationRepresentations)(toolGroupId);
|
|
10
10
|
segRepresentations.forEach((representation) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmentationModifiedEventListener.js","sourceRoot":"","sources":["../../../../src/eventListeners/segmentation/segmentationModifiedEventListener.ts"],"names":[],"mappings":";;AACA,4FAG8D;AAC9D,4GAAyH;AAMzH,MAAM,4BAA4B,GAAG,UACnC,GAAkC;IAElC,MAAM,EAAE,cAAc,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IAEtC,MAAM,YAAY,GAAG,IAAA,
|
|
1
|
+
{"version":3,"file":"segmentationModifiedEventListener.js","sourceRoot":"","sources":["../../../../src/eventListeners/segmentation/segmentationModifiedEventListener.ts"],"names":[],"mappings":";;AACA,4FAG8D;AAC9D,4GAAyH;AAMzH,MAAM,4BAA4B,GAAG,UACnC,GAAkC;IAElC,MAAM,EAAE,cAAc,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IAEtC,MAAM,YAAY,GAAG,IAAA,mDAA+B,EAAC,cAAc,CAAC,CAAC;IAErE,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;QACnC,MAAM,kBAAkB,GAAG,IAAA,kDAA8B,EAAC,WAAW,CAAC,CAAC;QACvE,kBAAkB,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE;YAC5C,IAAI,cAAc,CAAC,cAAc,KAAK,cAAc,EAAE;gBACpD,IAAA,qEAAyC,EACvC,WAAW,EACX,cAAc,CAAC,6BAA6B,CAC7C,CAAC;aACH;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,4BAA4B,CAAC"}
|
package/dist/cjs/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.js
CHANGED
|
@@ -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
|
-
const triggerSegmentationRender_1 = __importDefault(require("../../utilities/triggerSegmentationRender"));
|
|
6
|
+
const triggerSegmentationRender_1 = __importDefault(require("../../utilities/segmentation/triggerSegmentationRender"));
|
|
7
7
|
const segmentationRepresentationModifiedListener = function (evt) {
|
|
8
8
|
const { toolGroupId } = evt.detail;
|
|
9
9
|
(0, triggerSegmentationRender_1.default)(toolGroupId);
|
package/dist/cjs/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmentationRepresentationModifiedEventListener.js","sourceRoot":"","sources":["../../../../src/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"segmentationRepresentationModifiedEventListener.js","sourceRoot":"","sources":["../../../../src/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.ts"],"names":[],"mappings":";;;;;AAAA,uHAA+F;AAO/F,MAAM,0CAA0C,GAAG,UACjD,GAAgD;IAEhD,MAAM,EAAE,WAAW,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IACnC,IAAA,mCAAyB,EAAC,WAAW,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF,kBAAe,0CAA0C,CAAC"}
|
package/dist/cjs/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.js
CHANGED
|
@@ -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
|
-
const triggerSegmentationRender_1 = __importDefault(require("../../utilities/triggerSegmentationRender"));
|
|
6
|
+
const triggerSegmentationRender_1 = __importDefault(require("../../utilities/segmentation/triggerSegmentationRender"));
|
|
7
7
|
const segmentationRepresentationRemovedEventListener = function (evt) {
|
|
8
8
|
const { toolGroupId, segmentationRepresentationUID } = evt.detail;
|
|
9
9
|
(0, triggerSegmentationRender_1.default)(toolGroupId);
|
package/dist/cjs/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmentationRepresentationRemovedEventListener.js","sourceRoot":"","sources":["../../../../src/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"segmentationRepresentationRemovedEventListener.js","sourceRoot":"","sources":["../../../../src/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.ts"],"names":[],"mappings":";;;;;AAAA,uHAA+F;AAO/F,MAAM,8CAA8C,GAAG,UACrD,GAA+C;IAE/C,MAAM,EAAE,WAAW,EAAE,6BAA6B,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IAElE,IAAA,mCAAyB,EAAC,WAAW,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF,kBAAe,8CAA8C,CAAC"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { init, destroy } from './init';
|
|
2
|
-
import { addTool, removeTool, ToolGroupManager, SynchronizerManager, Synchronizer, cancelActiveManipulations } from './store';
|
|
2
|
+
import { addTool, removeTool, state, ToolGroupManager, SynchronizerManager, Synchronizer, cancelActiveManipulations } from './store';
|
|
3
3
|
import * as CONSTANTS from './constants';
|
|
4
4
|
import * as synchronizers from './synchronizers';
|
|
5
5
|
import * as drawing from './drawingSvg';
|
|
@@ -10,4 +10,4 @@ import * as annotation from './stateManagement/annotation';
|
|
|
10
10
|
import * as segmentation from './stateManagement/segmentation';
|
|
11
11
|
import { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, MagnifyTool } 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, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, MagnifyTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, Types, 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, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, MagnifyTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
|
package/dist/cjs/index.js
CHANGED
|
@@ -23,13 +23,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.cursors = exports.utilities = exports.segmentation = exports.annotation = exports.drawing = exports.CONSTANTS = exports.Enums = exports.ToolGroupManager = exports.Types = exports.SynchronizerManager = exports.Synchronizer = exports.synchronizers = exports.BrushTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = exports.SphereScissorsTool = exports.CircleScissorsTool = exports.RectangleScissorsTool = exports.SegmentationDisplayTool = exports.MagnifyTool = exports.AngleTool = exports.ArrowAnnotateTool = exports.PlanarFreehandROITool = exports.BidirectionalTool = exports.EllipticalROITool = exports.RectangleROITool = exports.ProbeTool = exports.CrosshairsTool = exports.LengthTool = exports.MIPJumpToClickTool = exports.VolumeRotateMouseWheelTool = exports.StackScrollMouseWheelTool = exports.StackScrollTool = exports.ZoomTool = exports.WindowLevelTool = exports.DragProbeTool = exports.TrackballRotateTool = exports.PanTool = exports.AnnotationTool = exports.BaseTool = exports.cancelActiveManipulations = exports.removeTool = exports.addTool = exports.destroy = exports.init = void 0;
|
|
26
|
+
exports.cursors = exports.utilities = exports.segmentation = exports.annotation = exports.drawing = exports.CONSTANTS = exports.Enums = exports.ToolGroupManager = exports.state = exports.Types = exports.SynchronizerManager = exports.Synchronizer = exports.synchronizers = exports.BrushTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = exports.SphereScissorsTool = exports.CircleScissorsTool = exports.RectangleScissorsTool = exports.SegmentationDisplayTool = exports.MagnifyTool = exports.AngleTool = exports.ArrowAnnotateTool = exports.PlanarFreehandROITool = exports.BidirectionalTool = exports.EllipticalROITool = exports.RectangleROITool = exports.ProbeTool = exports.CrosshairsTool = exports.LengthTool = exports.MIPJumpToClickTool = exports.VolumeRotateMouseWheelTool = exports.StackScrollMouseWheelTool = exports.StackScrollTool = exports.ZoomTool = exports.WindowLevelTool = exports.DragProbeTool = exports.TrackballRotateTool = exports.PanTool = exports.AnnotationTool = exports.BaseTool = exports.cancelActiveManipulations = exports.removeTool = exports.addTool = exports.destroy = exports.init = void 0;
|
|
27
27
|
const init_1 = require("./init");
|
|
28
28
|
Object.defineProperty(exports, "init", { enumerable: true, get: function () { return init_1.init; } });
|
|
29
29
|
Object.defineProperty(exports, "destroy", { enumerable: true, get: function () { return init_1.destroy; } });
|
|
30
30
|
const store_1 = require("./store");
|
|
31
31
|
Object.defineProperty(exports, "addTool", { enumerable: true, get: function () { return store_1.addTool; } });
|
|
32
32
|
Object.defineProperty(exports, "removeTool", { enumerable: true, get: function () { return store_1.removeTool; } });
|
|
33
|
+
Object.defineProperty(exports, "state", { enumerable: true, get: function () { return store_1.state; } });
|
|
33
34
|
Object.defineProperty(exports, "ToolGroupManager", { enumerable: true, get: function () { return store_1.ToolGroupManager; } });
|
|
34
35
|
Object.defineProperty(exports, "SynchronizerManager", { enumerable: true, get: function () { return store_1.SynchronizerManager; } });
|
|
35
36
|
Object.defineProperty(exports, "Synchronizer", { enumerable: true, get: function () { return store_1.Synchronizer; } });
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAuC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAuC;AAyDrC,qFAzDO,WAAI,OAyDP;AACJ,wFA1Da,cAAO,OA0Db;AAzDT,mCAQiB;AAkDf,wFAzDA,eAAO,OAyDA;AACP,2FAzDA,kBAAU,OAyDA;AAwCV,sFAhGA,aAAK,OAgGA;AAEL,iGAjGA,wBAAgB,OAiGA;AAJhB,oGA5FA,2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|
|
|
41
41
|
this.config = Object.assign(Object.assign({}, this.config), { annotations: {} });
|
|
42
42
|
annotationSpecificStyles = this.config.annotations;
|
|
43
43
|
}
|
|
44
|
-
if (annotationSpecificStyles[annotationUID]) {
|
|
45
|
-
console.warn('overriding annotation styles for annotationUID:', annotationUID);
|
|
46
|
-
}
|
|
47
44
|
annotationSpecificStyles[annotationUID] = styles;
|
|
48
45
|
}
|
|
49
46
|
setViewportToolStyles(viewportId, styles) {
|
|
@@ -52,9 +49,6 @@ class ToolStyle {
|
|
|
52
49
|
this.config = Object.assign(Object.assign({}, this.config), { viewports: {} });
|
|
53
50
|
viewportSpecificStyles = this.config.viewports;
|
|
54
51
|
}
|
|
55
|
-
if (viewportSpecificStyles[viewportId]) {
|
|
56
|
-
console.warn('overriding viewport styles for viewportId:', viewportId);
|
|
57
|
-
}
|
|
58
52
|
viewportSpecificStyles[viewportId] = styles;
|
|
59
53
|
}
|
|
60
54
|
setToolGroupToolStyles(toolGroupId, styles) {
|
|
@@ -63,9 +57,6 @@ class ToolStyle {
|
|
|
63
57
|
this.config = Object.assign(Object.assign({}, this.config), { toolGroups: {} });
|
|
64
58
|
toolGroupSpecificStyles = this.config.toolGroups;
|
|
65
59
|
}
|
|
66
|
-
if (toolGroupSpecificStyles[toolGroupId]) {
|
|
67
|
-
console.warn('overriding toolGroup styles for toolGroupId:', toolGroupId);
|
|
68
|
-
}
|
|
69
60
|
toolGroupSpecificStyles[toolGroupId] = styles;
|
|
70
61
|
}
|
|
71
62
|
setDefaultToolStyles(styles) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolStyle.js","sourceRoot":"","sources":["../../../../../src/stateManagement/annotation/config/ToolStyle.ts"],"names":[],"mappings":";;AAyBA,MAAM,SAAS;IAGb;QACE,MAAM,aAAa,GAAG;YACpB,KAAK,EAAE,kBAAkB;YACzB,gBAAgB,EAAE,gBAAgB;YAClC,aAAa,EAAE,gBAAgB;YAC/B,WAAW,EAAE,kBAAk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ACF;SACF;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAEjD,IAAI,YAAY,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE;YAC9D,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC;SACzC;QAED,IAAI,YAAY,CAAC,MAAM,IAAI,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;YACxD,OAAO,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;SACtC;IACH,CAAC;IAEO,iBAAiB,CAAC,MAAM;QAC9B,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE;YACzB,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;SACjC;QAED,IAAI,CAAC,MAAM,GAAG;YACZ,OAAO,EAAE;gBACP,MAAM,EAAE,UAA6B;aACtC;SACF,CAAC;IACJ,CAAC;CACF;AAED,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;AAElC,kBAAe,SAAS,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SegmentationState, ColorLUT, Segmentation, ToolGroupSpecificRepresentation, SegmentationRepresentationConfig, ToolGroupSpecificRepresentations } from '../../types/SegmentationStateTypes';
|
|
1
|
+
import type { SegmentationState, ColorLUT, Segmentation, ToolGroupSpecificRepresentation, SegmentationRepresentationConfig, ToolGroupSpecificRepresentations, RepresentationConfig, SegmentSpecificRepresentationConfig } from '../../types/SegmentationStateTypes';
|
|
2
2
|
export default class SegmentationStateManager {
|
|
3
3
|
private state;
|
|
4
4
|
readonly uid: string;
|
|
@@ -18,8 +18,13 @@ export default class SegmentationStateManager {
|
|
|
18
18
|
removeSegmentationRepresentation(toolGroupId: string, segmentationRepresentationUID: string): void;
|
|
19
19
|
setActiveSegmentationRepresentation(toolGroupId: string, segmentationRepresentationUID: string): void;
|
|
20
20
|
getToolGroupSpecificConfig(toolGroupId: string): SegmentationRepresentationConfig | undefined;
|
|
21
|
+
getSegmentationRepresentationSpecificConfig(toolGroupId: string, segmentationRepresentationUID: string): RepresentationConfig;
|
|
22
|
+
setSegmentationRepresentationSpecificConfig(toolGroupId: string, segmentationRepresentationUID: string, config: RepresentationConfig): void;
|
|
23
|
+
getSegmentSpecificConfig(toolGroupId: string, segmentationRepresentationUID: string, segmentIndex: number): RepresentationConfig;
|
|
24
|
+
setSegmentSpecificConfig(toolGroupId: string, segmentationRepresentationUID: string, config: SegmentSpecificRepresentationConfig): void;
|
|
21
25
|
setSegmentationRepresentationConfig(toolGroupId: string, config: SegmentationRepresentationConfig): void;
|
|
22
26
|
addColorLUT(colorLUT: ColorLUT, lutIndex: number): void;
|
|
27
|
+
removeColorLUT(colorLUTIndex: number): void;
|
|
23
28
|
_handleActiveSegmentation(toolGroupId: string, recentlyAddedOrRemovedSegmentationRepresentation: ToolGroupSpecificRepresentation): void;
|
|
24
29
|
_initDefaultColorLUTIfNecessary(): void;
|
|
25
30
|
}
|
|
@@ -7,13 +7,19 @@ exports.defaultSegmentationStateManager = void 0;
|
|
|
7
7
|
const lodash_clonedeep_1 = __importDefault(require("lodash.clonedeep"));
|
|
8
8
|
const core_1 = require("@cornerstonejs/core");
|
|
9
9
|
const COLOR_LUT_1 = __importDefault(require("../../constants/COLOR_LUT"));
|
|
10
|
+
const labelmapConfig_1 = __importDefault(require("../../tools/displayTools/Labelmap/labelmapConfig"));
|
|
11
|
+
const enums_1 = require("../../enums");
|
|
12
|
+
const defaultLabelmapConfig = (0, labelmapConfig_1.default)();
|
|
13
|
+
const newGlobalConfig = {
|
|
14
|
+
renderInactiveSegmentations: true,
|
|
15
|
+
representations: {
|
|
16
|
+
[enums_1.SegmentationRepresentations.Labelmap]: defaultLabelmapConfig,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
10
19
|
const initialDefaultState = {
|
|
11
20
|
colorLUT: [],
|
|
12
21
|
segmentations: [],
|
|
13
|
-
globalConfig:
|
|
14
|
-
renderInactiveSegmentations: true,
|
|
15
|
-
representations: {},
|
|
16
|
-
},
|
|
22
|
+
globalConfig: newGlobalConfig,
|
|
17
23
|
toolGroups: {},
|
|
18
24
|
};
|
|
19
25
|
class SegmentationStateManager {
|
|
@@ -113,6 +119,35 @@ class SegmentationStateManager {
|
|
|
113
119
|
}
|
|
114
120
|
return toolGroupStateWithConfig.config;
|
|
115
121
|
}
|
|
122
|
+
getSegmentationRepresentationSpecificConfig(toolGroupId, segmentationRepresentationUID) {
|
|
123
|
+
const segmentationRepresentation = this.getSegmentationRepresentationByUID(toolGroupId, segmentationRepresentationUID);
|
|
124
|
+
if (!segmentationRepresentation) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
return segmentationRepresentation.segmentationRepresentationSpecificConfig;
|
|
128
|
+
}
|
|
129
|
+
setSegmentationRepresentationSpecificConfig(toolGroupId, segmentationRepresentationUID, config) {
|
|
130
|
+
const segmentationRepresentation = this.getSegmentationRepresentationByUID(toolGroupId, segmentationRepresentationUID);
|
|
131
|
+
if (!segmentationRepresentation) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
segmentationRepresentation.segmentationRepresentationSpecificConfig =
|
|
135
|
+
config;
|
|
136
|
+
}
|
|
137
|
+
getSegmentSpecificConfig(toolGroupId, segmentationRepresentationUID, segmentIndex) {
|
|
138
|
+
const segmentationRepresentation = this.getSegmentationRepresentationByUID(toolGroupId, segmentationRepresentationUID);
|
|
139
|
+
if (!segmentationRepresentation) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
return segmentationRepresentation.segmentSpecificConfig[segmentIndex];
|
|
143
|
+
}
|
|
144
|
+
setSegmentSpecificConfig(toolGroupId, segmentationRepresentationUID, config) {
|
|
145
|
+
const segmentationRepresentation = this.getSegmentationRepresentationByUID(toolGroupId, segmentationRepresentationUID);
|
|
146
|
+
if (!segmentationRepresentation) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
segmentationRepresentation.segmentSpecificConfig = config;
|
|
150
|
+
}
|
|
116
151
|
setSegmentationRepresentationConfig(toolGroupId, config) {
|
|
117
152
|
let toolGroupStateWithConfig = this.state.toolGroups[toolGroupId];
|
|
118
153
|
if (!toolGroupStateWithConfig) {
|
|
@@ -133,6 +168,9 @@ class SegmentationStateManager {
|
|
|
133
168
|
}
|
|
134
169
|
this.state.colorLUT[lutIndex] = colorLUT;
|
|
135
170
|
}
|
|
171
|
+
removeColorLUT(colorLUTIndex) {
|
|
172
|
+
delete this.state.colorLUT[colorLUTIndex];
|
|
173
|
+
}
|
|
136
174
|
_handleActiveSegmentation(toolGroupId, recentlyAddedOrRemovedSegmentationRepresentation) {
|
|
137
175
|
const segmentationRepresentations = this.getSegmentationRepresentations(toolGroupId);
|
|
138
176
|
if (segmentationRepresentations.length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentationStateManager.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/SegmentationStateManager.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAyC;AACzC,8CAA2D;AAE3D,0EAA8D;AAY9D,MAAM,mBAAmB,GAAsB;IAC7C,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,EAAE;IACjB,YAAY,EAAE
|
|
1
|
+
{"version":3,"file":"SegmentationStateManager.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/SegmentationStateManager.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAyC;AACzC,8CAA2D;AAE3D,0EAA8D;AAY9D,sGAAwF;AACxF,uCAA0D;AAI1D,MAAM,qBAAqB,GAAG,IAAA,wBAAwB,GAAE,CAAC;AAEzD,MAAM,eAAe,GAAqC;IACxD,2BAA2B,EAAE,IAAI;IACjC,eAAe,EAAE;QACf,CAAC,mCAA2B,CAAC,QAAQ,CAAC,EAAE,qBAAqB;KAC9D;CACF,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AAE;YAC5C,2BAA2B,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC;YAC7C,OAAO;SACR;QAGD,MAAM,iCAAiC,GACrC,2BAA2B,CAAC,MAAM,CAChC,CAAC,cAAc,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAC1C,CAAC;QAEJ,IAAI,iCAAiC,CAAC,MAAM,KAAK,CAAC,EAAE;YAClD,2BAA2B,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC;YAC7C,OAAO;SACR;QAID,IAAI,gDAAgD,CAAC,MAAM,EAAE;YAC3D,2BAA2B,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE;gBACrD,IACE,cAAc,CAAC,6BAA6B;oBAC5C,gDAAgD,CAAC,6BAA6B,EAC9E;oBACA,cAAc,CAAC,MAAM,GAAG,KAAK,CAAC;iBAC/B;YACH,CAAC,CAAC,CAAC;SACJ;IAGH,CAAC;IAED,+BAA+B;QAE7B,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC/D,IAAI,CAAC,WAAW,CAAC,mBAAiC,EAAE,CAAC,CAAC,CAAC;SACxD;IACH,CAAC;CACF;AA5bD,2CA4bC;AAED,MAAM,+BAA+B,GAAG,IAAI,wBAAwB,CAAC,SAAS,CAAC,CAAC;AACvE,0EAA+B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as color from './segmentationColor';
|
|
2
2
|
import * as visibility from './segmentationVisibility';
|
|
3
|
-
import { getGlobalConfig, getGlobalRepresentationConfig, getToolGroupSpecificConfig, setGlobalConfig, setGlobalRepresentationConfig, setToolGroupSpecificConfig } from './segmentationConfig';
|
|
4
|
-
export { color, visibility, getGlobalConfig, getGlobalRepresentationConfig, getToolGroupSpecificConfig, setGlobalConfig, setGlobalRepresentationConfig, setToolGroupSpecificConfig, };
|
|
3
|
+
import { getGlobalConfig, getGlobalRepresentationConfig, getToolGroupSpecificConfig, setGlobalConfig, setGlobalRepresentationConfig, setToolGroupSpecificConfig, setSegmentSpecificConfig, getSegmentSpecificConfig, setSegmentationRepresentationSpecificConfig, getSegmentationRepresentationSpecificConfig } from './segmentationConfig';
|
|
4
|
+
export { color, visibility, getGlobalConfig, getGlobalRepresentationConfig, getToolGroupSpecificConfig, setGlobalConfig, setGlobalRepresentationConfig, setToolGroupSpecificConfig, setSegmentSpecificConfig, getSegmentSpecificConfig, setSegmentationRepresentationSpecificConfig, getSegmentationRepresentationSpecificConfig, };
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.setToolGroupSpecificConfig = exports.setGlobalRepresentationConfig = exports.setGlobalConfig = exports.getToolGroupSpecificConfig = exports.getGlobalRepresentationConfig = exports.getGlobalConfig = exports.visibility = exports.color = void 0;
|
|
26
|
+
exports.getSegmentationRepresentationSpecificConfig = exports.setSegmentationRepresentationSpecificConfig = exports.getSegmentSpecificConfig = exports.setSegmentSpecificConfig = exports.setToolGroupSpecificConfig = exports.setGlobalRepresentationConfig = exports.setGlobalConfig = exports.getToolGroupSpecificConfig = exports.getGlobalRepresentationConfig = exports.getGlobalConfig = exports.visibility = exports.color = void 0;
|
|
27
27
|
const color = __importStar(require("./segmentationColor"));
|
|
28
28
|
exports.color = color;
|
|
29
29
|
const visibility = __importStar(require("./segmentationVisibility"));
|
|
@@ -35,4 +35,8 @@ Object.defineProperty(exports, "getToolGroupSpecificConfig", { enumerable: true,
|
|
|
35
35
|
Object.defineProperty(exports, "setGlobalConfig", { enumerable: true, get: function () { return segmentationConfig_1.setGlobalConfig; } });
|
|
36
36
|
Object.defineProperty(exports, "setGlobalRepresentationConfig", { enumerable: true, get: function () { return segmentationConfig_1.setGlobalRepresentationConfig; } });
|
|
37
37
|
Object.defineProperty(exports, "setToolGroupSpecificConfig", { enumerable: true, get: function () { return segmentationConfig_1.setToolGroupSpecificConfig; } });
|
|
38
|
+
Object.defineProperty(exports, "setSegmentSpecificConfig", { enumerable: true, get: function () { return segmentationConfig_1.setSegmentSpecificConfig; } });
|
|
39
|
+
Object.defineProperty(exports, "getSegmentSpecificConfig", { enumerable: true, get: function () { return segmentationConfig_1.getSegmentSpecificConfig; } });
|
|
40
|
+
Object.defineProperty(exports, "setSegmentationRepresentationSpecificConfig", { enumerable: true, get: function () { return segmentationConfig_1.setSegmentationRepresentationSpecificConfig; } });
|
|
41
|
+
Object.defineProperty(exports, "getSegmentationRepresentationSpecificConfig", { enumerable: true, get: function () { return segmentationConfig_1.getSegmentationRepresentationSpecificConfig; } });
|
|
38
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/stateManagement/segmentation/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA6C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/stateManagement/segmentation/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA6C;AAgB3C,sBAAK;AAfP,qEAAuD;AAgBrD,gCAAU;AAfZ,6DAW8B;AAK5B,gGAfA,oCAAe,OAeA;AACf,8GAfA,kDAA6B,OAeA;AAC7B,2GAfA,+CAA0B,OAeA;AAC1B,gGAfA,oCAAe,OAeA;AACf,8GAfA,kDAA6B,OAeA;AAC7B,2GAfA,+CAA0B,OAeA;AAC1B,yGAfA,6CAAwB,OAeA;AACxB,yGAfA,6CAAwB,OAeA;AACxB,4HAfA,gEAA2C,OAeA;AAC3C,4HAfA,gEAA2C,OAeA"}
|
|
@@ -3,4 +3,5 @@ import { ColorLUT } from '../../../types/SegmentationStateTypes';
|
|
|
3
3
|
declare function addColorLUT(colorLUT: ColorLUT, colorLUTIndex: number): void;
|
|
4
4
|
declare function setColorLUT(toolGroupId: string, segmentationRepresentationUID: string, colorLUTIndex: number): void;
|
|
5
5
|
declare function getColorForSegmentIndex(toolGroupId: string, segmentationRepresentationUID: string, segmentIndex: number): Color;
|
|
6
|
-
|
|
6
|
+
declare function setColorForSegmentIndex(toolGroupId: string, segmentationRepresentationUID: string, segmentIndex: number, color: Color): void;
|
|
7
|
+
export { getColorForSegmentIndex, addColorLUT, setColorLUT, setColorForSegmentIndex, };
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.setColorLUT = exports.addColorLUT = exports.getColorForSegmentIndex = void 0;
|
|
26
|
+
exports.setColorForSegmentIndex = exports.setColorLUT = exports.addColorLUT = exports.getColorForSegmentIndex = void 0;
|
|
27
27
|
const core_1 = require("@cornerstonejs/core");
|
|
28
28
|
const SegmentationState = __importStar(require("../../../stateManagement/segmentation/segmentationState"));
|
|
29
29
|
const triggerSegmentationEvents_1 = require("../triggerSegmentationEvents");
|
|
@@ -60,4 +60,12 @@ function getColorForSegmentIndex(toolGroupId, segmentationRepresentationUID, seg
|
|
|
60
60
|
return colorLUT[segmentIndex];
|
|
61
61
|
}
|
|
62
62
|
exports.getColorForSegmentIndex = getColorForSegmentIndex;
|
|
63
|
+
function setColorForSegmentIndex(toolGroupId, segmentationRepresentationUID, segmentIndex, color) {
|
|
64
|
+
const colorReference = getColorForSegmentIndex(toolGroupId, segmentationRepresentationUID, segmentIndex);
|
|
65
|
+
for (let i = 0; i < color.length; i++) {
|
|
66
|
+
colorReference[i] = color[i];
|
|
67
|
+
}
|
|
68
|
+
(0, triggerSegmentationEvents_1.triggerSegmentationRepresentationModified)(toolGroupId, segmentationRepresentationUID);
|
|
69
|
+
}
|
|
70
|
+
exports.setColorForSegmentIndex = setColorForSegmentIndex;
|
|
63
71
|
//# sourceMappingURL=segmentationColor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmentationColor.js","sourceRoot":"","sources":["../../../../../src/stateManagement/segmentation/config/segmentationColor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgD;AAChD,2GAA6F;AAG7F,4EAAyF;AAUzF,SAAS,WAAW,CAAC,QAAkB,EAAE,aAAqB;IAC5D,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;KACtD;IAGD,IAAI,CAAC,gBAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;QACjD,OAAO,CAAC,IAAI,CACV,qHAAqH,CACtH,CAAC;QACF,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KAChC;IAED,iBAAiB,CAAC,WAAW,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AACzD,CAAC;
|
|
1
|
+
{"version":3,"file":"segmentationColor.js","sourceRoot":"","sources":["../../../../../src/stateManagement/segmentation/config/segmentationColor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgD;AAChD,2GAA6F;AAG7F,4EAAyF;AAUzF,SAAS,WAAW,CAAC,QAAkB,EAAE,aAAqB;IAC5D,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;KACtD;IAGD,IAAI,CAAC,gBAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;QACjD,OAAO,CAAC,IAA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nB,6BAAqC,EACrC,YAAoB,EACpB,KAAY;IAGZ,MAAM,cAAc,GAAG,uBAAuB,CAC5C,WAAW,EACX,6BAA6B,EAC7B,YAAY,CACb,CAAC;IAGF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,cAAc,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;KAC9B;IAED,IAAA,qEAAyC,EACvC,WAAW,EACX,6BAA6B,CAC9B,CAAC;AACJ,CAAC;AAMC,0DAAuB"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import SegmentationRepresentations from '../../../enums/SegmentationRepresentations';
|
|
2
|
-
import { RepresentationConfig, SegmentationRepresentationConfig } from '../../../types/SegmentationStateTypes';
|
|
2
|
+
import { RepresentationConfig, SegmentationRepresentationConfig, SegmentSpecificRepresentationConfig } from '../../../types/SegmentationStateTypes';
|
|
3
3
|
declare function getGlobalConfig(): SegmentationRepresentationConfig;
|
|
4
4
|
declare function setGlobalConfig(segmentationConfig: SegmentationRepresentationConfig): void;
|
|
5
5
|
declare function getGlobalRepresentationConfig(representationType: SegmentationRepresentations): RepresentationConfig['LABELMAP'];
|
|
6
6
|
declare function setGlobalRepresentationConfig(representationType: SegmentationRepresentations, config: RepresentationConfig['LABELMAP']): void;
|
|
7
7
|
declare function getToolGroupSpecificConfig(toolGroupId: string): SegmentationRepresentationConfig;
|
|
8
8
|
declare function setToolGroupSpecificConfig(toolGroupId: string, segmentationRepresentationConfig: SegmentationRepresentationConfig): void;
|
|
9
|
-
|
|
9
|
+
declare function getSegmentationRepresentationSpecificConfig(toolGroupId: string, segmentationRepresentationUID: string): RepresentationConfig;
|
|
10
|
+
declare function setSegmentationRepresentationSpecificConfig(toolGroupId: string, segmentationRepresentationUID: string, config: RepresentationConfig): void;
|
|
11
|
+
declare function getSegmentSpecificConfig(toolGroupId: string, segmentationRepresentationUID: string, segmentIndex: number): RepresentationConfig;
|
|
12
|
+
declare function setSegmentSpecificConfig(toolGroupId: string, segmentationRepresentationUID: string, config: SegmentSpecificRepresentationConfig): void;
|
|
13
|
+
export { getGlobalConfig, setGlobalConfig, getGlobalRepresentationConfig, setGlobalRepresentationConfig, getToolGroupSpecificConfig, setToolGroupSpecificConfig, getSegmentationRepresentationSpecificConfig, setSegmentationRepresentationSpecificConfig, getSegmentSpecificConfig, setSegmentSpecificConfig, };
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.setToolGroupSpecificConfig = exports.getToolGroupSpecificConfig = exports.setGlobalRepresentationConfig = exports.getGlobalRepresentationConfig = exports.setGlobalConfig = exports.getGlobalConfig = void 0;
|
|
26
|
+
exports.setSegmentSpecificConfig = exports.getSegmentSpecificConfig = exports.setSegmentationRepresentationSpecificConfig = exports.getSegmentationRepresentationSpecificConfig = exports.setToolGroupSpecificConfig = exports.getToolGroupSpecificConfig = exports.setGlobalRepresentationConfig = exports.getGlobalRepresentationConfig = exports.setGlobalConfig = exports.getGlobalConfig = void 0;
|
|
27
27
|
const SegmentationState = __importStar(require("../../../stateManagement/segmentation/segmentationState"));
|
|
28
28
|
function getGlobalConfig() {
|
|
29
29
|
return SegmentationState.getGlobalConfig();
|
|
@@ -40,7 +40,7 @@ function getGlobalRepresentationConfig(representationType) {
|
|
|
40
40
|
exports.getGlobalRepresentationConfig = getGlobalRepresentationConfig;
|
|
41
41
|
function setGlobalRepresentationConfig(representationType, config) {
|
|
42
42
|
const globalConfig = getGlobalConfig();
|
|
43
|
-
setGlobalConfig(Object.assign(Object.assign({}, globalConfig), { representations: Object.assign(Object.assign({}, globalConfig.representations), { [representationType]: config }) }));
|
|
43
|
+
setGlobalConfig(Object.assign(Object.assign({}, globalConfig), { representations: Object.assign(Object.assign({}, globalConfig.representations), { [representationType]: Object.assign(Object.assign({}, globalConfig.representations[representationType]), config) }) }));
|
|
44
44
|
}
|
|
45
45
|
exports.setGlobalRepresentationConfig = setGlobalRepresentationConfig;
|
|
46
46
|
function getToolGroupSpecificConfig(toolGroupId) {
|
|
@@ -51,4 +51,20 @@ function setToolGroupSpecificConfig(toolGroupId, segmentationRepresentationConfi
|
|
|
51
51
|
SegmentationState.setToolGroupSpecificConfig(toolGroupId, segmentationRepresentationConfig);
|
|
52
52
|
}
|
|
53
53
|
exports.setToolGroupSpecificConfig = setToolGroupSpecificConfig;
|
|
54
|
+
function getSegmentationRepresentationSpecificConfig(toolGroupId, segmentationRepresentationUID) {
|
|
55
|
+
return SegmentationState.getSegmentationRepresentationSpecificConfig(toolGroupId, segmentationRepresentationUID);
|
|
56
|
+
}
|
|
57
|
+
exports.getSegmentationRepresentationSpecificConfig = getSegmentationRepresentationSpecificConfig;
|
|
58
|
+
function setSegmentationRepresentationSpecificConfig(toolGroupId, segmentationRepresentationUID, config) {
|
|
59
|
+
SegmentationState.setSegmentationRepresentationSpecificConfig(toolGroupId, segmentationRepresentationUID, config);
|
|
60
|
+
}
|
|
61
|
+
exports.setSegmentationRepresentationSpecificConfig = setSegmentationRepresentationSpecificConfig;
|
|
62
|
+
function getSegmentSpecificConfig(toolGroupId, segmentationRepresentationUID, segmentIndex) {
|
|
63
|
+
return SegmentationState.getSegmentSpecificRepresentationConfig(toolGroupId, segmentationRepresentationUID, segmentIndex);
|
|
64
|
+
}
|
|
65
|
+
exports.getSegmentSpecificConfig = getSegmentSpecificConfig;
|
|
66
|
+
function setSegmentSpecificConfig(toolGroupId, segmentationRepresentationUID, config) {
|
|
67
|
+
SegmentationState.setSegmentSpecificRepresentationConfig(toolGroupId, segmentationRepresentationUID, config);
|
|
68
|
+
}
|
|
69
|
+
exports.setSegmentSpecificConfig = setSegmentSpecificConfig;
|
|
54
70
|
//# sourceMappingURL=segmentationConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmentationConfig.js","sourceRoot":"","sources":["../../../../../src/stateManagement/segmentation/config/segmentationConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2GAA6F;
|
|
1
|
+
{"version":3,"file":"segmentationConfig.js","sourceRoot":"","sources":["../../../../../src/stateManagement/segmentation/config/segmentationConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2GAA6F;AAa7F,SAAS,eAAe;IACtB,OAAO,iBAAiB,CAAC,eAAe,EAAE,CAAC;AAC7C,CAAC;AAqKC,0CAAe;AA/JjB,SAAS,eAAe,CACtB,kBAAoD;IAEpD,iBAAiB,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;AACxD,CAAC;AA4JC,0CAAe;AArJjB,SAAS,6BAA6B,CACpC,kBAA+C;IAE/C,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,OAAO,YAAY,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;AAC1D,CAAC;AAiJC,sEAA6B;AAvI/B,SAAS,6BAA6B,CACpC,kBAA+C,EAC/C,MAAwC;IAExC,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,eAAe,iCACV,YAAY,KACf,eAAe,kCACV,YAAY,CAAC,eAAe,KAC/B,CAAC,kBAAkB,CAAC,kCACf,YAAY,CAAC,eAAe,CAAC,kBAAkB,CAAC,GAChD,MAAM,QAGb,CAAC;AACL,CAAC;AAwHC,sEAA6B;AAjH/B,SAAS,0BAA0B,CACjC,WAAmB;IAEnB,OAAO,iBAAiB,CAAC,0BAA0B,CAAC,WAAW,CAAC,CAAC;AACnE,CAAC;AA+GC,gEAA0B;AAtG5B,SAAS,0BAA0B,CACjC,WAAmB,EACnB,gCAAkE;IAElE,iBAAiB,CAAC,0BAA0B,CAC1C,WAAW,EACX,gCAAgC,CACjC,CAAC;AACJ,CAAC;AA+FC,gEAA0B;AAjF5B,SAAS,2CAA2C,CAClD,WAAmB,EACnB,6BAAqC;IAErC,OAAO,iBAAiB,CAAC,2CAA2C,CAClE,WAAW,EACX,6BAA6B,CAC9B,CAAC;AACJ,CAAC;AA2EC,kGAA2C;AA/D7C,SAAS,2CAA2C,CAClD,WAAmB,EACnB,6BAAqC,EACrC,MAA4B;IAE5B,iBAAiB,CAAC,2CAA2C,CAC3D,WAAW,EACX,6BAA6B,EAC7B,MAAM,CACP,CAAC;AACJ,CAAC;AAsDC,kGAA2C;AA5C7C,SAAS,wBAAwB,CAC/B,WAAmB,EACnB,6BAAqC,EACrC,YAAoB;IAEpB,OAAO,iBAAiB,CAAC,sCAAsC,CAC7D,WAAW,EACX,6BAA6B,EAC7B,YAAY,CACb,CAAC;AACJ,CAAC;AAoCC,4DAAwB;AAzB1B,SAAS,wBAAwB,CAC/B,WAAmB,EACnB,6BAAqC,EACrC,MAA2C;IAE3C,iBAAiB,CAAC,sCAAsC,CACtD,WAAW,EACX,6BAA6B,EAC7B,MAAM,CACP,CAAC;AACJ,CAAC;AAgBC,4DAAwB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
declare function setSegmentationVisibility(toolGroupId: string, segmentationRepresentationUID: string, visibility: boolean): void;
|
|
2
2
|
declare function getSegmentationVisibility(toolGroupId: string, segmentationRepresentationUID: string): boolean | undefined;
|
|
3
|
-
|
|
3
|
+
declare function setVisibilityForSegmentIndex(toolGroupId: string, segmentationRepresentationUID: string, segmentIndex: number, visibility: boolean): void;
|
|
4
|
+
export { setSegmentationVisibility, getSegmentationVisibility, setVisibilityForSegmentIndex, };
|
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSegmentationVisibility = exports.setSegmentationVisibility = void 0;
|
|
26
|
+
exports.setVisibilityForSegmentIndex = exports.getSegmentationVisibility = exports.setSegmentationVisibility = void 0;
|
|
4
27
|
const triggerSegmentationEvents_1 = require("../triggerSegmentationEvents");
|
|
5
28
|
const segmentationState_1 = require("../../../stateManagement/segmentation/segmentationState");
|
|
29
|
+
const SegmentationState = __importStar(require("../../../stateManagement/segmentation/segmentationState"));
|
|
6
30
|
function setSegmentationVisibility(toolGroupId, segmentationRepresentationUID, visibility) {
|
|
7
31
|
const toolGroupSegmentationRepresentations = (0, segmentationState_1.getSegmentationRepresentations)(toolGroupId);
|
|
8
32
|
if (!toolGroupSegmentationRepresentations) {
|
|
@@ -27,4 +51,18 @@ function getSegmentationVisibility(toolGroupId, segmentationRepresentationUID) {
|
|
|
27
51
|
return segmentationData.visibility;
|
|
28
52
|
}
|
|
29
53
|
exports.getSegmentationVisibility = getSegmentationVisibility;
|
|
54
|
+
function setVisibilityForSegmentIndex(toolGroupId, segmentationRepresentationUID, segmentIndex, visibility) {
|
|
55
|
+
const segRepresentation = SegmentationState.getSegmentationRepresentationByUID(toolGroupId, segmentationRepresentationUID);
|
|
56
|
+
if (!segRepresentation) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (visibility) {
|
|
60
|
+
segRepresentation.segmentsHidden.delete(segmentIndex);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
segRepresentation.segmentsHidden.add(segmentIndex);
|
|
64
|
+
}
|
|
65
|
+
(0, triggerSegmentationEvents_1.triggerSegmentationRepresentationModified)(toolGroupId, segmentationRepresentationUID);
|
|
66
|
+
}
|
|
67
|
+
exports.setVisibilityForSegmentIndex = setVisibilityForSegmentIndex;
|
|
30
68
|
//# sourceMappingURL=segmentationVisibility.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmentationVisibility.js","sourceRoot":"","sources":["../../../../../src/stateManagement/segmentation/config/segmentationVisibility.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"segmentationVisibility.js","sourceRoot":"","sources":["../../../../../src/stateManagement/segmentation/config/segmentationVisibility.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4EAAyF;AACzF,+FAAyG;AAEzG,2GAA6F;AAW7F,SAAS,yBAAyB,CAChC,WAAmB,EACnB,6BAAqC,EACrC,UAAmB;IAEnB,MAAM,oCAAoC,GACxC,IAAA,kDAA8B,EAAC,WAAW,CAAC,CAAC;IAE9C,IAAI,CAAC,oCAAoC,EAAE;QACzC,OAAO;KACR;IAED,oCAAoC,CAAC,OAAO,CAC1C,CAAC,cAA+C,EAAE,EAAE;QAClD,IACE,cAAc,CAAC,6BAA6B;YAC5C,6BAA6B,EAC7B;YACA,cAAc,CAAC,UAAU,GAAG,UAAU,CAAC;YACvC,IAAA,qEAAyC,EACvC,WAAW,EACX,cAAc,CAAC,6BAA6B,CAC7C,CAAC;SACH;IACH,CAAC,CACF,CAAC;AACJ,CAAC;AA4DC,8DAAyB;AAjD3B,SAAS,yBAAyB,CAChC,WAAmB,EACnB,6BAAqC;IAErC,MAAM,2BAA2B,GAC/B,IAAA,kDAA8B,EAAC,WAAW,CAAC,CAAC;IAE9C,MAAM,gBAAgB,GAAG,2BAA2B,CAAC,IAAI,CACvD,CAAC,cAA+C,EAAE,EAAE,CAClD,cAAc,CAAC,6BAA6B;QAC5C,6BAA6B,CAChC,CAAC;IAEF,IAAI,CAAC,gBAAgB,EAAE;QACrB,OAAO;KACR;IAED,OAAO,gBAAgB,CAAC,UAAU,CAAC;AACrC,CAAC;AAgCC,8DAAyB;AA9B3B,SAAS,4BAA4B,CACnC,WAAmB,EACnB,6BAAqC,EACrC,YAAoB,EACpB,UAAmB;IAEnB,MAAM,iBAAiB,GACrB,iBAAiB,CAAC,kCAAkC,CAClD,WAAW,EACX,6BAA6B,CAC9B,CAAC;IAEJ,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAO;KACR;IAED,IAAI,UAAU,EAAE;QACd,iBAAiB,CAAC,cAAc,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;KACvD;SAAM;QACL,iBAAiB,CAAC,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;KACpD;IAED,IAAA,qEAAyC,EACvC,WAAW,EACX,6BAA6B,CAC9B,CAAC;AACJ,CAAC;AAKC,oEAA4B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function removeSegmentationsFromToolGroup(toolGroupId: string, segmentationRepresentationUIDs?: string[] | undefined): void;
|
|
1
|
+
declare function removeSegmentationsFromToolGroup(toolGroupId: string, segmentationRepresentationUIDs?: string[] | undefined, immediate?: boolean): void;
|
|
2
2
|
export default removeSegmentationsFromToolGroup;
|
|
@@ -6,11 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const SegmentationRepresentations_1 = __importDefault(require("../../enums/SegmentationRepresentations"));
|
|
7
7
|
const Labelmap_1 = require("../../tools/displayTools/Labelmap");
|
|
8
8
|
const segmentationState_1 = require("./segmentationState");
|
|
9
|
-
function removeSegmentationsFromToolGroup(toolGroupId, segmentationRepresentationUIDs) {
|
|
9
|
+
function removeSegmentationsFromToolGroup(toolGroupId, segmentationRepresentationUIDs, immediate) {
|
|
10
10
|
const toolGroupSegRepresentations = (0, segmentationState_1.getSegmentationRepresentations)(toolGroupId);
|
|
11
|
-
if (!
|
|
12
|
-
|
|
13
|
-
console.warn('removeSegmentationsFromToolGroup: No segmentationRepresentations found for toolGroupId: ', toolGroupId);
|
|
11
|
+
if (!toolGroupSegRepresentations ||
|
|
12
|
+
toolGroupSegRepresentations.length === 0) {
|
|
14
13
|
return;
|
|
15
14
|
}
|
|
16
15
|
const toolGroupSegRepresentationUIDs = toolGroupSegRepresentations.map((representation) => representation.segmentationRepresentationUID);
|
|
@@ -25,14 +24,14 @@ function removeSegmentationsFromToolGroup(toolGroupId, segmentationRepresentatio
|
|
|
25
24
|
segRepresentationUIDsToRemove = toolGroupSegRepresentationUIDs;
|
|
26
25
|
}
|
|
27
26
|
segRepresentationUIDsToRemove.forEach((segmentationDataUID) => {
|
|
28
|
-
_removeSegmentation(toolGroupId, segmentationDataUID);
|
|
27
|
+
_removeSegmentation(toolGroupId, segmentationDataUID, immediate);
|
|
29
28
|
});
|
|
30
29
|
}
|
|
31
|
-
function _removeSegmentation(toolGroupId, segmentationRepresentationUID) {
|
|
30
|
+
function _removeSegmentation(toolGroupId, segmentationRepresentationUID, immediate) {
|
|
32
31
|
const segmentationRepresentation = (0, segmentationState_1.getSegmentationRepresentationByUID)(toolGroupId, segmentationRepresentationUID);
|
|
33
32
|
const { type } = segmentationRepresentation;
|
|
34
33
|
if (type === SegmentationRepresentations_1.default.Labelmap) {
|
|
35
|
-
Labelmap_1.labelmapDisplay.removeSegmentationRepresentation(toolGroupId, segmentationRepresentationUID);
|
|
34
|
+
Labelmap_1.labelmapDisplay.removeSegmentationRepresentation(toolGroupId, segmentationRepresentationUID, immediate);
|
|
36
35
|
}
|
|
37
36
|
else {
|
|
38
37
|
throw new Error(`The representation ${type} is not supported yet`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeSegmentationsFromToolGroup.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/removeSegmentationsFromToolGroup.ts"],"names":[],"mappings":";;;;;AAAA,0GAAkF;AAClF,gEAAoE;AAEpE,2DAG6B;
|
|
1
|
+
{"version":3,"file":"removeSegmentationsFromToolGroup.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/removeSegmentationsFromToolGroup.ts"],"names":[],"mappings":";;;;;AAAA,0GAAkF;AAClF,gEAAoE;AAEpE,2DAG6B;AAQ7B,SAAS,gCAAgC,CACvC,WAAmB,EACnB,8BAAqD,EACrD,SAAmB;IAEnB,MAAM,2BAA2B,GAC/B,IAAA,kDAA8B,EAAC,WAAW,CAAC,CAAC;IAE9C,IACE,CAAC,2BAA2B;QAC5B,2BAA2B,CAAC,MAAM,KAAK,CAAC,EACxC;QACA,OAAO;KACR;IAED,MAAM,8BAA8B,GAAG,2BAA2B,CAAC,GAAG,CACpE,CAAC,cAAc,EAAE,EAAE,CAAC,cAAc,CAAC,6BAA6B,CACjE,CAAC;IAEF,IAAI,6BAA6B,GAAG,8BAA8B,CAAC;IACnE,IAAI,6BAA6B,EAAE;QAGjC,MAAM,4BAA4B,GAAG,8BAA8B,CAAC,MAAM,CACxE,CAAC,oBAAoB,EAAE,EAAE,CACvB,CAAC,8BAA8B,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CACjE,CAAC;QAEF,IAAI,4BAA4B,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3C,MAAM,IAAI,KAAK,CACb,+EAA+E,IAAI,CAAC,SAAS,CAC3F,4BAA4B,CAC7B,EAAE,CACJ,CAAC;SACH;KACF;SAAM;QAEL,6BAA6B,GAAG,8BAA8B,CAAC;KAChE;IAED,6BAA6B,C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