@ohif/app 3.9.1 → 3.9.3

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 (51) hide show
  1. package/dist/{1185.bundle.023fe7179faaa50019d3.js → 1185.bundle.9f4c770baf52abcf3c6d.js} +120 -53
  2. package/dist/{1266.bundle.e9abd5c45b5236544151.js → 1266.bundle.0097d9c4ba974905a833.js} +8 -3
  3. package/dist/{1374.bundle.019bbc010eeb66109e8b.js → 1374.bundle.2e1fa65e28731d98969a.js} +2 -2
  4. package/dist/{1436.bundle.773756cd51b69e887bac.js → 1436.bundle.be39664239aa2bbca527.js} +234 -274
  5. package/dist/{1927.bundle.49539e3ab5b0aad1399c.js → 1927.bundle.2b2fa0b539d6ac5b0dc3.js} +1 -1
  6. package/dist/{213.bundle.e663335fb0884edde6d8.js → 213.bundle.c0c23f7fd4b66d78d0fe.js} +2 -2
  7. package/dist/{5807.bundle.dac5ce36534a71c77723.js → 2343.bundle.f096450c21417279d4cc.js} +270 -1
  8. package/dist/{2424.bundle.b7da298db43541d3a7c0.js → 2424.bundle.d73e8d67dc2aace299d2.js} +2 -2
  9. package/dist/{2701.bundle.8c1ff2e0faaa7d2f4716.js → 2701.bundle.c8271fa4986a45fea350.js} +17 -24
  10. package/dist/{2825.bundle.b04c941a87fd580deb6d.js → 2825.bundle.0612b1b8ab3e8ee01b93.js} +1 -1
  11. package/dist/{3198.bundle.c82b7424070ffd02faf1.js → 3198.bundle.7a18515cfe4113417251.js} +10 -6
  12. package/dist/{3200.bundle.a12825fb5aec200d33e2.js → 3200.bundle.e46dca03aa824998973a.js} +18 -10
  13. package/dist/3326.bundle.d01046d6c2c31654c125.js +265 -0
  14. package/dist/{149.bundle.ce5596fc563276036744.js → 3900.bundle.0e4e29374e221b260ed1.js} +35 -59
  15. package/dist/{8295.bundle.4ecb27f9e58526f12bcb.js → 3902.bundle.8ae7b2e27f760af997dd.js} +20 -1
  16. package/dist/3902.css +2 -0
  17. package/dist/{4202.bundle.5c8120ed4841da0af211.js → 4202.bundle.497702023d73202f4f39.js} +2 -1
  18. package/dist/{3121.bundle.d3e7092e305cf6cecdb5.js → 4438.bundle.a945f803d0eeb11d081f.js} +24 -4
  19. package/dist/{4571.bundle.3b1691730b3c57bf4d35.js → 4571.bundle.a37be49663df2f4a2c8a.js} +99 -89
  20. package/dist/4759.bundle.1e982897292fc19ecd7c.js +265 -0
  21. package/dist/{4834.bundle.aad44c2628cdefb7a4dd.js → 4834.bundle.92ba088cc62a6b791000.js} +2 -2
  22. package/dist/{5139.bundle.367a6827071448e2923d.js → 5139.bundle.70d3be7dd1896f245d7b.js} +3 -3
  23. package/dist/{5247.bundle.6dc2a50f21821b2ffdf5.js → 5247.bundle.4e8669e41fd28813e643.js} +5 -5
  24. package/dist/{5252.bundle.5ec502c53a9cc877ed8d.js → 5252.bundle.f2675336275573a288d5.js} +13 -1
  25. package/dist/{1520.bundle.97dbd9bfa83148e5334d.js → 5630.bundle.44d0ca81d77b7ae5193b.js} +63 -58
  26. package/dist/{5687.bundle.5731ec23dd9eb43a083e.js → 5687.bundle.50b800a714486557b243.js} +5 -5
  27. package/dist/{5717.bundle.848e13f256818475f57f.js → 5717.bundle.9218cb67ad1994cd1a99.js} +305 -64
  28. package/dist/{3970.bundle.31942cc0c12a008e7ba0.js → 5758.bundle.cd1599b81bdb1f735f9d.js} +270 -1
  29. package/dist/{717.bundle.0f32b7b57347b5141248.js → 7013.bundle.979d3a29f6142e8c1290.js} +264 -4
  30. package/dist/7013.css +4 -0
  31. package/dist/{7197.bundle.c28453cdb392072d8bf8.js → 7197.bundle.30f8969751309ab5235c.js} +6 -6
  32. package/dist/{7955.bundle.6a255705b1ef5906f4a8.js → 7955.bundle.9264a10437f0a67e6057.js} +3 -3
  33. package/dist/{8008.bundle.5bf7b274246be10e2f05.js → 8008.bundle.6772a210a995b568f8d0.js} +2 -2
  34. package/dist/{8228.bundle.55ac03d7165248f47d4e.js → 8228.bundle.2c1e61eec1f9f4b3b613.js} +8 -26
  35. package/dist/{8259.bundle.623c29b26b170a8a085b.js → 8259.bundle.9cf9ef151893ede068bb.js} +2 -2
  36. package/dist/{8523.bundle.648334132159465cdc41.js → 8523.bundle.c0ec85de98ba380ebeb4.js} +55 -13
  37. package/dist/{8558.bundle.01d05fd73da5db8e60f9.js → 8558.bundle.9c22f000a404f1006a41.js} +10 -5
  38. package/dist/{9551.bundle.6c260a9869e14dcc3543.js → 9551.bundle.3507bb1d4353df13bf3a.js} +3 -3
  39. package/dist/{9611.bundle.767595c93877e5166c03.js → 9611.bundle.9f1aa9041196d77f2b7e.js} +2 -2
  40. package/dist/{app.bundle.d02143bec2df7fec9964.js → app.bundle.9af5a6d7ff3a778d05b7.js} +278 -150
  41. package/dist/app.bundle.css +2 -2
  42. package/dist/index.html +1 -1
  43. package/dist/{polySeg.bundle.b79ae514989e86301c71.js → polySeg.bundle.6e85073e3abf2e6e6078.js} +1 -1
  44. package/dist/serve.json +1 -10
  45. package/dist/{suv-peak-worker.bundle.31c3b3b957204af93b7e.js → suv-peak-worker.bundle.e2e8e46de3e958a1a3db.js} +3 -3
  46. package/dist/sw.js +1 -1
  47. package/package.json +19 -19
  48. /package/dist/{1801.css → 3326.css} +0 -0
  49. /package/dist/{717.css → 4438.css} +0 -0
  50. /package/dist/{2591.css → 4759.css} +0 -0
  51. /package/dist/{9862.bundle.7146682e56aa66130ae6.js → 9862.bundle.aa2f8e0010f1be1bc87d.js} +0 -0
@@ -2498,217 +2498,6 @@ function drawRedactionRect(svgDrawingHelper, annotationUID, rectangleUID, start,
2498
2498
 
2499
2499
 
2500
2500
 
2501
-
2502
- /***/ }),
2503
-
2504
- /***/ 75183:
2505
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2506
-
2507
- "use strict";
2508
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2509
- /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
2510
- /* harmony export */ });
2511
- var ChangeTypes;
2512
- (function (ChangeTypes) {
2513
- ChangeTypes["Interaction"] = "Interaction";
2514
- ChangeTypes["HandlesUpdated"] = "HandlesUpdated";
2515
- ChangeTypes["StatsUpdated"] = "StatsUpdated";
2516
- ChangeTypes["InitialSetup"] = "InitialSetup";
2517
- ChangeTypes["Completed"] = "Completed";
2518
- ChangeTypes["InterpolationUpdated"] = "InterpolationUpdated";
2519
- })(ChangeTypes || (ChangeTypes = {}));
2520
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChangeTypes);
2521
-
2522
-
2523
- /***/ }),
2524
-
2525
- /***/ 94021:
2526
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2527
-
2528
- "use strict";
2529
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2530
- /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
2531
- /* harmony export */ });
2532
- var Events;
2533
- (function (Events) {
2534
- Events["TOOL_ACTIVATED"] = "CORNERSTONE_TOOLS_TOOL_ACTIVATED";
2535
- Events["TOOLGROUP_VIEWPORT_ADDED"] = "CORNERSTONE_TOOLS_TOOLGROUP_VIEWPORT_ADDED";
2536
- Events["TOOLGROUP_VIEWPORT_REMOVED"] = "CORNERSTONE_TOOLS_TOOLGROUP_VIEWPORT_REMOVED";
2537
- Events["TOOL_MODE_CHANGED"] = "CORNERSTONE_TOOLS_TOOL_MODE_CHANGED";
2538
- Events["ANNOTATION_ADDED"] = "CORNERSTONE_TOOLS_ANNOTATION_ADDED";
2539
- Events["ANNOTATION_COMPLETED"] = "CORNERSTONE_TOOLS_ANNOTATION_COMPLETED";
2540
- Events["ANNOTATION_MODIFIED"] = "CORNERSTONE_TOOLS_ANNOTATION_MODIFIED";
2541
- Events["ANNOTATION_REMOVED"] = "CORNERSTONE_TOOLS_ANNOTATION_REMOVED";
2542
- Events["ANNOTATION_SELECTION_CHANGE"] = "CORNERSTONE_TOOLS_ANNOTATION_SELECTION_CHANGE";
2543
- Events["ANNOTATION_LOCK_CHANGE"] = "CORNERSTONE_TOOLS_ANNOTATION_LOCK_CHANGE";
2544
- Events["ANNOTATION_VISIBILITY_CHANGE"] = "CORNERSTONE_TOOLS_ANNOTATION_VISIBILITY_CHANGE";
2545
- Events["ANNOTATION_RENDERED"] = "CORNERSTONE_TOOLS_ANNOTATION_RENDERED";
2546
- Events["ANNOTATION_INTERPOLATION_PROCESS_COMPLETED"] = "CORNERSTONE_TOOLS_ANNOTATION_INTERPOLATION_PROCESS_COMPLETED";
2547
- Events["INTERPOLATED_ANNOTATIONS_REMOVED"] = "CORNERSTONE_TOOLS_INTERPOLATED_ANNOTATIONS_REMOVED";
2548
- Events["SEGMENTATION_MODIFIED"] = "CORNERSTONE_TOOLS_SEGMENTATION_MODIFIED";
2549
- Events["SEGMENTATION_RENDERED"] = "CORNERSTONE_TOOLS_SEGMENTATION_RENDERED";
2550
- Events["SEGMENTATION_REPRESENTATION_ADDED"] = "CORNERSTONE_TOOLS_SEGMENTATION_REPRESENTATION_ADDED";
2551
- Events["SEGMENTATION_ADDED"] = "CORNERSTONE_TOOLS_SEGMENTATION_ADDED";
2552
- Events["SEGMENTATION_REPRESENTATION_MODIFIED"] = "CORNERSTONE_TOOLS_SEGMENTATION_REPRESENTATION_MODIFIED";
2553
- Events["SEGMENTATION_REMOVED"] = "CORNERSTONE_TOOLS_SEGMENTATION_REMOVED";
2554
- Events["SEGMENTATION_REPRESENTATION_REMOVED"] = "CORNERSTONE_TOOLS_SEGMENTATION_REPRESENTATION_REMOVED";
2555
- Events["SEGMENTATION_DATA_MODIFIED"] = "CORNERSTONE_TOOLS_SEGMENTATION_DATA_MODIFIED";
2556
- Events["KEY_DOWN"] = "CORNERSTONE_TOOLS_KEY_DOWN";
2557
- Events["KEY_UP"] = "CORNERSTONE_TOOLS_KEY_UP";
2558
- Events["MOUSE_DOWN"] = "CORNERSTONE_TOOLS_MOUSE_DOWN";
2559
- Events["MOUSE_UP"] = "CORNERSTONE_TOOLS_MOUSE_UP";
2560
- Events["MOUSE_DOWN_ACTIVATE"] = "CORNERSTONE_TOOLS_MOUSE_DOWN_ACTIVATE";
2561
- Events["MOUSE_DRAG"] = "CORNERSTONE_TOOLS_MOUSE_DRAG";
2562
- Events["MOUSE_MOVE"] = "CORNERSTONE_TOOLS_MOUSE_MOVE";
2563
- Events["MOUSE_CLICK"] = "CORNERSTONE_TOOLS_MOUSE_CLICK";
2564
- Events["MOUSE_DOUBLE_CLICK"] = "CORNERSTONE_TOOLS_MOUSE_DOUBLE_CLICK";
2565
- Events["MOUSE_WHEEL"] = "CORNERSTONE_TOOLS_MOUSE_WHEEL";
2566
- Events["TOUCH_START"] = "CORNERSTONE_TOOLS_TOUCH_START";
2567
- Events["TOUCH_START_ACTIVATE"] = "CORNERSTONE_TOOLS_TOUCH_START_ACTIVATE";
2568
- Events["TOUCH_PRESS"] = "CORNERSTONE_TOOLS_TOUCH_PRESS";
2569
- Events["TOUCH_DRAG"] = "CORNERSTONE_TOOLS_TOUCH_DRAG";
2570
- Events["TOUCH_END"] = "CORNERSTONE_TOOLS_TOUCH_END";
2571
- Events["TOUCH_TAP"] = "CORNERSTONE_TOOLS_TAP";
2572
- Events["TOUCH_SWIPE"] = "CORNERSTONE_TOOLS_SWIPE";
2573
- })(Events || (Events = {}));
2574
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Events);
2575
-
2576
-
2577
- /***/ }),
2578
-
2579
- /***/ 84093:
2580
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2581
-
2582
- "use strict";
2583
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2584
- /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
2585
- /* harmony export */ });
2586
- var StrategyCallbacks;
2587
- (function (StrategyCallbacks) {
2588
- StrategyCallbacks["OnInteractionStart"] = "onInteractionStart";
2589
- StrategyCallbacks["OnInteractionEnd"] = "onInteractionEnd";
2590
- StrategyCallbacks["Preview"] = "preview";
2591
- StrategyCallbacks["RejectPreview"] = "rejectPreview";
2592
- StrategyCallbacks["AcceptPreview"] = "acceptPreview";
2593
- StrategyCallbacks["Fill"] = "fill";
2594
- StrategyCallbacks["StrategyFunction"] = "strategyFunction";
2595
- StrategyCallbacks["CreateIsInThreshold"] = "createIsInThreshold";
2596
- StrategyCallbacks["Initialize"] = "initialize";
2597
- StrategyCallbacks["INTERNAL_setValue"] = "setValue";
2598
- StrategyCallbacks["ComputeInnerCircleRadius"] = "computeInnerCircleRadius";
2599
- })(StrategyCallbacks || (StrategyCallbacks = {}));
2600
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StrategyCallbacks);
2601
-
2602
-
2603
- /***/ }),
2604
-
2605
- /***/ 49892:
2606
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2607
-
2608
- "use strict";
2609
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2610
- /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
2611
- /* harmony export */ });
2612
- var ToolModes;
2613
- (function (ToolModes) {
2614
- ToolModes["Active"] = "Active";
2615
- ToolModes["Passive"] = "Passive";
2616
- ToolModes["Enabled"] = "Enabled";
2617
- ToolModes["Disabled"] = "Disabled";
2618
- })(ToolModes || (ToolModes = {}));
2619
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ToolModes);
2620
-
2621
-
2622
- /***/ }),
2623
-
2624
- /***/ 10401:
2625
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2626
-
2627
- "use strict";
2628
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2629
- /* harmony export */ H: () => (/* binding */ Swipe)
2630
- /* harmony export */ });
2631
- var Swipe;
2632
- (function (Swipe) {
2633
- Swipe["UP"] = "UP";
2634
- Swipe["DOWN"] = "DOWN";
2635
- Swipe["LEFT"] = "LEFT";
2636
- Swipe["RIGHT"] = "RIGHT";
2637
- })(Swipe || (Swipe = {}));
2638
-
2639
-
2640
-
2641
- /***/ }),
2642
-
2643
- /***/ 99737:
2644
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2645
-
2646
- "use strict";
2647
- // ESM COMPAT FLAG
2648
- __webpack_require__.r(__webpack_exports__);
2649
-
2650
- // EXPORTS
2651
- __webpack_require__.d(__webpack_exports__, {
2652
- AnnotationStyleStates: () => (/* reexport */ enums_AnnotationStyleStates),
2653
- ChangeTypes: () => (/* reexport */ ChangeTypes/* default */.A),
2654
- Events: () => (/* reexport */ Events/* default */.A),
2655
- KeyboardBindings: () => (/* reexport */ ToolBindings/* KeyboardBindings */.q),
2656
- MouseBindings: () => (/* reexport */ ToolBindings/* MouseBindings */.i),
2657
- SegmentationRepresentations: () => (/* reexport */ SegmentationRepresentations/* default */.A),
2658
- StrategyCallbacks: () => (/* reexport */ StrategyCallbacks/* default */.A),
2659
- Swipe: () => (/* reexport */ Touch/* Swipe */.H),
2660
- ToolModes: () => (/* reexport */ ToolModes/* default */.A),
2661
- WorkerTypes: () => (/* reexport */ WorkerTypes)
2662
- });
2663
-
2664
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/ToolBindings.js
2665
- var ToolBindings = __webpack_require__(66452);
2666
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/ToolModes.js
2667
- var ToolModes = __webpack_require__(49892);
2668
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/AnnotationStyleStates.js
2669
- var AnnotationStyleStates;
2670
- (function (AnnotationStyleStates) {
2671
- AnnotationStyleStates["Default"] = "";
2672
- AnnotationStyleStates["Highlighted"] = "Highlighted";
2673
- AnnotationStyleStates["Selected"] = "Selected";
2674
- AnnotationStyleStates["Locked"] = "Locked";
2675
- AnnotationStyleStates["AutoGenerated"] = "AutoGenerated";
2676
- })(AnnotationStyleStates || (AnnotationStyleStates = {}));
2677
- /* harmony default export */ const enums_AnnotationStyleStates = (AnnotationStyleStates);
2678
-
2679
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/Events.js
2680
- var Events = __webpack_require__(94021);
2681
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/SegmentationRepresentations.js
2682
- var SegmentationRepresentations = __webpack_require__(18682);
2683
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/Touch.js
2684
- var Touch = __webpack_require__(10401);
2685
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/StrategyCallbacks.js
2686
- var StrategyCallbacks = __webpack_require__(84093);
2687
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/ChangeTypes.js
2688
- var ChangeTypes = __webpack_require__(75183);
2689
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/WorkerTypes.js
2690
- var WorkerTypes_ChangeTypes;
2691
- (function (ChangeTypes) {
2692
- ChangeTypes["POLYSEG_CONTOUR_TO_LABELMAP"] = "Converting Contour to Labelmap";
2693
- ChangeTypes["POLYSEG_SURFACE_TO_LABELMAP"] = "Converting Surfaces to Labelmap";
2694
- ChangeTypes["POLYSEG_CONTOUR_TO_SURFACE"] = "Converting Contour to Surface";
2695
- ChangeTypes["POLYSEG_LABELMAP_TO_SURFACE"] = "Converting Labelmap to Surface";
2696
- ChangeTypes["SURFACE_CLIPPING"] = "Clipping Surfaces";
2697
- })(WorkerTypes_ChangeTypes || (WorkerTypes_ChangeTypes = {}));
2698
- /* harmony default export */ const WorkerTypes = (WorkerTypes_ChangeTypes);
2699
-
2700
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/index.js
2701
-
2702
-
2703
-
2704
-
2705
-
2706
-
2707
-
2708
-
2709
-
2710
-
2711
-
2712
2501
 
2713
2502
  /***/ }),
2714
2503
 
@@ -4116,6 +3905,9 @@ class Synchronizer {
4116
3905
  };
4117
3906
  viewports.forEach((vp) => {
4118
3907
  const eventSource = this.getEventSource(vp);
3908
+ if (!eventSource) {
3909
+ return;
3910
+ }
4119
3911
  eventSource.removeEventListener(esm.Enums.Events.ELEMENT_DISABLED, disableHandler);
4120
3912
  eventSource.addEventListener(esm.Enums.Events.ELEMENT_DISABLED, disableHandler);
4121
3913
  });
@@ -4129,9 +3921,13 @@ class Synchronizer {
4129
3921
  const { renderingEngineId, viewportId } = viewportInfo;
4130
3922
  const renderingEngine = (0,esm.getRenderingEngine)(renderingEngineId);
4131
3923
  if (!renderingEngine) {
4132
- throw new Error(`No RenderingEngine for Id: ${renderingEngineId}`);
3924
+ return null;
4133
3925
  }
4134
- return renderingEngine.getViewport(viewportId).element;
3926
+ const viewport = renderingEngine.getViewport(viewportId);
3927
+ if (!viewport) {
3928
+ return null;
3929
+ }
3930
+ return viewport.element;
4135
3931
  }
4136
3932
  }
4137
3933
  function _getUniqueViewports(vp1, vp2) {
@@ -6504,16 +6300,10 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
6504
6300
  return otherViewportsAnnotationsWithUniqueCameras;
6505
6301
  };
6506
6302
  this._checkIfViewportsRenderingSameScene = (viewport, otherViewport) => {
6507
- const actors = viewport.getActors();
6508
- const otherViewportActors = otherViewport.getActors();
6509
- let sameScene = true;
6510
- actors.forEach((actor) => {
6511
- if (actors.length !== otherViewportActors.length ||
6512
- otherViewportActors.find(({ uid }) => uid === actor.uid) === undefined) {
6513
- sameScene = false;
6514
- }
6515
- });
6516
- return sameScene;
6303
+ const volumeIds = viewport.getAllVolumeIds();
6304
+ const otherVolumeIds = otherViewport.getAllVolumeIds();
6305
+ return (volumeIds.length === otherVolumeIds.length &&
6306
+ volumeIds.every((id) => otherVolumeIds.includes(id)));
6517
6307
  };
6518
6308
  this._jump = (enabledElement, jumpWorld) => {
6519
6309
  state/* state */.wk.isInteractingWithTool = true;
@@ -9162,7 +8952,7 @@ class ScaleOverlayTool extends AnnotationDisplayTool/* default */.A {
9162
8952
  }
9163
8953
  const { viewUp, viewPlaneNormal } = viewport.getCamera();
9164
8954
  const viewportCanvasCornersInWorld = esm.utilities.getViewportImageCornersInWorld(viewport);
9165
- let annotation = this.editData.annotation;
8955
+ let annotation = this.editData?.annotation;
9166
8956
  const annotations = (0,annotationState.getAnnotations)(this.getToolName(), viewport.element);
9167
8957
  if (annotations.length) {
9168
8958
  annotation = annotations.filter((thisAnnotation) => thisAnnotation.data.viewportId == viewport.id)[0];
@@ -9190,7 +8980,7 @@ class ScaleOverlayTool extends AnnotationDisplayTool/* default */.A {
9190
8980
  annotation = newAnnotation;
9191
8981
  }
9192
8982
  });
9193
- if (this.editData.annotation &&
8983
+ if (this.editData?.annotation &&
9194
8984
  this.editData.annotation.data.viewportId == viewport.id) {
9195
8985
  this.editData.annotation.data.handles.points =
9196
8986
  viewportCanvasCornersInWorld;
@@ -9405,7 +9195,7 @@ class ScaleOverlayTool extends AnnotationDisplayTool/* default */.A {
9405
9195
  };
9406
9196
  }
9407
9197
  renderAnnotation(enabledElement, svgDrawingHelper) {
9408
- if (!this.editData.viewport) {
9198
+ if (!this.editData || !this.editData.viewport) {
9409
9199
  return;
9410
9200
  }
9411
9201
  const location = this.configuration.scaleLocation;
@@ -9911,7 +9701,7 @@ class LengthTool extends base/* AnnotationTool */.EC {
9911
9701
  const { currentPoints, element } = eventDetail;
9912
9702
  const worldPos = currentPoints.world;
9913
9703
  const enabledElement = (0,esm.getEnabledElement)(element);
9914
- const { viewport, renderingEngine } = enabledElement;
9704
+ const { viewport } = enabledElement;
9915
9705
  (0,elementCursor.hideElementCursor)(element);
9916
9706
  this.isDrawing = true;
9917
9707
  const { viewPlaneNormal, viewUp, position: cameraPosition, } = viewport.getCamera();
@@ -10226,6 +10016,39 @@ class LengthTool extends base/* AnnotationTool */.EC {
10226
10016
  };
10227
10017
  this._throttledCalculateCachedStats = (0,throttle/* default */.A)(this._calculateCachedStats, 100, { trailing: true });
10228
10018
  }
10019
+ static { this.hydrate = (viewportId, points, options) => {
10020
+ const enabledElement = (0,esm.getEnabledElementByViewportId)(viewportId);
10021
+ if (!enabledElement) {
10022
+ return;
10023
+ }
10024
+ const { viewport } = enabledElement;
10025
+ const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
10026
+ const { viewPlaneNormal, viewUp } = viewport.getCamera();
10027
+ const instance = new this();
10028
+ const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
10029
+ const annotation = {
10030
+ annotationUID: options?.annotationUID || esm.utilities.uuidv4(),
10031
+ data: {
10032
+ handles: {
10033
+ points,
10034
+ },
10035
+ },
10036
+ highlighted: false,
10037
+ autoGenerated: false,
10038
+ invalidated: false,
10039
+ isLocked: false,
10040
+ isVisible: true,
10041
+ metadata: {
10042
+ toolName: instance.getToolName(),
10043
+ viewPlaneNormal,
10044
+ FrameOfReferenceUID,
10045
+ referencedImageId,
10046
+ ...options,
10047
+ },
10048
+ };
10049
+ (0,annotationState.addAnnotation)(annotation, viewport.element);
10050
+ (0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
10051
+ }; }
10229
10052
  handleSelectedCallback(evt, annotation, handle) {
10230
10053
  const eventDetail = evt.detail;
10231
10054
  const { element } = eventDetail;
@@ -10970,6 +10793,39 @@ class ProbeTool extends base/* AnnotationTool */.EC {
10970
10793
  return false;
10971
10794
  }
10972
10795
  toolSelectedCallback() { }
10796
+ static { this.hydrate = (viewportId, points, options) => {
10797
+ const enabledElement = (0,esm.getEnabledElementByViewportId)(viewportId);
10798
+ if (!enabledElement) {
10799
+ return;
10800
+ }
10801
+ const { viewport } = enabledElement;
10802
+ const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
10803
+ const { viewPlaneNormal, viewUp } = viewport.getCamera();
10804
+ const instance = new this();
10805
+ const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
10806
+ const annotation = {
10807
+ annotationUID: options?.annotationUID || esm.utilities.uuidv4(),
10808
+ data: {
10809
+ handles: {
10810
+ points,
10811
+ },
10812
+ },
10813
+ highlighted: false,
10814
+ autoGenerated: false,
10815
+ invalidated: false,
10816
+ isLocked: false,
10817
+ isVisible: true,
10818
+ metadata: {
10819
+ toolName: instance.getToolName(),
10820
+ viewPlaneNormal,
10821
+ FrameOfReferenceUID,
10822
+ referencedImageId,
10823
+ ...options,
10824
+ },
10825
+ };
10826
+ (0,annotationState.addAnnotation)(annotation, viewport.element);
10827
+ (0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
10828
+ }; }
10973
10829
  getHandleNearImagePoint(element, annotation, canvasCoords, proximity) {
10974
10830
  const enabledElement = (0,esm.getEnabledElement)(element);
10975
10831
  const { viewport } = enabledElement;
@@ -12459,6 +12315,52 @@ class CircleROITool extends base/* AnnotationTool */.EC {
12459
12315
  };
12460
12316
  this._throttledCalculateCachedStats = (0,throttle/* default */.A)(this._calculateCachedStats, 100, { trailing: true });
12461
12317
  }
12318
+ static { this.hydrate = (viewportId, points, options) => {
12319
+ const enabledElement = (0,esm.getEnabledElementByViewportId)(viewportId);
12320
+ if (!enabledElement) {
12321
+ return;
12322
+ }
12323
+ const { viewport } = enabledElement;
12324
+ const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
12325
+ const { viewPlaneNormal, viewUp } = viewport.getCamera();
12326
+ const instance = new this();
12327
+ const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
12328
+ const annotation = {
12329
+ annotationUID: options?.annotationUID || esm.utilities.uuidv4(),
12330
+ data: {
12331
+ handles: {
12332
+ points,
12333
+ textBox: {
12334
+ hasMoved: false,
12335
+ worldPosition: [0, 0, 0],
12336
+ worldBoundingBox: {
12337
+ topLeft: [0, 0, 0],
12338
+ topRight: [0, 0, 0],
12339
+ bottomLeft: [0, 0, 0],
12340
+ bottomRight: [0, 0, 0],
12341
+ },
12342
+ },
12343
+ activeHandleIndex: null,
12344
+ },
12345
+ label: '',
12346
+ cachedStats: {},
12347
+ },
12348
+ highlighted: false,
12349
+ autoGenerated: false,
12350
+ invalidated: false,
12351
+ isLocked: false,
12352
+ isVisible: true,
12353
+ metadata: {
12354
+ toolName: instance.getToolName(),
12355
+ viewPlaneNormal,
12356
+ FrameOfReferenceUID,
12357
+ referencedImageId,
12358
+ ...options,
12359
+ },
12360
+ };
12361
+ (0,annotationState.addAnnotation)(annotation, viewport.element);
12362
+ (0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
12363
+ }; }
12462
12364
  }
12463
12365
  function CircleROITool_defaultGetTextLines(data, targetId) {
12464
12366
  const cachedVolumeStats = data.cachedStats[targetId];
@@ -12979,8 +12881,6 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
12979
12881
  viewportIdsToRender,
12980
12882
  movingTextBox: false,
12981
12883
  };
12982
- const enabledElement = (0,esm.getEnabledElement)(element);
12983
- const { renderingEngine } = enabledElement;
12984
12884
  this._activateModify(element);
12985
12885
  (0,utilities.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
12986
12886
  evt.preventDefault();
@@ -13574,6 +13474,61 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
13574
13474
  }
13575
13475
  return spline;
13576
13476
  }
13477
+ static { this.hydrate = (viewportId, points, options) => {
13478
+ const enabledElement = (0,esm.getEnabledElementByViewportId)(viewportId);
13479
+ if (!enabledElement) {
13480
+ return;
13481
+ }
13482
+ if (points.length < SPLINE_MIN_POINTS) {
13483
+ console.warn('Spline requires at least 3 control points');
13484
+ return;
13485
+ }
13486
+ const { viewport } = enabledElement;
13487
+ const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
13488
+ const { viewPlaneNormal, viewUp } = viewport.getCamera();
13489
+ const instance = new this();
13490
+ const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
13491
+ const splineType = options?.splineType || SplineTypesEnum.CatmullRom;
13492
+ const splineConfig = instance._getSplineConfig(splineType);
13493
+ const SplineClass = splineConfig.Class;
13494
+ const splineInstance = new SplineClass();
13495
+ const canvasPoints = points.map((point) => viewport.worldToCanvas(point));
13496
+ splineInstance.setControlPoints(canvasPoints);
13497
+ const splinePolylineCanvas = splineInstance.getPolylinePoints();
13498
+ const splinePolylineWorld = splinePolylineCanvas.map((point) => viewport.canvasToWorld(point));
13499
+ const annotation = {
13500
+ annotationUID: options?.annotationUID || esm.utilities.uuidv4(),
13501
+ data: {
13502
+ handles: {
13503
+ points,
13504
+ },
13505
+ label: '',
13506
+ cachedStats: {},
13507
+ spline: {
13508
+ type: splineType,
13509
+ instance: splineInstance,
13510
+ },
13511
+ contour: {
13512
+ closed: true,
13513
+ polyline: splinePolylineWorld,
13514
+ },
13515
+ },
13516
+ highlighted: false,
13517
+ autoGenerated: false,
13518
+ invalidated: true,
13519
+ isLocked: false,
13520
+ isVisible: true,
13521
+ metadata: {
13522
+ toolName: instance.getToolName(),
13523
+ viewPlaneNormal,
13524
+ FrameOfReferenceUID,
13525
+ referencedImageId,
13526
+ ...options,
13527
+ },
13528
+ };
13529
+ (0,annotationState.addAnnotation)(annotation, viewport.element);
13530
+ (0,utilities.triggerAnnotationRenderForViewportIds)([viewport.id]);
13531
+ }; }
13577
13532
  }
13578
13533
  function SplineROITool_defaultGetTextLines(data, targetId) {
13579
13534
  const cachedVolumeStats = data.cachedStats[targetId];
@@ -20578,7 +20533,7 @@ class SegmentationStateManager {
20578
20533
  type,
20579
20534
  active: true,
20580
20535
  visible: true,
20581
- colorLUTIndex: 0,
20536
+ colorLUTIndex: renderingConfig?.colorLUTIndex || 0,
20582
20537
  segments: segmentReps,
20583
20538
  config: {
20584
20539
  ...getDefaultRenderingConfig(type),
@@ -21305,17 +21260,20 @@ function internalAddSegmentationRepresentation(viewportId, representationInput)
21305
21260
  }
21306
21261
  function getColorLUTIndex(config) {
21307
21262
  const { colorLUTOrIndex } = config || {};
21308
- const isIndexProvided = typeof colorLUTOrIndex === 'number';
21309
- const selectedColorLUT = isIndexProvided
21310
- ? (0,getColorLUT/* getColorLUT */.B)(colorLUTOrIndex)
21311
- : COLOR_LUT/* default */.A;
21312
- const colorLUTIndex = isIndexProvided
21313
- ? colorLUTOrIndex
21314
- : (0,getNextColorLUTIndex/* getNextColorLUTIndex */.u)();
21315
- if (!isIndexProvided) {
21316
- (0,addColorLUT/* addColorLUT */.u)(selectedColorLUT, colorLUTIndex);
21263
+ if (colorLUTOrIndex === undefined) {
21264
+ const index = (0,addColorLUT/* addColorLUT */.u)(JSON.parse(JSON.stringify(COLOR_LUT/* default */.A)));
21265
+ return index;
21266
+ }
21267
+ if (typeof colorLUTOrIndex === 'number') {
21268
+ return colorLUTOrIndex;
21317
21269
  }
21318
- return colorLUTIndex;
21270
+ if (Array.isArray(colorLUTOrIndex) &&
21271
+ colorLUTOrIndex.every((item) => Array.isArray(item) && item.length === 4)) {
21272
+ const index = (0,addColorLUT/* addColorLUT */.u)(colorLUTOrIndex);
21273
+ return index;
21274
+ }
21275
+ const index = (0,addColorLUT/* addColorLUT */.u)(JSON.parse(JSON.stringify(COLOR_LUT/* default */.A)));
21276
+ return index;
21319
21277
  }
21320
21278
 
21321
21279
 
@@ -21615,23 +21573,6 @@ function getActiveSegmentation(viewportId) {
21615
21573
  }
21616
21574
 
21617
21575
 
21618
- /***/ }),
21619
-
21620
- /***/ 50409:
21621
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
21622
-
21623
- "use strict";
21624
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21625
- /* harmony export */ B: () => (/* binding */ getColorLUT)
21626
- /* harmony export */ });
21627
- /* harmony import */ var _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59475);
21628
-
21629
- function getColorLUT(index) {
21630
- const segmentationStateManager = _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__/* .defaultSegmentationStateManager */ ._6;
21631
- return segmentationStateManager.getColorLUT(index);
21632
- }
21633
-
21634
-
21635
21576
  /***/ }),
21636
21577
 
21637
21578
  /***/ 97577:
@@ -21649,23 +21590,6 @@ function getCurrentLabelmapImageIdForViewport(viewportId, segmentationId) {
21649
21590
  }
21650
21591
 
21651
21592
 
21652
- /***/ }),
21653
-
21654
- /***/ 70906:
21655
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
21656
-
21657
- "use strict";
21658
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21659
- /* harmony export */ u: () => (/* binding */ getNextColorLUTIndex)
21660
- /* harmony export */ });
21661
- /* harmony import */ var _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59475);
21662
-
21663
- function getNextColorLUTIndex() {
21664
- const segmentationStateManager = _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__/* .defaultSegmentationStateManager */ ._6;
21665
- return segmentationStateManager.getNextColorLUTIndex();
21666
- }
21667
-
21668
-
21669
21593
  /***/ }),
21670
21594
 
21671
21595
  /***/ 93210:
@@ -25762,6 +25686,42 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
25762
25686
  };
25763
25687
  this._throttledCalculateCachedStats = (0,_utilities_throttle__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(this._calculateCachedStats, 100, { trailing: true });
25764
25688
  }
25689
+ static { this.hydrate = (viewportId, points, options) => {
25690
+ const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElementByViewportId)(viewportId);
25691
+ if (!enabledElement) {
25692
+ return;
25693
+ }
25694
+ const { viewport } = enabledElement;
25695
+ const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
25696
+ const { viewPlaneNormal, viewUp } = viewport.getCamera();
25697
+ const instance = new this();
25698
+ const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
25699
+ const annotation = {
25700
+ annotationUID: options?.annotationUID || _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.uuidv4(),
25701
+ data: {
25702
+ handles: {
25703
+ points,
25704
+ activeHandleIndex: null,
25705
+ },
25706
+ label: '',
25707
+ cachedStats: {},
25708
+ },
25709
+ highlighted: false,
25710
+ autoGenerated: false,
25711
+ invalidated: false,
25712
+ isLocked: false,
25713
+ isVisible: true,
25714
+ metadata: {
25715
+ toolName: instance.getToolName(),
25716
+ viewPlaneNormal,
25717
+ FrameOfReferenceUID,
25718
+ referencedImageId,
25719
+ ...options,
25720
+ },
25721
+ };
25722
+ (0,_stateManagement__WEBPACK_IMPORTED_MODULE_4__/* .addAnnotation */ .lC)(annotation, viewport.element);
25723
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .A)([viewport.id]);
25724
+ }; }
25765
25725
  }
25766
25726
  function defaultGetTextLines(data, targetId) {
25767
25727
  const cachedVolumeStats = data.cachedStats[targetId];
@@ -172,7 +172,7 @@
172
172
  /******/ // This function allow to reference async chunks and sibling chunks for the entrypoint
173
173
  /******/ __webpack_require__.u = (chunkId) => {
174
174
  /******/ // return url for filenames based on template
175
- /******/ return "" + chunkId + ".bundle." + {"732":"532947c280e1a8f6e020","4571":"3b1691730b3c57bf4d35","8094":"411698eaf81975a7f12d"}[chunkId] + ".js";
175
+ /******/ return "" + chunkId + ".bundle." + {"732":"532947c280e1a8f6e020","4571":"a37be49663df2f4a2c8a","8094":"411698eaf81975a7f12d"}[chunkId] + ".js";
176
176
  /******/ };
177
177
  /******/ })();
178
178
  /******/
@@ -21,8 +21,8 @@ const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/extension-
21
21
  const id = package_namespaceObject.UU;
22
22
  const SOPClassHandlerId = `${id}.sopClassHandlerModule.dicom-video`;
23
23
 
24
- // EXTERNAL MODULE: ../../core/src/index.ts + 71 modules
25
- var src = __webpack_require__(29463);
24
+ // EXTERNAL MODULE: ../../core/src/index.ts + 72 modules
25
+ var src = __webpack_require__(80818);
26
26
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js
27
27
  var esm = __webpack_require__(81985);
28
28
  ;// CONCATENATED MODULE: ../../../extensions/dicom-video/src/getSopClassHandlerModule.js