@ohif/app 3.10.0-beta.13 → 3.10.0-beta.15

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 (38) hide show
  1. package/dist/{1185.bundle.2e92e5f4460a9ba10ac6.js → 1185.bundle.daba485e086a9099e27d.js} +4 -4
  2. package/dist/{9909.bundle.a87c9d96eefff9b0961b.js → 3022.bundle.51a7056ea0e39b06e095.js} +1744 -248
  3. package/dist/{3198.bundle.76e9454c9bcc112ceb9a.js → 3198.bundle.cf47b8b683fa8463449d.js} +2 -2
  4. package/dist/{3970.bundle.05e7ea412a431ca2cfdb.js → 3970.bundle.216ca9d37288f34b8f0b.js} +2 -2
  5. package/dist/{5252.bundle.a8eb753e715482b7d8c5.js → 5252.bundle.9d1855f7fb56235709ec.js} +204 -38
  6. package/dist/{5630.bundle.01be2c806e4047751682.js → 5630.bundle.cce2ad20b2aad9e57dac.js} +6 -5
  7. package/dist/{5687.bundle.80baffdf7e2dee76c212.js → 5687.bundle.9075612d29986766d3e9.js} +4 -4
  8. package/dist/{573.bundle.9929319cc662537c28b2.js → 573.bundle.d08dcb8e65e3b7729b58.js} +19 -5
  9. package/dist/{8104.bundle.0e10e63ad1240be255cf.js → 6498.bundle.02f5b640a94509a11180.js} +719 -443
  10. package/dist/{717.bundle.1a7043c3db6b3640c0e9.js → 717.bundle.aa9a089aec5f8bbd39c6.js} +2 -2
  11. package/dist/{7197.bundle.54461a631c49c719613a.js → 7197.bundle.7fbc6374bf90612cdd3c.js} +2 -2
  12. package/dist/{5717.bundle.bf2665759535e60ad014.js → 727.bundle.f93673c292647f58ee1e.js} +985 -517
  13. package/dist/{8558.bundle.48fd7faa64b5c4e25cf0.js → 8558.bundle.0d13c2e07dd20c7a80a6.js} +2 -0
  14. package/dist/{9611.bundle.a958c468d6ca6e91c091.js → 9611.bundle.0feebcae79e65852d610.js} +14 -9
  15. package/dist/{4636.bundle.3b2a32d7e1499673983d.js → 9809.bundle.9d3afbcc67703574e298.js} +70 -32
  16. package/dist/{9862.bundle.05613a9c8b36ffeb9962.js → 9862.bundle.6ea7e474a390b386e2b2.js} +1 -1
  17. package/dist/{app.bundle.fc6b15c24f9cd6d8176a.js → app.bundle.da160cded2516cd3a8c5.js} +285 -69
  18. package/dist/{histogram-worker.bundle.b11d1dcfe28cef619c79.js → histogram-worker.bundle.f978654858500a3080cc.js} +1 -1
  19. package/dist/index.html +1 -1
  20. package/dist/{polySeg.bundle.9ad8fc1a503a6a55e34f.js → polySeg.bundle.70ed683f467a47e3c92d.js} +3 -3
  21. package/dist/{suv-peak-worker.bundle.29cb580249bfaaff9ac1.js → suv-peak-worker.bundle.8c83e6e99d48223569b6.js} +4 -4
  22. package/dist/sw.js +1 -1
  23. package/package.json +19 -19
  24. /package/dist/{1266.bundle.2662dd7ecc7cdc5c9ec7.js → 1266.bundle.e2a6b424460c944d22c7.js} +0 -0
  25. /package/dist/{1374.bundle.e62f7a2b3b0d9f238ad3.js → 1374.bundle.1447c8cd66f92f86bdfe.js} +0 -0
  26. /package/dist/{213.bundle.ce3936a2ba72cc0f4f84.js → 213.bundle.15b4932d4da53d73e28c.js} +0 -0
  27. /package/dist/{2424.bundle.d267285b9ec2dcceedb8.js → 2424.bundle.43593f00a607cec1ca1d.js} +0 -0
  28. /package/dist/{2825.bundle.f9f50b8ea4a6ab87ad54.js → 2825.bundle.590be619b1b4174adb29.js} +0 -0
  29. /package/dist/{3200.bundle.4567e1ad29d1803e1b65.js → 3200.bundle.8c67b1fc155455d9cd4d.js} +0 -0
  30. /package/dist/{3334.bundle.0e6ba24024018199ab66.js → 3334.bundle.e36011d0fd5fcb7e8b84.js} +0 -0
  31. /package/dist/{4834.bundle.7ad185b931edf0ed29df.js → 4834.bundle.55cec9cde9ebe6f6465c.js} +0 -0
  32. /package/dist/{5139.bundle.fd98ea42bca0b622b69a.js → 5139.bundle.05048f1b5c0123c5e286.js} +0 -0
  33. /package/dist/{5247.bundle.f2639b7d0f21d21ab9fe.js → 5247.bundle.856ad336a5bab0cedee9.js} +0 -0
  34. /package/dist/{7955.bundle.7e62bd7f53e04856f455.js → 7955.bundle.d0158996e6732bdf5e41.js} +0 -0
  35. /package/dist/{8008.bundle.044a35074b88f072db6b.js → 8008.bundle.d3bbe0af2d5465a2827a.js} +0 -0
  36. /package/dist/{8228.bundle.564c39d1256540b7228e.js → 8228.bundle.22df751df68b512fc6fb.js} +0 -0
  37. /package/dist/{8259.bundle.a9c46ba95884c56f3e72.js → 8259.bundle.f9ffeb81f2ebc2db4512.js} +0 -0
  38. /package/dist/{9551.bundle.1b3e84b22ec04a16fb11.js → 9551.bundle.4426606c2df8b057445e.js} +0 -0
@@ -1,4 +1,4 @@
1
- (self["webpackChunk"] = self["webpackChunk"] || []).push([[5717],{
1
+ (self["webpackChunk"] = self["webpackChunk"] || []).push([[727],{
2
2
 
3
3
  /***/ 5057:
4
4
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
@@ -259,7 +259,7 @@ async function addVolumesToViewports(renderingEngine, volumeInputs, viewportIds,
259
259
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/volumeNewImageEventDispatcher.js
260
260
  var volumeNewImageEventDispatcher = __webpack_require__(90740);
261
261
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/addImageSlicesToViewports.js
262
- async function addImageSlicesToViewports(renderingEngine, stackInputs, viewportIds) {
262
+ function addImageSlicesToViewports(renderingEngine, stackInputs, viewportIds) {
263
263
  for (const viewportId of viewportIds) {
264
264
  const viewport = renderingEngine.getStackViewport(viewportId);
265
265
  if (!viewport) {
@@ -270,11 +270,10 @@ async function addImageSlicesToViewports(renderingEngine, stackInputs, viewportI
270
270
  return;
271
271
  }
272
272
  }
273
- const addStackPromises = viewportIds.map(async (viewportId) => {
273
+ viewportIds.forEach((viewportId) => {
274
274
  const viewport = renderingEngine.getStackViewport(viewportId);
275
275
  viewport.addImages(stackInputs);
276
276
  });
277
- await Promise.all(addStackPromises);
278
277
  }
279
278
  /* harmony default export */ const helpers_addImageSlicesToViewports = (addImageSlicesToViewports);
280
279
 
@@ -737,23 +736,6 @@ class Surface {
737
736
  }
738
737
 
739
738
 
740
- /***/ }),
741
-
742
- /***/ 6796:
743
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
744
-
745
- "use strict";
746
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
747
- /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
748
- /* harmony export */ });
749
- var VoxelManagerEnum;
750
- (function (VoxelManagerEnum) {
751
- VoxelManagerEnum["RLE"] = "RLE";
752
- VoxelManagerEnum["Volume"] = "Volume";
753
- })(VoxelManagerEnum || (VoxelManagerEnum = {}));
754
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (VoxelManagerEnum);
755
-
756
-
757
739
  /***/ }),
758
740
 
759
741
  /***/ 31749:
@@ -840,8 +822,6 @@ var ImageQualityStatus = __webpack_require__(77474);
840
822
  var VideoEnums = __webpack_require__(13545);
841
823
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/MetadataModules.js
842
824
  var MetadataModules = __webpack_require__(69850);
843
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/VoxelManagerEnum.js
844
- var VoxelManagerEnum = __webpack_require__(6796);
845
825
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/GenerateImageType.js
846
826
  var GenerateImageType;
847
827
  (function (GenerateImageType) {
@@ -850,6 +830,8 @@ var GenerateImageType;
850
830
  GenerateImageType["AVERAGE"] = "AVERAGE";
851
831
  })(GenerateImageType || (GenerateImageType = {}));
852
832
 
833
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/VoxelManagerEnum.js
834
+ var VoxelManagerEnum = __webpack_require__(6796);
853
835
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js
854
836
 
855
837
 
@@ -996,7 +978,7 @@ function getEnabledElements() {
996
978
  /* harmony import */ var _loaders_imageLoader__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(80068);
997
979
  /* harmony import */ var _loaders_geometryLoader__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(39459);
998
980
  /* harmony import */ var _loaders_ProgressiveRetrieveImages__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(36822);
999
- /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(77761);
981
+ /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(25242);
1000
982
  /* harmony import */ var _utilities_triggerEvent__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(69372);
1001
983
  /* harmony import */ var _loaders_cornerstoneStreamingImageVolumeLoader__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(55500);
1002
984
  /* harmony import */ var _loaders_cornerstoneStreamingDynamicImageVolumeLoader__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(55509);
@@ -2394,8 +2376,13 @@ class PointsManager {
2394
2376
  }
2395
2377
  return selected;
2396
2378
  }
2397
- static create3(initialSize = 128) {
2398
- return new PointsManager({ initialSize, dimensions: 3 });
2379
+ static create3(initialSize = 128, points) {
2380
+ initialSize = Math.max(initialSize, points?.length || 0);
2381
+ const newPoints = new PointsManager({ initialSize, dimensions: 3 });
2382
+ if (points) {
2383
+ points.forEach((point) => newPoints.push(point));
2384
+ }
2385
+ return newPoints;
2399
2386
  }
2400
2387
  static create2(initialSize = 128) {
2401
2388
  return new PointsManager({ initialSize, dimensions: 2 });
@@ -3868,7 +3855,7 @@ const imageRetrieveMetadataProvider = {
3868
3855
 
3869
3856
  /***/ }),
3870
3857
 
3871
- /***/ 77761:
3858
+ /***/ 25242:
3872
3859
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3873
3860
 
3874
3861
  "use strict";
@@ -3877,6 +3864,7 @@ __webpack_require__.r(__webpack_exports__);
3877
3864
 
3878
3865
  // EXPORTS
3879
3866
  __webpack_require__.d(__webpack_exports__, {
3867
+ HistoryMemo: () => (/* reexport */ historyMemo_namespaceObject),
3880
3868
  PointsManager: () => (/* reexport */ PointsManager/* default */.A),
3881
3869
  ProgressiveIterator: () => (/* reexport */ ProgressiveIterator/* default */.A),
3882
3870
  RLEVoxelMap: () => (/* reexport */ RLEVoxelMap/* default */.A),
@@ -3895,6 +3883,7 @@ __webpack_require__.d(__webpack_exports__, {
3895
3883
  convertVolumeToStackViewport: () => (/* reexport */ convertVolumeToStackViewport),
3896
3884
  createLinearRGBTransferFunction: () => (/* reexport */ createLinearRGBTransferFunction/* default */.A),
3897
3885
  createSigmoidRGBTransferFunction: () => (/* reexport */ createSigmoidRGBTransferFunction/* default */.A),
3886
+ createSubVolume: () => (/* reexport */ createSubVolume),
3898
3887
  decimate: () => (/* reexport */ decimate/* default */.A),
3899
3888
  deepClone: () => (/* reexport */ deepClone/* deepClone */.G),
3900
3889
  deepEqual: () => (/* reexport */ deepEqual),
@@ -3923,6 +3912,7 @@ __webpack_require__.d(__webpack_exports__, {
3923
3912
  getViewportsWithVolumeId: () => (/* reexport */ getViewportsWithVolumeId/* default */.A),
3924
3913
  getVoiFromSigmoidRGBTransferFunction: () => (/* reexport */ getVoiFromSigmoidRGBTransferFunction/* default */.A),
3925
3914
  getVolumeActorCorners: () => (/* reexport */ getVolumeActorCorners/* default */.A),
3915
+ getVolumeDirectionVectors: () => (/* reexport */ getVolumeDirectionVectors),
3926
3916
  getVolumeId: () => (/* reexport */ getVolumeId/* getVolumeId */.A),
3927
3917
  getVolumeSliceRangeInfo: () => (/* reexport */ getVolumeSliceRangeInfo/* default */.A),
3928
3918
  getVolumeViewportScrollInfo: () => (/* reexport */ getVolumeViewportScrollInfo/* default */.A),
@@ -3961,6 +3951,7 @@ __webpack_require__.d(__webpack_exports__, {
3961
3951
  transferFunctionUtils: () => (/* reexport */ transferFunctionUtils),
3962
3952
  transformIndexToWorld: () => (/* reexport */ transformIndexToWorld/* default */.A),
3963
3953
  transformWorldToIndex: () => (/* reexport */ transformWorldToIndex/* default */.A),
3954
+ transformWorldToIndexContinuous: () => (/* reexport */ transformWorldToIndex/* transformWorldToIndexContinuous */.p),
3964
3955
  triggerEvent: () => (/* reexport */ triggerEvent/* default */.A),
3965
3956
  updateVTKImageDataWithCornerstoneImage: () => (/* reexport */ updateVTKImageDataWithCornerstoneImage/* updateVTKImageDataWithCornerstoneImage */.J),
3966
3957
  uuidv4: () => (/* reexport */ uuidv4/* default */.A),
@@ -3976,6 +3967,14 @@ __webpack_require__.d(eventListener_namespaceObject, {
3976
3967
  TargetEventListeners: () => (TargetEventListeners)
3977
3968
  });
3978
3969
 
3970
+ // NAMESPACE OBJECT: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/historyMemo/index.js
3971
+ var historyMemo_namespaceObject = {};
3972
+ __webpack_require__.r(historyMemo_namespaceObject);
3973
+ __webpack_require__.d(historyMemo_namespaceObject, {
3974
+ DefaultHistoryMemo: () => (DefaultHistoryMemo),
3975
+ HistoryMemo: () => (HistoryMemo)
3976
+ });
3977
+
3979
3978
  // NAMESPACE OBJECT: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/color.js
3980
3979
  var color_namespaceObject = {};
3981
3980
  __webpack_require__.r(color_namespaceObject);
@@ -4545,6 +4544,69 @@ function loadImageToCanvas(options) {
4545
4544
  });
4546
4545
  }
4547
4546
 
4547
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/historyMemo/index.js
4548
+ class HistoryMemo {
4549
+ constructor(label = 'Tools', size = 50) {
4550
+ this.position = -1;
4551
+ this.redoAvailable = 0;
4552
+ this.undoAvailable = 0;
4553
+ this.ring = new Array();
4554
+ this.label = label;
4555
+ this._size = size;
4556
+ }
4557
+ get size() {
4558
+ return this._size;
4559
+ }
4560
+ set size(newSize) {
4561
+ this.ring = new Array(newSize);
4562
+ this._size = newSize;
4563
+ this.position = -1;
4564
+ this.redoAvailable = 0;
4565
+ this.undoAvailable = 0;
4566
+ }
4567
+ undo(items = 1) {
4568
+ while (items > 0 && this.undoAvailable > 0) {
4569
+ const item = this.ring[this.position];
4570
+ item.restoreMemo(true);
4571
+ items--;
4572
+ this.redoAvailable++;
4573
+ this.undoAvailable--;
4574
+ this.position = (this.position - 1 + this.size) % this.size;
4575
+ }
4576
+ }
4577
+ redo(items = 1) {
4578
+ while (items > 0 && this.redoAvailable > 0) {
4579
+ const newPosition = (this.position + 1) % this.size;
4580
+ const item = this.ring[newPosition];
4581
+ item.restoreMemo(false);
4582
+ items--;
4583
+ this.position = newPosition;
4584
+ this.undoAvailable++;
4585
+ this.redoAvailable--;
4586
+ }
4587
+ }
4588
+ push(item) {
4589
+ if (!item) {
4590
+ return;
4591
+ }
4592
+ const memo = item.restoreMemo
4593
+ ? item
4594
+ : item.createMemo?.();
4595
+ if (!memo) {
4596
+ return;
4597
+ }
4598
+ this.redoAvailable = 0;
4599
+ if (this.undoAvailable < this._size) {
4600
+ this.undoAvailable++;
4601
+ }
4602
+ this.position = (this.position + 1) % this._size;
4603
+ this.ring[this.position] = memo;
4604
+ return memo;
4605
+ }
4606
+ }
4607
+ const DefaultHistoryMemo = new HistoryMemo();
4608
+
4609
+
4548
4610
  // EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 1 modules
4549
4611
  var esm = __webpack_require__(3823);
4550
4612
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/worldToImageCoords.js
@@ -5532,6 +5594,93 @@ function _getImageIndexToJump(numberOfSlices, imageIndex) {
5532
5594
  }
5533
5595
 
5534
5596
 
5597
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/createSubVolume.js
5598
+
5599
+
5600
+
5601
+
5602
+
5603
+ function createSubVolume(referencedVolumeId, boundsIJK, options = {}) {
5604
+ const referencedVolume = cache/* default */.Ay.getVolume(referencedVolumeId);
5605
+ if (!referencedVolume) {
5606
+ throw new Error(`Referenced volume with id ${referencedVolumeId} does not exist.`);
5607
+ }
5608
+ const { metadata, spacing, direction, dimensions: refVolumeDim, } = referencedVolume;
5609
+ const { minX, maxX, minY, maxY, minZ, maxZ } = boundsIJK;
5610
+ const ijkTopLeft = [
5611
+ Math.min(minX, maxX),
5612
+ Math.min(minY, maxY),
5613
+ Math.min(minZ, maxZ),
5614
+ ];
5615
+ const boundingBoxOriginWorld = (0,transformIndexToWorld/* default */.A)(referencedVolume.imageData, ijkTopLeft);
5616
+ const dimensions = [
5617
+ Math.abs(maxX - minX) + 1,
5618
+ Math.abs(maxY - minY) + 1,
5619
+ Math.abs(maxZ - minZ) + 1,
5620
+ ];
5621
+ const { targetBuffer } = options;
5622
+ const subVolumeOptions = {
5623
+ metadata,
5624
+ dimensions,
5625
+ spacing,
5626
+ origin: boundingBoxOriginWorld,
5627
+ direction,
5628
+ targetBuffer,
5629
+ scalarData: targetBuffer?.type === 'Float32Array'
5630
+ ? new Float32Array(dimensions[0] * dimensions[1] * dimensions[2])
5631
+ : undefined,
5632
+ };
5633
+ const subVolume = (0,volumeLoader.createLocalVolume)((0,uuidv4/* default */.A)(), subVolumeOptions);
5634
+ const subVolumeData = subVolume.voxelManager.getCompleteScalarDataArray();
5635
+ const subVolumeSliceSize = dimensions[0] * dimensions[1];
5636
+ const refVolumeSliceSize = refVolumeDim[0] * refVolumeDim[1];
5637
+ const refVolumeData = referencedVolume.voxelManager.getCompleteScalarDataArray();
5638
+ for (let z = 0; z < dimensions[2]; z++) {
5639
+ for (let y = 0; y < dimensions[1]; y++) {
5640
+ const rowStartWorld = (0,transformIndexToWorld/* default */.A)(subVolume.imageData, [
5641
+ 0,
5642
+ y,
5643
+ z,
5644
+ ]);
5645
+ const refVolumeRowStartIJK = (0,transformWorldToIndex/* default */.A)(referencedVolume.imageData, rowStartWorld);
5646
+ const refVolumeRowStartOffset = refVolumeRowStartIJK[2] * refVolumeSliceSize +
5647
+ refVolumeRowStartIJK[1] * refVolumeDim[0] +
5648
+ refVolumeRowStartIJK[0];
5649
+ const rowData = refVolumeData.slice(refVolumeRowStartOffset, refVolumeRowStartOffset + dimensions[0]);
5650
+ const subVolumeLineStartOffset = z * subVolumeSliceSize + y * dimensions[0];
5651
+ subVolumeData.set(rowData, subVolumeLineStartOffset);
5652
+ }
5653
+ }
5654
+ subVolume.voxelManager.setCompleteScalarDataArray(subVolumeData);
5655
+ return subVolume;
5656
+ }
5657
+
5658
+
5659
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getVolumeDirectionVectors.js
5660
+
5661
+
5662
+ function getVolumeDirectionVectors(imageData, camera) {
5663
+ const { viewUp, viewPlaneNormal } = camera;
5664
+ const ijkOrigin = (0,transformWorldToIndex/* transformWorldToIndexContinuous */.p)(imageData, [0, 0, 0]);
5665
+ const worldVecColDir = esm/* vec3.negate */.eR.negate(esm/* vec3.create */.eR.create(), viewUp);
5666
+ const worldVecSliceDir = esm/* vec3.negate */.eR.negate(esm/* vec3.create */.eR.create(), viewPlaneNormal);
5667
+ const worldVecRowDir = esm/* vec3.cross */.eR.cross(esm/* vec3.create */.eR.create(), worldVecColDir, worldVecSliceDir);
5668
+ const ijkVecColDir = esm/* vec3.sub */.eR.sub(esm/* vec3.create */.eR.create(), (0,transformWorldToIndex/* transformWorldToIndexContinuous */.p)(imageData, worldVecColDir), ijkOrigin);
5669
+ const ijkVecSliceDir = esm/* vec3.sub */.eR.sub(esm/* vec3.create */.eR.create(), (0,transformWorldToIndex/* transformWorldToIndexContinuous */.p)(imageData, worldVecSliceDir), ijkOrigin);
5670
+ esm/* vec3.normalize */.eR.normalize(ijkVecColDir, ijkVecColDir);
5671
+ esm/* vec3.normalize */.eR.normalize(ijkVecSliceDir, ijkVecSliceDir);
5672
+ const ijkVecRowDir = esm/* vec3.cross */.eR.cross(esm/* vec3.create */.eR.create(), ijkVecColDir, ijkVecSliceDir);
5673
+ return {
5674
+ worldVecRowDir,
5675
+ worldVecColDir,
5676
+ worldVecSliceDir,
5677
+ ijkVecRowDir,
5678
+ ijkVecColDir,
5679
+ ijkVecSliceDir,
5680
+ };
5681
+ }
5682
+
5683
+
5535
5684
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js
5536
5685
 
5537
5686
 
@@ -5615,6 +5764,9 @@ function _getImageIndexToJump(numberOfSlices, imageIndex) {
5615
5764
 
5616
5765
 
5617
5766
 
5767
+
5768
+
5769
+
5618
5770
 
5619
5771
 
5620
5772
 
@@ -6163,13 +6315,17 @@ function transformIndexToWorld(imageData, voxelPos) {
6163
6315
 
6164
6316
  "use strict";
6165
6317
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6166
- /* harmony export */ A: () => (/* binding */ transformWorldToIndex)
6318
+ /* harmony export */ A: () => (/* binding */ transformWorldToIndex),
6319
+ /* harmony export */ p: () => (/* binding */ transformWorldToIndexContinuous)
6167
6320
  /* harmony export */ });
6168
6321
  function transformWorldToIndex(imageData, worldPos) {
6169
6322
  const continuousIndex = imageData.worldToIndex(worldPos);
6170
6323
  const index = continuousIndex.map(Math.round);
6171
6324
  return index;
6172
6325
  }
6326
+ function transformWorldToIndexContinuous(imageData, worldPos) {
6327
+ return imageData.worldToIndex(worldPos);
6328
+ }
6173
6329
 
6174
6330
 
6175
6331
  /***/ }),
@@ -8092,6 +8248,7 @@ var ChangeTypes;
8092
8248
  ChangeTypes["InitialSetup"] = "InitialSetup";
8093
8249
  ChangeTypes["Completed"] = "Completed";
8094
8250
  ChangeTypes["InterpolationUpdated"] = "InterpolationUpdated";
8251
+ ChangeTypes["History"] = "History";
8095
8252
  })(ChangeTypes || (ChangeTypes = {}));
8096
8253
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChangeTypes);
8097
8254
 
@@ -8171,6 +8328,7 @@ var StrategyCallbacks;
8171
8328
  StrategyCallbacks["CreateIsInThreshold"] = "createIsInThreshold";
8172
8329
  StrategyCallbacks["Initialize"] = "initialize";
8173
8330
  StrategyCallbacks["INTERNAL_setValue"] = "setValue";
8331
+ StrategyCallbacks["AddPreview"] = "addPreview";
8174
8332
  StrategyCallbacks["ComputeInnerCircleRadius"] = "computeInnerCircleRadius";
8175
8333
  StrategyCallbacks["GetStatistics"] = "getStatistics";
8176
8334
  })(StrategyCallbacks || (StrategyCallbacks = {}));
@@ -8634,8 +8792,8 @@ var keyboard = __webpack_require__(39595);
8634
8792
  var SegmentationRenderingEngine = __webpack_require__(24917);
8635
8793
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js
8636
8794
  var esm = __webpack_require__(81985);
8637
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationState.js + 2 modules
8638
- var segmentationState = __webpack_require__(98870);
8795
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationState.js + 1 modules
8796
+ var segmentationState = __webpack_require__(83243);
8639
8797
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/index.js + 2 modules
8640
8798
  var enums = __webpack_require__(99737);
8641
8799
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/helpers/getSegmentationActor.js
@@ -8969,7 +9127,7 @@ function annotationRemovedListener(evt) {
8969
9127
 
8970
9128
  /***/ }),
8971
9129
 
8972
- /***/ 55139:
9130
+ /***/ 69489:
8973
9131
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8974
9132
 
8975
9133
  "use strict";
@@ -8979,7 +9137,7 @@ __webpack_require__.d(__webpack_exports__, {
8979
9137
  utilities: () => (/* reexport */ esm_utilities)
8980
9138
  });
8981
9139
 
8982
- // UNUSED EXPORTS: AdvancedMagnifyTool, AngleTool, AnnotationDisplayTool, AnnotationTool, ArrowAnnotateTool, BaseTool, BidirectionalTool, BrushTool, CONSTANTS, CircleROIStartEndThresholdTool, CircleROITool, CircleScissorsTool, CobbAngleTool, CrosshairsTool, DragProbeTool, ETDRSGridTool, EllipticalROITool, Enums, EraserTool, HeightTool, KeyImageTool, LengthTool, LivewireContourSegmentationTool, LivewireContourTool, MIPJumpToClickTool, MagnifyTool, OrientationMarkerTool, OverlayGridTool, PaintFillTool, PanTool, PlanarFreehandContourSegmentationTool, PlanarFreehandROITool, PlanarRotateTool, ProbeTool, RectangleROIStartEndThresholdTool, RectangleROIThresholdTool, RectangleROITool, RectangleScissorsTool, ReferenceCursors, ReferenceLinesTool, ScaleOverlayTool, SculptorTool, SegmentSelectTool, SegmentationIntersectionTool, SphereScissorsTool, SplineContourSegmentationTool, SplineROITool, StackScrollTool, Synchronizer, SynchronizerManager, ToolGroupManager, TrackballRotateTool, Types, UltrasoundDirectionalTool, VideoRedactionTool, VolumeRotateTool, WindowLevelRegionTool, WindowLevelTool, ZoomTool, addTool, annotation, cancelActiveManipulations, cursors, destroy, drawing, init, removeTool, segmentation, state, synchronizers
9140
+ // UNUSED EXPORTS: AdvancedMagnifyTool, AngleTool, AnnotationDisplayTool, AnnotationTool, ArrowAnnotateTool, BaseTool, BidirectionalTool, BrushTool, CONSTANTS, CircleROIStartEndThresholdTool, CircleROITool, CircleScissorsTool, CobbAngleTool, CrosshairsTool, DragProbeTool, ETDRSGridTool, EllipticalROITool, Enums, EraserTool, HeightTool, KeyImageTool, LengthTool, LivewireContourSegmentationTool, LivewireContourTool, MIPJumpToClickTool, MagnifyTool, OrientationMarkerTool, OverlayGridTool, PaintFillTool, PanTool, PlanarFreehandContourSegmentationTool, PlanarFreehandROITool, PlanarRotateTool, ProbeTool, RectangleROIStartEndThresholdTool, RectangleROIThresholdTool, RectangleROITool, RectangleScissorsTool, ReferenceCursors, ReferenceLinesTool, RegionSegmentPlusTool, RegionSegmentTool, ScaleOverlayTool, SculptorTool, SegmentSelectTool, SegmentationIntersectionTool, SphereScissorsTool, SplineContourSegmentationTool, SplineROITool, StackScrollTool, Synchronizer, SynchronizerManager, ToolGroupManager, TrackballRotateTool, Types, UltrasoundDirectionalTool, VideoRedactionTool, VolumeRotateTool, WholeBodySegmentTool, WindowLevelRegionTool, WindowLevelTool, ZoomTool, addTool, annotation, cancelActiveManipulations, cursors, destroy, drawing, init, removeTool, segmentation, state, synchronizers
8983
9141
 
8984
9142
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js
8985
9143
  var esm = __webpack_require__(81985);
@@ -11198,7 +11356,7 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
11198
11356
  const { position, focalPoint, viewPlaneNormal } = viewport.getCamera();
11199
11357
  let annotations = this._getAnnotations(enabledElement);
11200
11358
  annotations = this.filterInteractableAnnotationsForElement(element, annotations);
11201
- if (annotations.length) {
11359
+ if (annotations?.length) {
11202
11360
  (0,annotationState.removeAnnotation)(annotations[0].annotationUID);
11203
11361
  }
11204
11362
  const annotation = {
@@ -15370,6 +15528,16 @@ class LengthTool extends base/* AnnotationTool */.EC {
15370
15528
  configuration: {
15371
15529
  preventHandleOutsideImage: false,
15372
15530
  getTextLines: defaultGetTextLines,
15531
+ actions: {
15532
+ undo: {
15533
+ method: 'undo',
15534
+ bindings: [{ key: 'z' }],
15535
+ },
15536
+ redo: {
15537
+ method: 'redo',
15538
+ bindings: [{ key: 'y' }],
15539
+ },
15540
+ },
15373
15541
  },
15374
15542
  }) {
15375
15543
  super(toolProps, defaultToolProps);
@@ -15462,8 +15630,6 @@ class LengthTool extends base/* AnnotationTool */.EC {
15462
15630
  };
15463
15631
  this._activateModify(element);
15464
15632
  (0,elementCursor.hideElementCursor)(element);
15465
- const enabledElement = (0,esm.getEnabledElement)(element);
15466
- const { renderingEngine } = enabledElement;
15467
15633
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
15468
15634
  evt.preventDefault();
15469
15635
  };
@@ -15479,13 +15645,12 @@ class LengthTool extends base/* AnnotationTool */.EC {
15479
15645
  this._deactivateModify(element);
15480
15646
  this._deactivateDraw(element);
15481
15647
  (0,elementCursor.resetElementCursor)(element);
15482
- const enabledElement = (0,esm.getEnabledElement)(element);
15483
- const { renderingEngine } = enabledElement;
15484
15648
  if (this.isHandleOutsideImage &&
15485
15649
  this.configuration.preventHandleOutsideImage) {
15486
15650
  (0,annotationState.removeAnnotation)(annotation.annotationUID);
15487
15651
  }
15488
15652
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
15653
+ this.doneEditMemo();
15489
15654
  if (newAnnotation) {
15490
15655
  (0,helpers_state/* triggerAnnotationCompleted */.dZ)(annotation);
15491
15656
  }
@@ -15496,8 +15661,9 @@ class LengthTool extends base/* AnnotationTool */.EC {
15496
15661
  this.isDrawing = true;
15497
15662
  const eventDetail = evt.detail;
15498
15663
  const { element } = eventDetail;
15499
- const { annotation, viewportIdsToRender, handleIndex, movingTextBox } = this.editData;
15664
+ const { annotation, viewportIdsToRender, handleIndex, movingTextBox, newAnnotation, } = this.editData;
15500
15665
  const { data } = annotation;
15666
+ this.createMemo(element, annotation, { newAnnotation });
15501
15667
  if (movingTextBox) {
15502
15668
  const { deltaPoints } = eventDetail;
15503
15669
  const worldPosDelta = deltaPoints.world;
@@ -15748,8 +15914,6 @@ class LengthTool extends base/* AnnotationTool */.EC {
15748
15914
  };
15749
15915
  this._activateModify(element);
15750
15916
  (0,elementCursor.hideElementCursor)(element);
15751
- const enabledElement = (0,esm.getEnabledElement)(element);
15752
- const { renderingEngine } = enabledElement;
15753
15917
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
15754
15918
  evt.preventDefault();
15755
15919
  }
@@ -15778,9 +15942,12 @@ class LengthTool extends base/* AnnotationTool */.EC {
15778
15942
  const handles = [index1, index2];
15779
15943
  const { scale, unit } = (0,getCalibratedUnits/* getCalibratedLengthUnitsAndScale */.Op)(image, handles);
15780
15944
  const length = this._calculateLength(worldPos1, worldPos2) / scale;
15781
- this._isInsideVolume(index1, index2, dimensions)
15782
- ? (this.isHandleOutsideImage = false)
15783
- : (this.isHandleOutsideImage = true);
15945
+ if (this._isInsideVolume(index1, index2, dimensions)) {
15946
+ this.isHandleOutsideImage = false;
15947
+ }
15948
+ else {
15949
+ this.isHandleOutsideImage = true;
15950
+ }
15784
15951
  cachedStats[targetId] = {
15785
15952
  length,
15786
15953
  unit,
@@ -16264,15 +16431,16 @@ var isViewportPreScaled = __webpack_require__(18990);
16264
16431
 
16265
16432
  const { transformWorldToIndex: ProbeTool_transformWorldToIndex } = esm.utilities;
16266
16433
  class ProbeTool extends base/* AnnotationTool */.EC {
16267
- constructor(toolProps = {}, defaultToolProps = {
16434
+ static { this.probeDefaults = {
16268
16435
  supportedInteractionTypes: ['Mouse', 'Touch'],
16269
16436
  configuration: {
16270
16437
  shadow: true,
16271
16438
  preventHandleOutsideImage: false,
16272
16439
  getTextLines: ProbeTool_defaultGetTextLines,
16273
16440
  },
16274
- }) {
16275
- super(toolProps, defaultToolProps);
16441
+ }; }
16442
+ constructor(toolProps = {}, defaultToolProps) {
16443
+ super(toolProps, base/* AnnotationTool */.EC.mergeDefaultProps(ProbeTool.probeDefaults, defaultToolProps));
16276
16444
  this.addNewAnnotation = (evt) => {
16277
16445
  const eventDetail = evt.detail;
16278
16446
  const { currentPoints, element } = eventDetail;
@@ -16324,8 +16492,12 @@ class ProbeTool extends base/* AnnotationTool */.EC {
16324
16492
  };
16325
16493
  this._deactivateModify(element);
16326
16494
  (0,elementCursor.resetElementCursor)(element);
16495
+ if (newAnnotation) {
16496
+ this.createMemo(element, annotation, { newAnnotation });
16497
+ }
16327
16498
  this.editData = null;
16328
16499
  this.isDrawing = false;
16500
+ this.doneEditMemo();
16329
16501
  if (this.isHandleOutsideImage &&
16330
16502
  this.configuration.preventHandleOutsideImage) {
16331
16503
  (0,annotationState.removeAnnotation)(annotation.annotationUID);
@@ -16340,12 +16512,11 @@ class ProbeTool extends base/* AnnotationTool */.EC {
16340
16512
  const eventDetail = evt.detail;
16341
16513
  const { currentPoints, element } = eventDetail;
16342
16514
  const worldPos = currentPoints.world;
16343
- const { annotation, viewportIdsToRender } = this.editData;
16515
+ const { annotation, viewportIdsToRender, newAnnotation } = this.editData;
16344
16516
  const { data } = annotation;
16517
+ this.createMemo(element, annotation, { newAnnotation });
16345
16518
  data.handles.points[0] = [...worldPos];
16346
16519
  annotation.invalidated = true;
16347
- const enabledElement = (0,esm.getEnabledElement)(element);
16348
- const { renderingEngine } = enabledElement;
16349
16520
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
16350
16521
  };
16351
16522
  this.cancel = (element) => {
@@ -16414,13 +16585,13 @@ class ProbeTool extends base/* AnnotationTool */.EC {
16414
16585
  data.cachedStats = {};
16415
16586
  }
16416
16587
  if (!data.cachedStats[targetId] ||
16417
- data.cachedStats[targetId].value == null) {
16588
+ data.cachedStats[targetId].value === null) {
16418
16589
  data.cachedStats[targetId] = {
16419
16590
  Modality: null,
16420
16591
  index: null,
16421
16592
  value: null,
16422
16593
  };
16423
- this._calculateCachedStats(annotation, renderingEngine, enabledElement);
16594
+ this._calculateCachedStats(annotation, renderingEngine, enabledElement, enums.ChangeTypes.StatsUpdated);
16424
16595
  }
16425
16596
  else if (annotation.invalidated) {
16426
16597
  this._calculateCachedStats(annotation, renderingEngine, enabledElement);
@@ -16525,12 +16696,10 @@ class ProbeTool extends base/* AnnotationTool */.EC {
16525
16696
  };
16526
16697
  this._activateModify(element);
16527
16698
  (0,elementCursor.hideElementCursor)(element);
16528
- const enabledElement = (0,esm.getEnabledElement)(element);
16529
- const { renderingEngine } = enabledElement;
16530
16699
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
16531
16700
  evt.preventDefault();
16532
16701
  }
16533
- _calculateCachedStats(annotation, renderingEngine, enabledElement) {
16702
+ _calculateCachedStats(annotation, renderingEngine, enabledElement, changeType = enums.ChangeTypes.StatsUpdated) {
16534
16703
  const data = annotation.data;
16535
16704
  const { renderingEngineId, viewport } = enabledElement;
16536
16705
  const { element } = viewport;
@@ -16590,7 +16759,7 @@ class ProbeTool extends base/* AnnotationTool */.EC {
16590
16759
  };
16591
16760
  }
16592
16761
  annotation.invalidated = false;
16593
- (0,helpers_state/* triggerAnnotationModified */.XF)(annotation, element);
16762
+ (0,helpers_state/* triggerAnnotationModified */.XF)(annotation, element, changeType);
16594
16763
  }
16595
16764
  return cachedStats;
16596
16765
  }
@@ -16598,7 +16767,7 @@ class ProbeTool extends base/* AnnotationTool */.EC {
16598
16767
  function ProbeTool_defaultGetTextLines(data, targetId) {
16599
16768
  const cachedVolumeStats = data.cachedStats[targetId];
16600
16769
  const { index, value, modalityUnit } = cachedVolumeStats;
16601
- if (value === undefined) {
16770
+ if (value === undefined || !index) {
16602
16771
  return;
16603
16772
  }
16604
16773
  const textLines = [];
@@ -16623,6 +16792,7 @@ ProbeTool.toolName = 'Probe';
16623
16792
 
16624
16793
 
16625
16794
 
16795
+
16626
16796
  class DragProbeTool extends annotation_ProbeTool {
16627
16797
  constructor(toolProps = {}, defaultToolProps = {
16628
16798
  supportedInteractionTypes: ['Mouse', 'Touch'],
@@ -16703,7 +16873,7 @@ class DragProbeTool extends annotation_ProbeTool {
16703
16873
  styleSpecifier,
16704
16874
  });
16705
16875
  if (!data.cachedStats[targetId] ||
16706
- data.cachedStats[targetId].value == null) {
16876
+ data.cachedStats[targetId].value === null) {
16707
16877
  data.cachedStats[targetId] = {
16708
16878
  Modality: null,
16709
16879
  index: null,
@@ -16942,8 +17112,6 @@ class EllipticalROITool extends base/* AnnotationTool */.EC {
16942
17112
  };
16943
17113
  this._activateModify(element);
16944
17114
  (0,elementCursor.hideElementCursor)(element);
16945
- const enabledElement = (0,esm.getEnabledElement)(element);
16946
- const { renderingEngine } = enabledElement;
16947
17115
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
16948
17116
  evt.preventDefault();
16949
17117
  };
@@ -16955,12 +17123,12 @@ class EllipticalROITool extends base/* AnnotationTool */.EC {
16955
17123
  if (newAnnotation && !hasMoved) {
16956
17124
  return;
16957
17125
  }
17126
+ this.doneEditMemo();
16958
17127
  annotation.highlighted = false;
16959
17128
  data.handles.activeHandleIndex = null;
16960
17129
  this._deactivateModify(element);
16961
17130
  this._deactivateDraw(element);
16962
17131
  (0,elementCursor.resetElementCursor)(element);
16963
- const { renderingEngine } = (0,esm.getEnabledElement)(element);
16964
17132
  this.editData = null;
16965
17133
  this.isDrawing = false;
16966
17134
  if (this.isHandleOutsideImage &&
@@ -16979,9 +17147,10 @@ class EllipticalROITool extends base/* AnnotationTool */.EC {
16979
17147
  const { currentPoints } = eventDetail;
16980
17148
  const currentCanvasPoints = currentPoints.canvas;
16981
17149
  const enabledElement = (0,esm.getEnabledElement)(element);
16982
- const { renderingEngine, viewport } = enabledElement;
17150
+ const { viewport } = enabledElement;
16983
17151
  const { canvasToWorld } = viewport;
16984
- const { annotation, viewportIdsToRender, centerWorld } = this.editData;
17152
+ const { annotation, viewportIdsToRender, centerWorld, newAnnotation } = this.editData;
17153
+ this.createMemo(element, annotation, { newAnnotation });
16985
17154
  const centerCanvas = viewport.worldToCanvas(centerWorld);
16986
17155
  const { data } = annotation;
16987
17156
  const dX = Math.abs(currentCanvasPoints[0] - centerCanvas[0]);
@@ -17004,7 +17173,8 @@ class EllipticalROITool extends base/* AnnotationTool */.EC {
17004
17173
  this.isDrawing = true;
17005
17174
  const eventDetail = evt.detail;
17006
17175
  const { element } = eventDetail;
17007
- const { annotation, viewportIdsToRender, handleIndex, movingTextBox } = this.editData;
17176
+ const { annotation, viewportIdsToRender, handleIndex, movingTextBox, newAnnotation, } = this.editData;
17177
+ this.createMemo(element, annotation, { newAnnotation });
17008
17178
  const { data } = annotation;
17009
17179
  if (movingTextBox) {
17010
17180
  const { deltaPoints } = eventDetail;
@@ -17629,6 +17799,7 @@ class CircleROITool extends base/* AnnotationTool */.EC {
17629
17799
  if (newAnnotation && !hasMoved) {
17630
17800
  return;
17631
17801
  }
17802
+ this.doneEditMemo();
17632
17803
  annotation.highlighted = false;
17633
17804
  data.handles.activeHandleIndex = null;
17634
17805
  this._deactivateModify(element);
@@ -17653,9 +17824,10 @@ class CircleROITool extends base/* AnnotationTool */.EC {
17653
17824
  const { currentPoints } = eventDetail;
17654
17825
  const currentCanvasPoints = currentPoints.canvas;
17655
17826
  const enabledElement = (0,esm.getEnabledElement)(element);
17656
- const { renderingEngine, viewport } = enabledElement;
17827
+ const { viewport } = enabledElement;
17657
17828
  const { canvasToWorld } = viewport;
17658
- const { annotation, viewportIdsToRender } = this.editData;
17829
+ const { annotation, viewportIdsToRender, newAnnotation } = this.editData;
17830
+ this.createMemo(element, annotation, { newAnnotation });
17659
17831
  const { data } = annotation;
17660
17832
  data.handles.points = [
17661
17833
  data.handles.points[0],
@@ -17669,7 +17841,8 @@ class CircleROITool extends base/* AnnotationTool */.EC {
17669
17841
  this.isDrawing = true;
17670
17842
  const eventDetail = evt.detail;
17671
17843
  const { element } = eventDetail;
17672
- const { annotation, viewportIdsToRender, handleIndex, movingTextBox } = this.editData;
17844
+ const { annotation, viewportIdsToRender, handleIndex, movingTextBox, newAnnotation, } = this.editData;
17845
+ this.createMemo(element, annotation, { newAnnotation });
17673
17846
  const { data } = annotation;
17674
17847
  if (movingTextBox) {
17675
17848
  const { deltaPoints } = eventDetail;
@@ -18620,8 +18793,6 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
18620
18793
  movingTextBox,
18621
18794
  };
18622
18795
  this._activateModify(element);
18623
- const enabledElement = (0,esm.getEnabledElement)(element);
18624
- const { renderingEngine } = enabledElement;
18625
18796
  (0,esm_utilities.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
18626
18797
  evt.preventDefault();
18627
18798
  };
@@ -18660,6 +18831,7 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
18660
18831
  this.fireChangeOnUpdate.changeType = changeType;
18661
18832
  }
18662
18833
  (0,esm_utilities.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
18834
+ this.doneEditMemo();
18663
18835
  this.editData = null;
18664
18836
  this.isDrawing = false;
18665
18837
  };
@@ -18703,12 +18875,10 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
18703
18875
  if (data.contour.closed) {
18704
18876
  return;
18705
18877
  }
18878
+ this.doneEditMemo();
18706
18879
  const eventDetail = evt.detail;
18707
- const { element } = eventDetail;
18708
18880
  const { currentPoints } = eventDetail;
18709
18881
  const { canvas: canvasPoint, world: worldPoint } = currentPoints;
18710
- const enabledElement = (0,esm.getEnabledElement)(element);
18711
- const { renderingEngine } = enabledElement;
18712
18882
  let closeContour = data.handles.points.length >= 2 && doubleClick;
18713
18883
  let addNewPoint = true;
18714
18884
  if (data.handles.points.length >= 3) {
@@ -18734,8 +18904,9 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
18734
18904
  this.isDrawing = true;
18735
18905
  const eventDetail = evt.detail;
18736
18906
  const { element } = eventDetail;
18737
- const { annotation, viewportIdsToRender, handleIndex, movingTextBox } = this.editData;
18907
+ const { annotation, viewportIdsToRender, handleIndex, movingTextBox, newAnnotation, } = this.editData;
18738
18908
  const { data } = annotation;
18909
+ this.createMemo(element, annotation, { newAnnotation });
18739
18910
  if (movingTextBox) {
18740
18911
  const { deltaPoints } = eventDetail;
18741
18912
  const worldPosDelta = deltaPoints.world;
@@ -19327,8 +19498,8 @@ class LivewireContourTool extends ContourSegmentationBaseTool/* default */.A {
19327
19498
  epsilon: 0.1,
19328
19499
  },
19329
19500
  actions: {
19330
- undo: {
19331
- method: 'undo',
19501
+ cancelInProgress: {
19502
+ method: 'cancelInProgress',
19332
19503
  bindings: [
19333
19504
  {
19334
19505
  key: 'Escape',
@@ -19404,6 +19575,7 @@ class LivewireContourTool extends ContourSegmentationBaseTool/* default */.A {
19404
19575
  const { element } = eventDetail;
19405
19576
  const { annotation, viewportIdsToRender, newAnnotation, contourHoleProcessingEnabled, } = this.editData;
19406
19577
  const { data } = annotation;
19578
+ this.doneEditMemo();
19407
19579
  data.handles.activeHandleIndex = null;
19408
19580
  this._deactivateModify(element);
19409
19581
  this._deactivateDraw(element);
@@ -19434,7 +19606,7 @@ class LivewireContourTool extends ContourSegmentationBaseTool/* default */.A {
19434
19606
  };
19435
19607
  this._mouseDownCallback = (evt) => {
19436
19608
  const doubleClick = evt.type === enums.Events.MOUSE_DOUBLE_CLICK;
19437
- const { annotation, viewportIdsToRender, worldToSlice, sliceToWorld } = this.editData;
19609
+ const { annotation, viewportIdsToRender, worldToSlice, sliceToWorld, newAnnotation, } = this.editData;
19438
19610
  if (this.editData.closed) {
19439
19611
  return;
19440
19612
  }
@@ -19447,6 +19619,10 @@ class LivewireContourTool extends ContourSegmentationBaseTool/* default */.A {
19447
19619
  const { viewport, renderingEngine } = enabledElement;
19448
19620
  const controlPoints = this.editData.currentPath.getControlPoints();
19449
19621
  let closePath = controlPoints.length >= 2 && doubleClick;
19622
+ this.doneEditMemo();
19623
+ this.createMemo(element, annotation, {
19624
+ newAnnotation: newAnnotation && controlPoints.length === 1,
19625
+ });
19450
19626
  if (controlPoints.length >= 2) {
19451
19627
  const closestHandlePoint = {
19452
19628
  index: -1,
@@ -19518,7 +19694,8 @@ class LivewireContourTool extends ContourSegmentationBaseTool/* default */.A {
19518
19694
  this.isDrawing = true;
19519
19695
  const eventDetail = evt.detail;
19520
19696
  const { element } = eventDetail;
19521
- const { annotation, viewportIdsToRender, handleIndex, movingTextBox } = this.editData;
19697
+ const { annotation, viewportIdsToRender, movingTextBox, handleIndex, newAnnotation, } = this.editData;
19698
+ this.createMemo(element, annotation, { newAnnotation });
19522
19699
  const { data } = annotation;
19523
19700
  if (movingTextBox) {
19524
19701
  const { deltaPoints } = eventDetail;
@@ -19555,10 +19732,8 @@ class LivewireContourTool extends ContourSegmentationBaseTool/* default */.A {
19555
19732
  if (newAnnotation) {
19556
19733
  (0,annotationState.removeAnnotation)(annotation.annotationUID);
19557
19734
  }
19558
- const enabledElement = (0,esm.getEnabledElement)(element);
19559
- const { renderingEngine } = enabledElement;
19560
19735
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
19561
- this.editData = null;
19736
+ this.doneEditMemo();
19562
19737
  this.scissors = null;
19563
19738
  return annotation.annotationUID;
19564
19739
  };
@@ -19866,8 +20041,9 @@ class LivewireContourTool extends ContourSegmentationBaseTool/* default */.A {
19866
20041
  });
19867
20042
  return annotation;
19868
20043
  }
19869
- undo(element, config, evt) {
20044
+ cancelInProgress(element, config, evt) {
19870
20045
  if (!this.editData) {
20046
+ this.undo();
19871
20047
  return;
19872
20048
  }
19873
20049
  this._endCallback(evt, true);
@@ -19894,7 +20070,7 @@ class LivewireContourTool extends ContourSegmentationBaseTool/* default */.A {
19894
20070
  }
19895
20071
  super.renderAnnotationInstance(renderContext);
19896
20072
  if (!data.cachedStats[targetId] ||
19897
- data.cachedStats[targetId].areaUnit == null) {
20073
+ data.cachedStats[targetId]?.areaUnit === null) {
19898
20074
  data.cachedStats[targetId] = {
19899
20075
  Modality: null,
19900
20076
  area: null,
@@ -20183,12 +20359,14 @@ class ArrowAnnotateTool extends base/* AnnotationTool */.EC {
20183
20359
  }
20184
20360
  annotation.data.text = text;
20185
20361
  (0,helpers_state/* triggerAnnotationCompleted */.dZ)(annotation);
20362
+ this.createMemo(element, annotation, { newAnnotation: !!this.memo });
20186
20363
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
20187
20364
  });
20188
20365
  }
20189
20366
  else {
20190
20367
  (0,helpers_state/* triggerAnnotationModified */.XF)(annotation, element);
20191
20368
  }
20369
+ this.doneEditMemo();
20192
20370
  this.editData = null;
20193
20371
  this.isDrawing = false;
20194
20372
  };
@@ -20196,7 +20374,8 @@ class ArrowAnnotateTool extends base/* AnnotationTool */.EC {
20196
20374
  this.isDrawing = true;
20197
20375
  const eventDetail = evt.detail;
20198
20376
  const { element } = eventDetail;
20199
- const { annotation, viewportIdsToRender, handleIndex, movingTextBox } = this.editData;
20377
+ const { annotation, viewportIdsToRender, handleIndex, movingTextBox, newAnnotation, } = this.editData;
20378
+ this.createMemo(element, annotation, { newAnnotation });
20200
20379
  const { data } = annotation;
20201
20380
  if (movingTextBox) {
20202
20381
  const { deltaPoints } = eventDetail;
@@ -21105,7 +21284,7 @@ class CobbAngleTool extends base/* AnnotationTool */.EC {
21105
21284
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
21106
21285
  evt.preventDefault();
21107
21286
  };
21108
- this._mouseUpCallback = (evt) => {
21287
+ this._endCallback = (evt) => {
21109
21288
  const eventDetail = evt.detail;
21110
21289
  const { element } = eventDetail;
21111
21290
  const { annotation, viewportIdsToRender, newAnnotation, hasMoved } = this.editData;
@@ -21113,6 +21292,7 @@ class CobbAngleTool extends base/* AnnotationTool */.EC {
21113
21292
  if (newAnnotation && !hasMoved) {
21114
21293
  return;
21115
21294
  }
21295
+ this.doneEditMemo();
21116
21296
  if (this.angleStartedNotYetCompleted && data.handles.points.length < 4) {
21117
21297
  (0,elementCursor.resetElementCursor)(element);
21118
21298
  this.editData.handleIndex = data.handles.points.length;
@@ -21162,11 +21342,12 @@ class CobbAngleTool extends base/* AnnotationTool */.EC {
21162
21342
  data.handles.points[2] = data.handles.points[3] = worldPos;
21163
21343
  this.editData.handleIndex = data.handles.points.length - 1;
21164
21344
  };
21165
- this._mouseDragCallback = (evt) => {
21345
+ this._dragCallback = (evt) => {
21166
21346
  this.isDrawing = true;
21167
21347
  const eventDetail = evt.detail;
21168
21348
  const { element } = eventDetail;
21169
- const { annotation, viewportIdsToRender, handleIndex, movingTextBox, isNearFirstLine, isNearSecondLine, } = this.editData;
21349
+ const { annotation, viewportIdsToRender, handleIndex, movingTextBox, isNearFirstLine, isNearSecondLine, newAnnotation, } = this.editData;
21350
+ this.createMemo(element, annotation, { newAnnotation });
21170
21351
  const { data } = annotation;
21171
21352
  if (movingTextBox) {
21172
21353
  const { deltaPoints } = eventDetail;
@@ -21239,30 +21420,30 @@ class CobbAngleTool extends base/* AnnotationTool */.EC {
21239
21420
  };
21240
21421
  this._activateModify = (element) => {
21241
21422
  store_state/* state */.wk.isInteractingWithTool = true;
21242
- element.addEventListener(enums.Events.MOUSE_UP, this._mouseUpCallback);
21243
- element.addEventListener(enums.Events.MOUSE_DRAG, this._mouseDragCallback);
21244
- element.addEventListener(enums.Events.MOUSE_CLICK, this._mouseUpCallback);
21423
+ element.addEventListener(enums.Events.MOUSE_UP, this._endCallback);
21424
+ element.addEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
21425
+ element.addEventListener(enums.Events.MOUSE_CLICK, this._endCallback);
21245
21426
  };
21246
21427
  this._deactivateModify = (element) => {
21247
21428
  store_state/* state */.wk.isInteractingWithTool = false;
21248
- element.removeEventListener(enums.Events.MOUSE_UP, this._mouseUpCallback);
21249
- element.removeEventListener(enums.Events.MOUSE_DRAG, this._mouseDragCallback);
21250
- element.removeEventListener(enums.Events.MOUSE_CLICK, this._mouseUpCallback);
21429
+ element.removeEventListener(enums.Events.MOUSE_UP, this._endCallback);
21430
+ element.removeEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
21431
+ element.removeEventListener(enums.Events.MOUSE_CLICK, this._endCallback);
21251
21432
  };
21252
21433
  this._activateDraw = (element) => {
21253
21434
  store_state/* state */.wk.isInteractingWithTool = true;
21254
- element.addEventListener(enums.Events.MOUSE_UP, this._mouseUpCallback);
21255
- element.addEventListener(enums.Events.MOUSE_DRAG, this._mouseDragCallback);
21256
- element.addEventListener(enums.Events.MOUSE_MOVE, this._mouseDragCallback);
21257
- element.addEventListener(enums.Events.MOUSE_CLICK, this._mouseUpCallback);
21435
+ element.addEventListener(enums.Events.MOUSE_UP, this._endCallback);
21436
+ element.addEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
21437
+ element.addEventListener(enums.Events.MOUSE_MOVE, this._dragCallback);
21438
+ element.addEventListener(enums.Events.MOUSE_CLICK, this._endCallback);
21258
21439
  element.addEventListener(enums.Events.MOUSE_DOWN, this._mouseDownCallback);
21259
21440
  };
21260
21441
  this._deactivateDraw = (element) => {
21261
21442
  store_state/* state */.wk.isInteractingWithTool = false;
21262
- element.removeEventListener(enums.Events.MOUSE_UP, this._mouseUpCallback);
21263
- element.removeEventListener(enums.Events.MOUSE_DRAG, this._mouseDragCallback);
21264
- element.removeEventListener(enums.Events.MOUSE_MOVE, this._mouseDragCallback);
21265
- element.removeEventListener(enums.Events.MOUSE_CLICK, this._mouseUpCallback);
21443
+ element.removeEventListener(enums.Events.MOUSE_UP, this._endCallback);
21444
+ element.removeEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
21445
+ element.removeEventListener(enums.Events.MOUSE_MOVE, this._dragCallback);
21446
+ element.removeEventListener(enums.Events.MOUSE_CLICK, this._endCallback);
21266
21447
  element.removeEventListener(enums.Events.MOUSE_DOWN, this._mouseDownCallback);
21267
21448
  };
21268
21449
  this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
@@ -21582,8 +21763,6 @@ class CobbAngleTool extends base/* AnnotationTool */.EC {
21582
21763
  };
21583
21764
  this._activateModify(element);
21584
21765
  (0,elementCursor.hideElementCursor)(element);
21585
- const enabledElement = (0,esm.getEnabledElement)(element);
21586
- const { renderingEngine } = enabledElement;
21587
21766
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
21588
21767
  evt.preventDefault();
21589
21768
  }
@@ -22151,7 +22330,7 @@ class KeyImageTool extends base/* AnnotationTool */.EC {
22151
22330
  const { currentPoints, element } = eventDetail;
22152
22331
  const worldPos = currentPoints.world;
22153
22332
  const enabledElement = (0,esm.getEnabledElement)(element);
22154
- const { viewport, renderingEngine } = enabledElement;
22333
+ const { viewport } = enabledElement;
22155
22334
  const camera = viewport.getCamera();
22156
22335
  const { viewPlaneNormal, viewUp } = camera;
22157
22336
  const referencedImageId = this.getReferencedImageId(viewport, worldPos, viewPlaneNormal, viewUp);
@@ -22173,6 +22352,7 @@ class KeyImageTool extends base/* AnnotationTool */.EC {
22173
22352
  (0,helpers_state/* triggerAnnotationCompleted */.dZ)(annotation);
22174
22353
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
22175
22354
  });
22355
+ this.createMemo(element, annotation, { newAnnotation: true });
22176
22356
  return annotation;
22177
22357
  };
22178
22358
  this.isPointNearTool = (element, annotation, canvasCoords, proximity) => {
@@ -22198,6 +22378,7 @@ class KeyImageTool extends base/* AnnotationTool */.EC {
22198
22378
  this._endCallback = (evt) => {
22199
22379
  const eventDetail = evt.detail;
22200
22380
  const { element } = eventDetail;
22381
+ this.doneEditMemo();
22201
22382
  this._deactivateModify(element);
22202
22383
  (0,elementCursor.resetElementCursor)(element);
22203
22384
  };
@@ -22214,8 +22395,10 @@ class KeyImageTool extends base/* AnnotationTool */.EC {
22214
22395
  return;
22215
22396
  }
22216
22397
  const annotation = clickedAnnotation;
22398
+ this.createMemo(element, annotation);
22217
22399
  this.configuration.changeTextCallback(clickedAnnotation, evt.detail, this._doneChangingTextCallback.bind(this, element, annotation));
22218
22400
  this.isDrawing = false;
22401
+ this.doneEditMemo();
22219
22402
  evt.stopImmediatePropagation();
22220
22403
  evt.preventDefault();
22221
22404
  };
@@ -22336,10 +22519,10 @@ class AnnotationEraserTool extends base/* BaseTool */.oS {
22336
22519
  continue;
22337
22520
  }
22338
22521
  const annotations = (0,annotationState.getAnnotations)(toolName, element);
22339
- if (!annotations.length) {
22522
+ const interactableAnnotations = toolInstance.filterInteractableAnnotationsForElement(element, annotations);
22523
+ if (!interactableAnnotations) {
22340
22524
  continue;
22341
22525
  }
22342
- const interactableAnnotations = toolInstance.filterInteractableAnnotationsForElement(element, annotations) || [];
22343
22526
  for (const annotation of interactableAnnotations) {
22344
22527
  if (toolInstance.isPointNearTool(element, annotation, currentPoints.canvas, 10, interactionType)) {
22345
22528
  annotationsToRemove.push(annotation.annotationUID);
@@ -22348,6 +22531,10 @@ class AnnotationEraserTool extends base/* BaseTool */.oS {
22348
22531
  }
22349
22532
  for (const annotationUID of annotationsToRemove) {
22350
22533
  (0,annotationSelection.setAnnotationSelected)(annotationUID);
22534
+ const annotation = (0,annotationState.getAnnotation)(annotationUID);
22535
+ base/* AnnotationTool */.EC.createAnnotationMemo(element, annotation, {
22536
+ deleting: true,
22537
+ });
22351
22538
  (0,annotationState.removeAnnotation)(annotationUID);
22352
22539
  }
22353
22540
  evt.preventDefault();
@@ -22357,12 +22544,355 @@ class AnnotationEraserTool extends base/* BaseTool */.oS {
22357
22544
  AnnotationEraserTool.toolName = 'Eraser';
22358
22545
  /* harmony default export */ const tools_AnnotationEraserTool = ((/* unused pure expression or super */ null && (AnnotationEraserTool)));
22359
22546
 
22547
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/index.js + 21 modules
22548
+ var utilities_segmentation = __webpack_require__(26971);
22549
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/base/GrowCutBaseTool.js
22550
+ var GrowCutBaseTool = __webpack_require__(10639);
22551
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/RegionSegmentTool.js
22552
+
22553
+
22554
+
22555
+
22556
+
22557
+
22558
+
22559
+
22560
+ class RegionSegmentTool extends GrowCutBaseTool/* default */.A {
22561
+ constructor(toolProps = {}, defaultToolProps = {
22562
+ supportedInteractionTypes: ['Mouse', 'Touch'],
22563
+ configuration: {},
22564
+ }) {
22565
+ super(toolProps, defaultToolProps);
22566
+ this._dragCallback = (evt) => {
22567
+ const eventData = evt.detail;
22568
+ const { element, currentPoints } = eventData;
22569
+ const { world: currentWorldPoint } = currentPoints;
22570
+ const enabledElement = (0,esm.getEnabledElement)(element);
22571
+ const { viewport } = enabledElement;
22572
+ this.growCutData.circleBorderPoint = currentWorldPoint;
22573
+ (0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
22574
+ };
22575
+ this._endCallback = async (evt) => {
22576
+ const eventData = evt.detail;
22577
+ const { element } = eventData;
22578
+ const enabledElement = (0,esm.getEnabledElement)(element);
22579
+ const { viewport } = enabledElement;
22580
+ this.runGrowCut();
22581
+ this._deactivateDraw(element);
22582
+ this.growCutData = null;
22583
+ (0,elementCursor.resetElementCursor)(element);
22584
+ (0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
22585
+ };
22586
+ this._deactivateDraw = (element) => {
22587
+ element.removeEventListener(enums.Events.MOUSE_UP, this._endCallback);
22588
+ element.removeEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
22589
+ element.removeEventListener(enums.Events.MOUSE_CLICK, this._endCallback);
22590
+ };
22591
+ }
22592
+ async preMouseDownCallback(evt) {
22593
+ const eventData = evt.detail;
22594
+ const { element, currentPoints } = eventData;
22595
+ const { world: worldPoint } = currentPoints;
22596
+ const enabledElement = (0,esm.getEnabledElement)(element);
22597
+ const { viewport, renderingEngine } = enabledElement;
22598
+ super.preMouseDownCallback(evt);
22599
+ Object.assign(this.growCutData, {
22600
+ circleCenterPoint: worldPoint,
22601
+ circleBorderPoint: worldPoint,
22602
+ });
22603
+ this._activateDraw(element);
22604
+ (0,elementCursor.hideElementCursor)(element);
22605
+ (0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
22606
+ return true;
22607
+ }
22608
+ async getGrowCutLabelmap() {
22609
+ const { segmentation: { segmentIndex, referencedVolumeId }, renderingEngineId, viewportId, circleCenterPoint, circleBorderPoint, } = this.growCutData;
22610
+ const renderingEngine = (0,esm.getRenderingEngine)(renderingEngineId);
22611
+ const viewport = renderingEngine.getViewport(viewportId);
22612
+ const worldCircleRadius = gl_matrix_esm/* vec3.len */.eR.len(gl_matrix_esm/* vec3.sub */.eR.sub(gl_matrix_esm/* vec3.create */.eR.create(), circleCenterPoint, circleBorderPoint));
22613
+ const sphereInfo = {
22614
+ center: circleCenterPoint,
22615
+ radius: worldCircleRadius,
22616
+ };
22617
+ const options = {
22618
+ positiveSeedValue: segmentIndex,
22619
+ negativeSeedValue: 255,
22620
+ };
22621
+ return utilities_segmentation.growCut.runGrowCutForSphere(referencedVolumeId, sphereInfo, viewport, options);
22622
+ }
22623
+ _activateDraw(element) {
22624
+ element.addEventListener(enums.Events.MOUSE_UP, this._endCallback);
22625
+ element.addEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
22626
+ element.addEventListener(enums.Events.MOUSE_CLICK, this._endCallback);
22627
+ }
22628
+ renderAnnotation(enabledElement, svgDrawingHelper) {
22629
+ if (!this.growCutData) {
22630
+ return;
22631
+ }
22632
+ const { viewport } = enabledElement;
22633
+ const { segmentation: segmentationData, circleCenterPoint, circleBorderPoint, } = this.growCutData;
22634
+ const canvasCenterPoint = viewport.worldToCanvas(circleCenterPoint);
22635
+ const canvasBorderPoint = viewport.worldToCanvas(circleBorderPoint);
22636
+ const vecCenterToBorder = gl_matrix_esm/* vec2.sub */.Zc.sub(gl_matrix_esm/* vec2.create */.Zc.create(), canvasBorderPoint, canvasCenterPoint);
22637
+ const circleRadius = gl_matrix_esm/* vec2.len */.Zc.len(vecCenterToBorder);
22638
+ if (esm.utilities.isEqual(circleRadius, 0)) {
22639
+ return;
22640
+ }
22641
+ const annotationUID = 'growcut';
22642
+ const circleUID = '0';
22643
+ const { color } = this.getSegmentStyle({
22644
+ segmentationId: segmentationData.segmentationId,
22645
+ segmentIndex: segmentationData.segmentIndex,
22646
+ viewportId: viewport.id,
22647
+ });
22648
+ (0,drawingSvg.drawCircle)(svgDrawingHelper, annotationUID, circleUID, canvasCenterPoint, circleRadius, {
22649
+ color,
22650
+ });
22651
+ }
22652
+ }
22653
+ RegionSegmentTool.toolName = 'RegionSegment';
22654
+ /* harmony default export */ const annotation_RegionSegmentTool = ((/* unused pure expression or super */ null && (RegionSegmentTool)));
22655
+
22656
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/RegionSegmentPlusTool.js
22657
+
22658
+
22659
+
22660
+ class RegionSegmentPlusTool extends GrowCutBaseTool/* default */.A {
22661
+ constructor(toolProps = {}, defaultToolProps = {
22662
+ supportedInteractionTypes: ['Mouse', 'Touch'],
22663
+ configuration: {
22664
+ positiveSeedVariance: 0.4,
22665
+ negativeSeedVariance: 0.9,
22666
+ subVolumePaddingPercentage: 0.1,
22667
+ },
22668
+ }) {
22669
+ super(toolProps, defaultToolProps);
22670
+ }
22671
+ async preMouseDownCallback(evt) {
22672
+ const eventData = evt.detail;
22673
+ const { currentPoints } = eventData;
22674
+ const { world: worldPoint } = currentPoints;
22675
+ super.preMouseDownCallback(evt);
22676
+ this.growCutData.worldPoint = worldPoint;
22677
+ this.runGrowCut();
22678
+ return true;
22679
+ }
22680
+ async getGrowCutLabelmap() {
22681
+ const { segmentation: { segmentIndex, referencedVolumeId }, renderingEngineId, viewportId, worldPoint, } = this.growCutData;
22682
+ const renderingEngine = (0,esm.getRenderingEngine)(renderingEngineId);
22683
+ const viewport = renderingEngine.getViewport(viewportId);
22684
+ const { positiveSeedVariance, negativeSeedVariance, subVolumePaddingPercentage, } = this.configuration;
22685
+ const options = {
22686
+ positiveSeedValue: segmentIndex,
22687
+ negativeSeedValue: 255,
22688
+ positiveSeedVariance: positiveSeedVariance,
22689
+ negativeSeedVariance: negativeSeedVariance,
22690
+ subVolumePaddingPercentage: subVolumePaddingPercentage,
22691
+ };
22692
+ return await utilities_segmentation.growCut.runOneClickGrowCut(referencedVolumeId, worldPoint, viewport, options);
22693
+ }
22694
+ }
22695
+ RegionSegmentPlusTool.toolName = 'RegionSegmentPlus';
22696
+ /* harmony default export */ const annotation_RegionSegmentPlusTool = ((/* unused pure expression or super */ null && (RegionSegmentPlusTool)));
22697
+
22698
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/WholeBodySegmentTool.js
22699
+
22700
+
22701
+
22702
+
22703
+
22704
+
22705
+
22706
+
22707
+ const { transformWorldToIndex: WholeBodySegmentTool_transformWorldToIndex, transformIndexToWorld } = esm.utilities;
22708
+ class WholeBodySegmentTool extends GrowCutBaseTool/* default */.A {
22709
+ constructor(toolProps = {}, defaultToolProps = {
22710
+ supportedInteractionTypes: ['Mouse', 'Touch'],
22711
+ configuration: {},
22712
+ }) {
22713
+ super(toolProps, defaultToolProps);
22714
+ this._dragCallback = (evt) => {
22715
+ const eventData = evt.detail;
22716
+ const { element, currentPoints } = eventData;
22717
+ const { world: currentWorldPoint } = currentPoints;
22718
+ const enabledElement = (0,esm.getEnabledElement)(element);
22719
+ const { viewport } = enabledElement;
22720
+ const linePoints = this._getHorizontalLineWorldPoints(enabledElement, currentWorldPoint);
22721
+ this.growCutData.horizontalLines[1] = linePoints;
22722
+ (0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
22723
+ };
22724
+ this._endCallback = async (evt) => {
22725
+ const eventData = evt.detail;
22726
+ const { element } = eventData;
22727
+ const enabledElement = (0,esm.getEnabledElement)(element);
22728
+ const { viewport } = enabledElement;
22729
+ await this.runGrowCut();
22730
+ this._deactivateDraw(element);
22731
+ this.growCutData = null;
22732
+ (0,elementCursor.resetElementCursor)(element);
22733
+ (0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
22734
+ };
22735
+ this._deactivateDraw = (element) => {
22736
+ element.removeEventListener(enums.Events.MOUSE_UP, this._endCallback);
22737
+ element.removeEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
22738
+ element.removeEventListener(enums.Events.MOUSE_CLICK, this._endCallback);
22739
+ };
22740
+ }
22741
+ async preMouseDownCallback(evt) {
22742
+ const eventData = evt.detail;
22743
+ const { element, currentPoints } = eventData;
22744
+ const { world: worldPoint } = currentPoints;
22745
+ const enabledElement = (0,esm.getEnabledElement)(element);
22746
+ const { viewport, renderingEngine } = enabledElement;
22747
+ const linePoints = this._getHorizontalLineWorldPoints(enabledElement, worldPoint);
22748
+ super.preMouseDownCallback(evt);
22749
+ this.growCutData.horizontalLines = [linePoints, linePoints];
22750
+ this._activateDraw(element);
22751
+ (0,elementCursor.hideElementCursor)(element);
22752
+ (0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
22753
+ return true;
22754
+ }
22755
+ renderAnnotation(enabledElement, svgDrawingHelper) {
22756
+ if (!this.growCutData) {
22757
+ return;
22758
+ }
22759
+ const { segmentation: segmentationData, horizontalLines } = this.growCutData;
22760
+ if (horizontalLines.length !== 2) {
22761
+ return;
22762
+ }
22763
+ const { viewport } = enabledElement;
22764
+ const { segmentationId, segmentIndex } = segmentationData;
22765
+ const [line1, line2] = horizontalLines;
22766
+ const [worldLine1P1, worldLine1P2] = line1;
22767
+ const [worldLine2P1, worldLine2P2] = line2;
22768
+ const canvasPoints = [
22769
+ worldLine1P1,
22770
+ worldLine1P2,
22771
+ worldLine2P2,
22772
+ worldLine2P1,
22773
+ ].map((worldPoint) => viewport.worldToCanvas(worldPoint));
22774
+ const annotationUID = 'growCutRect';
22775
+ const squareGroupUID = '0';
22776
+ const { color, fillColor, lineWidth, fillOpacity, lineDash } = this.getSegmentStyle({
22777
+ segmentationId,
22778
+ segmentIndex,
22779
+ viewportId: viewport.id,
22780
+ });
22781
+ (0,drawingSvg.drawPolyline)(svgDrawingHelper, annotationUID, squareGroupUID, canvasPoints, {
22782
+ color,
22783
+ fillColor,
22784
+ fillOpacity,
22785
+ lineWidth,
22786
+ lineDash,
22787
+ closePath: true,
22788
+ });
22789
+ }
22790
+ async getGrowCutLabelmap() {
22791
+ const { segmentation: { segmentIndex, referencedVolumeId }, renderingEngineId, viewportId, horizontalLines, } = this.growCutData;
22792
+ const renderingEngine = (0,esm.getRenderingEngine)(renderingEngineId);
22793
+ const viewport = renderingEngine.getViewport(viewportId);
22794
+ const [line1, line2] = horizontalLines;
22795
+ const worldSquarePoints = [line1[0], line1[1], line2[1], line2[0]];
22796
+ const referencedVolume = esm.cache.getVolume(referencedVolumeId);
22797
+ const { topLeft: worldTopLeft, bottomRight: worldBottomRight } = this._getWorldBoundingBoxFromProjectedSquare(viewport, worldSquarePoints);
22798
+ const ijkTopLeft = WholeBodySegmentTool_transformWorldToIndex(referencedVolume.imageData, worldTopLeft);
22799
+ const ijkBottomRight = WholeBodySegmentTool_transformWorldToIndex(referencedVolume.imageData, worldBottomRight);
22800
+ const boundingBoxInfo = {
22801
+ boundingBox: {
22802
+ ijkTopLeft,
22803
+ ijkBottomRight,
22804
+ },
22805
+ };
22806
+ const options = {
22807
+ positiveSeedValue: segmentIndex,
22808
+ negativeSeedValue: 255,
22809
+ };
22810
+ return utilities_segmentation.growCut.runGrowCutForBoundingBox(referencedVolumeId, boundingBoxInfo, options);
22811
+ }
22812
+ _activateDraw(element) {
22813
+ element.addEventListener(enums.Events.MOUSE_UP, this._endCallback);
22814
+ element.addEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
22815
+ element.addEventListener(enums.Events.MOUSE_CLICK, this._endCallback);
22816
+ }
22817
+ _projectWorldPointAcrossSlices(viewport, worldEdgePoint, vecDirection) {
22818
+ const volume = this._getViewportVolume(viewport);
22819
+ const { dimensions } = volume;
22820
+ const ijkPoint = WholeBodySegmentTool_transformWorldToIndex(volume.imageData, worldEdgePoint);
22821
+ const axis = vecDirection.findIndex((n) => esm.utilities.isEqual(Math.abs(n), 1));
22822
+ if (axis === -1) {
22823
+ throw new Error('Non-orthogonal direction vector');
22824
+ }
22825
+ const ijkLineP1 = [...ijkPoint];
22826
+ const ijkLineP2 = [...ijkPoint];
22827
+ ijkLineP1[axis] = 0;
22828
+ ijkLineP2[axis] = dimensions[axis] - 1;
22829
+ return [ijkLineP1, ijkLineP2];
22830
+ }
22831
+ _getCuboidIJKEdgePointsFromProjectedWorldPoint(viewport, worldEdgePoint) {
22832
+ const { viewPlaneNormal } = viewport.getCamera();
22833
+ return this._projectWorldPointAcrossSlices(viewport, worldEdgePoint, viewPlaneNormal);
22834
+ }
22835
+ _getWorldCuboidCornerPoints(viewport, worldSquarePoints) {
22836
+ const cuboidPoints = [];
22837
+ const volume = this._getViewportVolume(viewport);
22838
+ worldSquarePoints.forEach((worldSquarePoint) => {
22839
+ const ijkEdgePoints = this._getCuboidIJKEdgePointsFromProjectedWorldPoint(viewport, worldSquarePoint);
22840
+ const worldEdgePoints = ijkEdgePoints.map((ijkPoint) => transformIndexToWorld(volume.imageData, ijkPoint));
22841
+ cuboidPoints.push(...worldEdgePoints);
22842
+ });
22843
+ return cuboidPoints;
22844
+ }
22845
+ _getWorldBoundingBoxFromProjectedSquare(viewport, worldSquarePoints) {
22846
+ const worldCuboidPoints = this._getWorldCuboidCornerPoints(viewport, worldSquarePoints);
22847
+ const topLeft = [...worldCuboidPoints[0]];
22848
+ const bottomRight = [...worldCuboidPoints[0]];
22849
+ worldCuboidPoints.forEach((worldPoint) => {
22850
+ gl_matrix_esm/* vec3.min */.eR.min(topLeft, topLeft, worldPoint);
22851
+ gl_matrix_esm/* vec3.max */.eR.max(bottomRight, bottomRight, worldPoint);
22852
+ });
22853
+ return { topLeft, bottomRight };
22854
+ }
22855
+ _getViewportVolume(viewport) {
22856
+ if (!(viewport instanceof esm.BaseVolumeViewport)) {
22857
+ throw new Error('Viewport is not a BaseVolumeViewport');
22858
+ }
22859
+ const volumeId = viewport.getAllVolumeIds()[0];
22860
+ return esm.cache.getVolume(volumeId);
22861
+ }
22862
+ _getHorizontalLineIJKPoints(enabledElement, worldPoint) {
22863
+ const { viewport } = enabledElement;
22864
+ const volume = this._getViewportVolume(viewport);
22865
+ const { dimensions } = volume;
22866
+ const ijkPoint = WholeBodySegmentTool_transformWorldToIndex(volume.imageData, worldPoint);
22867
+ const { viewUp, viewPlaneNormal } = viewport.getCamera();
22868
+ const vecRow = gl_matrix_esm/* vec3.cross */.eR.cross(gl_matrix_esm/* vec3.create */.eR.create(), viewUp, viewPlaneNormal);
22869
+ const axis = vecRow.findIndex((n) => esm.utilities.isEqual(Math.abs(n), 1));
22870
+ const ijkLineP1 = [...ijkPoint];
22871
+ const ijkLineP2 = [...ijkPoint];
22872
+ ijkLineP1[axis] = 0;
22873
+ ijkLineP2[axis] = dimensions[axis] - 1;
22874
+ return [ijkLineP1, ijkLineP2];
22875
+ }
22876
+ _getHorizontalLineWorldPoints(enabledElement, worldPoint) {
22877
+ const { viewport } = enabledElement;
22878
+ const volume = this._getViewportVolume(viewport);
22879
+ const [ijkPoint1, ijkPoint2] = this._getHorizontalLineIJKPoints(enabledElement, worldPoint);
22880
+ const worldPoint1 = transformIndexToWorld(volume.imageData, ijkPoint1);
22881
+ const worldPoint2 = transformIndexToWorld(volume.imageData, ijkPoint2);
22882
+ return [worldPoint1, worldPoint2];
22883
+ }
22884
+ }
22885
+ WholeBodySegmentTool.toolName = 'WholeBodySegmentTool';
22886
+ /* harmony default export */ const annotation_WholeBodySegmentTool = ((/* unused pure expression or super */ null && (WholeBodySegmentTool)));
22887
+
22360
22888
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/segmentation/strategies/fillRectangle.js
22361
22889
  var fillRectangle = __webpack_require__(10088);
22362
22890
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/segmentation/strategies/eraseRectangle.js
22363
22891
  var eraseRectangle = __webpack_require__(47347);
22364
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationState.js + 2 modules
22365
- var segmentationState = __webpack_require__(98870);
22892
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationState.js + 1 modules
22893
+ var segmentationState = __webpack_require__(83243);
22894
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/segmentation/LabelmapBaseTool.js
22895
+ var LabelmapBaseTool = __webpack_require__(23631);
22366
22896
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/segmentation/RectangleScissorsTool.js
22367
22897
 
22368
22898
 
@@ -22375,12 +22905,13 @@ var segmentationState = __webpack_require__(98870);
22375
22905
 
22376
22906
 
22377
22907
 
22378
- class RectangleScissorsTool extends base/* BaseTool */.oS {
22908
+
22909
+ class RectangleScissorsTool extends LabelmapBaseTool/* default */.A {
22379
22910
  constructor(toolProps = {}, defaultToolProps = {
22380
22911
  supportedInteractionTypes: ['Mouse', 'Touch'],
22381
22912
  configuration: {
22382
22913
  strategies: {
22383
- FILL_INSIDE: fillRectangle/* fillInsideRectangle */.p,
22914
+ FILL_INSIDE: fillRectangle/* fillInsideRectangle */.pY,
22384
22915
  ERASE_INSIDE: eraseRectangle/* eraseInsideRectangle */.M,
22385
22916
  },
22386
22917
  defaultStrategy: 'FILL_INSIDE',
@@ -22537,10 +23068,13 @@ class RectangleScissorsTool extends base/* BaseTool */.oS {
22537
23068
  const operationData = {
22538
23069
  ...this.editData,
22539
23070
  points: data.handles.points,
23071
+ strategySpecificConfiguration: {},
23072
+ createMemo: this.createMemo.bind(this),
22540
23073
  };
22541
23074
  this.editData = null;
22542
23075
  this.isDrawing = false;
22543
23076
  this.applyActiveStrategy(enabledElement, operationData);
23077
+ this.doneEditMemo();
22544
23078
  };
22545
23079
  this._activateDraw = (element) => {
22546
23080
  element.addEventListener(enums.Events.MOUSE_UP, this._endCallback);
@@ -22604,7 +23138,8 @@ var eraseCircle = __webpack_require__(33852);
22604
23138
 
22605
23139
 
22606
23140
 
22607
- class CircleScissorsTool extends base/* BaseTool */.oS {
23141
+
23142
+ class CircleScissorsTool extends LabelmapBaseTool/* default */.A {
22608
23143
  constructor(toolProps = {}, defaultToolProps = {
22609
23144
  supportedInteractionTypes: ['Mouse', 'Touch'],
22610
23145
  configuration: {
@@ -22763,10 +23298,12 @@ class CircleScissorsTool extends base/* BaseTool */.oS {
22763
23298
  viewPlaneNormal,
22764
23299
  viewUp,
22765
23300
  strategySpecificConfiguration: {},
23301
+ createMemo: this.createMemo.bind(this),
22766
23302
  };
22767
23303
  this.editData = null;
22768
23304
  this.isDrawing = false;
22769
23305
  this.applyActiveStrategy(enabledElement, operationData);
23306
+ this.doneEditMemo();
22770
23307
  };
22771
23308
  this._activateDraw = (element) => {
22772
23309
  element.addEventListener(enums.Events.MOUSE_UP, this._endCallback);
@@ -22841,7 +23378,8 @@ var eraseSphere = __webpack_require__(1989);
22841
23378
 
22842
23379
 
22843
23380
 
22844
- class SphereScissorsTool extends base/* BaseTool */.oS {
23381
+
23382
+ class SphereScissorsTool extends LabelmapBaseTool/* default */.A {
22845
23383
  constructor(toolProps = {}, defaultToolProps = {
22846
23384
  supportedInteractionTypes: ['Mouse', 'Touch'],
22847
23385
  configuration: {
@@ -22858,6 +23396,7 @@ class SphereScissorsTool extends base/* BaseTool */.oS {
22858
23396
  if (this.isDrawing === true) {
22859
23397
  return;
22860
23398
  }
23399
+ this.doneEditMemo();
22861
23400
  const eventDetail = evt.detail;
22862
23401
  const { currentPoints, element } = eventDetail;
22863
23402
  const worldPos = currentPoints.world;
@@ -22998,10 +23537,12 @@ class SphereScissorsTool extends base/* BaseTool */.oS {
22998
23537
  segmentsLocked,
22999
23538
  viewPlaneNormal,
23000
23539
  viewUp,
23540
+ createMemo: this.createMemo.bind(this),
23001
23541
  };
23002
23542
  this.editData = null;
23003
23543
  this.isDrawing = false;
23004
23544
  this.applyActiveStrategy(enabledElement, operationData);
23545
+ this.doneEditMemo();
23005
23546
  };
23006
23547
  this._activateDraw = (element) => {
23007
23548
  element.addEventListener(enums.Events.MOUSE_UP, this._endCallback);
@@ -23583,9 +24124,9 @@ class PaintFillTool extends base/* BaseTool */.oS {
23583
24124
  const { representationData } = (0,segmentationState.getSegmentation)(segmentationId);
23584
24125
  let dimensions;
23585
24126
  let direction;
23586
- let scalarData;
23587
24127
  let index;
23588
24128
  let voxelManager;
24129
+ this.doneEditMemo();
23589
24130
  if (viewport instanceof esm.BaseVolumeViewport) {
23590
24131
  const { volumeId } = representationData[enums.SegmentationRepresentations.Labelmap];
23591
24132
  const segmentation = esm.cache.getVolume(volumeId);
@@ -24090,8 +24631,6 @@ var segmentation_activeSegmentation = __webpack_require__(26228);
24090
24631
  var SegmentationRepresentations = __webpack_require__(18682);
24091
24632
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentIndex.js
24092
24633
  var segmentIndex = __webpack_require__(70930);
24093
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/index.js + 15 modules
24094
- var utilities_segmentation = __webpack_require__(67470);
24095
24634
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/segmentation/SegmentSelectTool.js
24096
24635
 
24097
24636
 
@@ -24243,6 +24782,9 @@ SegmentSelectTool.toolName = 'SegmentSelectTool';
24243
24782
 
24244
24783
 
24245
24784
 
24785
+
24786
+
24787
+
24246
24788
 
24247
24789
 
24248
24790
 
@@ -24390,7 +24932,7 @@ class VideoRedactionTool extends base/* AnnotationTool */.EC {
24390
24932
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportUIDsToRender);
24391
24933
  evt.preventDefault();
24392
24934
  };
24393
- this._mouseUpCallback = (evt) => {
24935
+ this._endCallback = (evt) => {
24394
24936
  const eventData = evt.detail;
24395
24937
  const { element } = eventData;
24396
24938
  const { annotation, viewportUIDsToRender, newAnnotation, hasMoved } = this.editData;
@@ -24398,12 +24940,12 @@ class VideoRedactionTool extends base/* AnnotationTool */.EC {
24398
24940
  if (newAnnotation && !hasMoved) {
24399
24941
  return;
24400
24942
  }
24943
+ this.doneEditMemo();
24401
24944
  data.active = false;
24402
24945
  data.handles.activeHandleIndex = null;
24403
24946
  this._deactivateModify(element);
24404
24947
  this._deactivateDraw(element);
24405
24948
  (0,elementCursor.resetElementCursor)(element);
24406
- const enabledElement = (0,esm.getEnabledElement)(element);
24407
24949
  this.editData = null;
24408
24950
  this.isDrawing = false;
24409
24951
  if (this.isHandleOutsideImage &&
@@ -24412,11 +24954,12 @@ class VideoRedactionTool extends base/* AnnotationTool */.EC {
24412
24954
  }
24413
24955
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportUIDsToRender);
24414
24956
  };
24415
- this._mouseDragCallback = (evt) => {
24957
+ this._dragCallback = (evt) => {
24416
24958
  this.isDrawing = true;
24417
24959
  const eventData = evt.detail;
24418
24960
  const { element } = eventData;
24419
- const { annotation, viewportUIDsToRender, handleIndex } = this.editData;
24961
+ const { annotation, viewportUIDsToRender, handleIndex, newAnnotation } = this.editData;
24962
+ this.createMemo(element, annotation, { newAnnotation });
24420
24963
  const { data } = annotation;
24421
24964
  if (handleIndex === undefined) {
24422
24965
  const { deltaPoints } = eventData;
@@ -24482,37 +25025,37 @@ class VideoRedactionTool extends base/* AnnotationTool */.EC {
24482
25025
  };
24483
25026
  this._activateDraw = (element) => {
24484
25027
  store_state/* state */.wk.isInteractingWithTool = true;
24485
- element.addEventListener(enums.Events.MOUSE_UP, this._mouseUpCallback);
24486
- element.addEventListener(enums.Events.MOUSE_DRAG, this._mouseDragCallback);
24487
- element.addEventListener(enums.Events.MOUSE_MOVE, this._mouseDragCallback);
24488
- element.addEventListener(enums.Events.MOUSE_CLICK, this._mouseUpCallback);
24489
- element.addEventListener(enums.Events.TOUCH_END, this._mouseUpCallback);
24490
- element.addEventListener(enums.Events.TOUCH_DRAG, this._mouseDragCallback);
25028
+ element.addEventListener(enums.Events.MOUSE_UP, this._endCallback);
25029
+ element.addEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
25030
+ element.addEventListener(enums.Events.MOUSE_MOVE, this._dragCallback);
25031
+ element.addEventListener(enums.Events.MOUSE_CLICK, this._endCallback);
25032
+ element.addEventListener(enums.Events.TOUCH_END, this._endCallback);
25033
+ element.addEventListener(enums.Events.TOUCH_DRAG, this._dragCallback);
24491
25034
  };
24492
25035
  this._deactivateDraw = (element) => {
24493
25036
  store_state/* state */.wk.isInteractingWithTool = false;
24494
- element.removeEventListener(enums.Events.MOUSE_UP, this._mouseUpCallback);
24495
- element.removeEventListener(enums.Events.MOUSE_DRAG, this._mouseDragCallback);
24496
- element.removeEventListener(enums.Events.MOUSE_MOVE, this._mouseDragCallback);
24497
- element.removeEventListener(enums.Events.MOUSE_CLICK, this._mouseUpCallback);
24498
- element.removeEventListener(enums.Events.TOUCH_END, this._mouseUpCallback);
24499
- element.removeEventListener(enums.Events.TOUCH_DRAG, this._mouseDragCallback);
25037
+ element.removeEventListener(enums.Events.MOUSE_UP, this._endCallback);
25038
+ element.removeEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
25039
+ element.removeEventListener(enums.Events.MOUSE_MOVE, this._dragCallback);
25040
+ element.removeEventListener(enums.Events.MOUSE_CLICK, this._endCallback);
25041
+ element.removeEventListener(enums.Events.TOUCH_END, this._endCallback);
25042
+ element.removeEventListener(enums.Events.TOUCH_DRAG, this._dragCallback);
24500
25043
  };
24501
25044
  this._activateModify = (element) => {
24502
25045
  store_state/* state */.wk.isInteractingWithTool = true;
24503
- element.addEventListener(enums.Events.MOUSE_UP, this._mouseUpCallback);
24504
- element.addEventListener(enums.Events.MOUSE_DRAG, this._mouseDragCallback);
24505
- element.addEventListener(enums.Events.MOUSE_CLICK, this._mouseUpCallback);
24506
- element.addEventListener(enums.Events.TOUCH_END, this._mouseUpCallback);
24507
- element.addEventListener(enums.Events.TOUCH_DRAG, this._mouseDragCallback);
25046
+ element.addEventListener(enums.Events.MOUSE_UP, this._endCallback);
25047
+ element.addEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
25048
+ element.addEventListener(enums.Events.MOUSE_CLICK, this._endCallback);
25049
+ element.addEventListener(enums.Events.TOUCH_END, this._endCallback);
25050
+ element.addEventListener(enums.Events.TOUCH_DRAG, this._dragCallback);
24508
25051
  };
24509
25052
  this._deactivateModify = (element) => {
24510
25053
  store_state/* state */.wk.isInteractingWithTool = false;
24511
- element.removeEventListener(enums.Events.MOUSE_UP, this._mouseUpCallback);
24512
- element.removeEventListener(enums.Events.MOUSE_DRAG, this._mouseDragCallback);
24513
- element.removeEventListener(enums.Events.MOUSE_CLICK, this._mouseUpCallback);
24514
- element.removeEventListener(enums.Events.TOUCH_END, this._mouseUpCallback);
24515
- element.removeEventListener(enums.Events.TOUCH_DRAG, this._mouseDragCallback);
25054
+ element.removeEventListener(enums.Events.MOUSE_UP, this._endCallback);
25055
+ element.removeEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
25056
+ element.removeEventListener(enums.Events.MOUSE_CLICK, this._endCallback);
25057
+ element.removeEventListener(enums.Events.TOUCH_END, this._endCallback);
25058
+ element.removeEventListener(enums.Events.TOUCH_DRAG, this._dragCallback);
24516
25059
  };
24517
25060
  this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
24518
25061
  const renderStatus = false;
@@ -24526,8 +25069,6 @@ class VideoRedactionTool extends base/* AnnotationTool */.EC {
24526
25069
  if (!annotations?.length) {
24527
25070
  return renderStatus;
24528
25071
  }
24529
- const targetId = this.getTargetId(viewport);
24530
- const renderingEngine = viewport.getRenderingEngine();
24531
25072
  const styleSpecifier = {
24532
25073
  toolGroupId: this.toolGroupId,
24533
25074
  toolName: this.getToolName(),
@@ -24536,7 +25077,6 @@ class VideoRedactionTool extends base/* AnnotationTool */.EC {
24536
25077
  for (let i = 0; i < annotations.length; i++) {
24537
25078
  const annotation = annotations[i];
24538
25079
  const { annotationUID } = annotation;
24539
- const toolMetadata = annotation.metadata;
24540
25080
  const data = annotation.data;
24541
25081
  const { points, activeHandleIndex } = data.handles;
24542
25082
  const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
@@ -25089,7 +25629,7 @@ const defaultFrameOfReferenceSpecificAnnotationManager = new FrameOfReferenceSpe
25089
25629
  /* unused harmony exports setAnnotationLocked, getAnnotationsLocked, getAnnotationsLockedCount, unlockAllAnnotations */
25090
25630
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81985);
25091
25631
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99737);
25092
- /* harmony import */ var _getAnnotation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69059);
25632
+ /* harmony import */ var _annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(82056);
25093
25633
 
25094
25634
 
25095
25635
 
@@ -25136,7 +25676,7 @@ function lock(annotationUID, lockedAnnotationUIDsSet, detail) {
25136
25676
  if (!lockedAnnotationUIDsSet.has(annotationUID)) {
25137
25677
  lockedAnnotationUIDsSet.add(annotationUID);
25138
25678
  detail.added.push(annotationUID);
25139
- const annotation = (0,_getAnnotation__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotation */ .g)(annotationUID);
25679
+ const annotation = (0,_annotationState__WEBPACK_IMPORTED_MODULE_2__.getAnnotation)(annotationUID);
25140
25680
  if (annotation) {
25141
25681
  annotation.isLocked = true;
25142
25682
  }
@@ -25145,7 +25685,7 @@ function lock(annotationUID, lockedAnnotationUIDsSet, detail) {
25145
25685
  function unlock(annotationUID, lockedAnnotationUIDsSet, detail) {
25146
25686
  if (lockedAnnotationUIDsSet.delete(annotationUID)) {
25147
25687
  detail.removed.push(annotationUID);
25148
- const annotation = (0,_getAnnotation__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotation */ .g)(annotationUID);
25688
+ const annotation = (0,_annotationState__WEBPACK_IMPORTED_MODULE_2__.getAnnotation)(annotationUID);
25149
25689
  if (annotation) {
25150
25690
  annotation.isLocked = false;
25151
25691
  }
@@ -25179,7 +25719,7 @@ function publish(detail, lockedAnnotationUIDsSet) {
25179
25719
  /* unused harmony exports getAnnotationsSelected, getAnnotationsSelectedByToolName, getAnnotationsSelectedCount */
25180
25720
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81985);
25181
25721
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99737);
25182
- /* harmony import */ var _getAnnotation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69059);
25722
+ /* harmony import */ var _annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(82056);
25183
25723
 
25184
25724
 
25185
25725
 
@@ -25196,7 +25736,7 @@ function selectAnnotation(annotationUID, preserveSelected = false) {
25196
25736
  const detail = makeEventDetail();
25197
25737
  if (!preserveSelected) {
25198
25738
  clearSelectionSet(selectedAnnotationUIDs, detail);
25199
- const annotation = (0,_getAnnotation__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotation */ .g)(annotationUID);
25739
+ const annotation = (0,_annotationState__WEBPACK_IMPORTED_MODULE_2__.getAnnotation)(annotationUID);
25200
25740
  if (annotation) {
25201
25741
  annotation.isSelected = true;
25202
25742
  }
@@ -25204,7 +25744,7 @@ function selectAnnotation(annotationUID, preserveSelected = false) {
25204
25744
  if (annotationUID && !selectedAnnotationUIDs.has(annotationUID)) {
25205
25745
  selectedAnnotationUIDs.add(annotationUID);
25206
25746
  detail.added.push(annotationUID);
25207
- const annotation = (0,_getAnnotation__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotation */ .g)(annotationUID);
25747
+ const annotation = (0,_annotationState__WEBPACK_IMPORTED_MODULE_2__.getAnnotation)(annotationUID);
25208
25748
  if (annotation) {
25209
25749
  annotation.isSelected = true;
25210
25750
  }
@@ -25216,7 +25756,7 @@ function deselectAnnotation(annotationUID) {
25216
25756
  if (annotationUID) {
25217
25757
  if (selectedAnnotationUIDs.delete(annotationUID)) {
25218
25758
  detail.removed.push(annotationUID);
25219
- const annotation = (0,_getAnnotation__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotation */ .g)(annotationUID);
25759
+ const annotation = (0,_annotationState__WEBPACK_IMPORTED_MODULE_2__.getAnnotation)(annotationUID);
25220
25760
  annotation.isSelected = false;
25221
25761
  }
25222
25762
  }
@@ -25251,7 +25791,7 @@ function clearSelectionSet(selectionSet, detail) {
25251
25791
  selectionSet.forEach((value) => {
25252
25792
  if (selectionSet.delete(value)) {
25253
25793
  detail.removed.push(value);
25254
- const annotation = (0,_getAnnotation__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotation */ .g)(value);
25794
+ const annotation = (0,_annotationState__WEBPACK_IMPORTED_MODULE_2__.getAnnotation)(value);
25255
25795
  if (annotation) {
25256
25796
  annotation.isSelected = false;
25257
25797
  }
@@ -25279,7 +25819,7 @@ __webpack_require__.r(__webpack_exports__);
25279
25819
  /* harmony export */ addChildAnnotation: () => (/* binding */ addChildAnnotation),
25280
25820
  /* harmony export */ clearParentAnnotation: () => (/* binding */ clearParentAnnotation),
25281
25821
  /* harmony export */ getAllAnnotations: () => (/* binding */ getAllAnnotations),
25282
- /* harmony export */ getAnnotation: () => (/* reexport safe */ _getAnnotation__WEBPACK_IMPORTED_MODULE_2__.g),
25822
+ /* harmony export */ getAnnotation: () => (/* binding */ getAnnotation),
25283
25823
  /* harmony export */ getAnnotationManager: () => (/* binding */ getAnnotationManager),
25284
25824
  /* harmony export */ getAnnotations: () => (/* binding */ getAnnotations),
25285
25825
  /* harmony export */ getChildAnnotations: () => (/* binding */ getChildAnnotations),
@@ -25289,49 +25829,28 @@ __webpack_require__.r(__webpack_exports__);
25289
25829
  /* harmony export */ removeAllAnnotations: () => (/* binding */ removeAllAnnotations),
25290
25830
  /* harmony export */ removeAnnotation: () => (/* binding */ removeAnnotation),
25291
25831
  /* harmony export */ removeAnnotations: () => (/* binding */ removeAnnotations),
25292
- /* harmony export */ resetAnnotationManager: () => (/* binding */ resetAnnotationManager),
25293
25832
  /* harmony export */ setAnnotationManager: () => (/* binding */ setAnnotationManager)
25294
25833
  /* harmony export */ });
25295
25834
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81985);
25296
- /* harmony import */ var _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67013);
25297
- /* harmony import */ var _getAnnotation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69059);
25298
- /* harmony import */ var _helpers_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44049);
25299
- /* harmony import */ var _annotationLocking__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2076);
25300
- /* harmony import */ var _utilities_defineProperties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(82107);
25301
- /* harmony import */ var _annotationVisibility__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(29601);
25302
-
25303
-
25835
+ /* harmony import */ var _helpers_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44049);
25304
25836
 
25305
25837
 
25306
-
25307
-
25308
-
25309
- let defaultManager = _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_1__/* .defaultFrameOfReferenceSpecificAnnotationManager */ .H;
25310
- const preprocessingFn = (annotation) => {
25311
- annotation = (0,_utilities_defineProperties__WEBPACK_IMPORTED_MODULE_5__/* .checkAndDefineTextBoxProperty */ .Q)(annotation);
25312
- annotation = (0,_utilities_defineProperties__WEBPACK_IMPORTED_MODULE_5__/* .checkAndDefineCachedStatsProperty */ .d)(annotation);
25313
- const uid = annotation.annotationUID;
25314
- const isLocked = (0,_annotationLocking__WEBPACK_IMPORTED_MODULE_4__.checkAndSetAnnotationLocked)(uid);
25315
- annotation.isLocked = isLocked;
25316
- const isVisible = (0,_annotationVisibility__WEBPACK_IMPORTED_MODULE_6__.checkAndSetAnnotationVisibility)(uid);
25317
- annotation.isVisible = isVisible;
25318
- return annotation;
25319
- };
25320
- defaultManager.setPreprocessingFn(preprocessingFn);
25838
+ let defaultManager;
25321
25839
  function getAnnotationManager() {
25322
25840
  return defaultManager;
25323
25841
  }
25324
25842
  function setAnnotationManager(annotationManager) {
25325
25843
  defaultManager = annotationManager;
25326
25844
  }
25327
- function resetAnnotationManager() {
25328
- defaultManager = _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_1__/* .defaultFrameOfReferenceSpecificAnnotationManager */ .H;
25329
- }
25330
25845
  function getAnnotations(toolName, annotationGroupSelector) {
25331
25846
  const manager = getAnnotationManager();
25332
25847
  const groupKey = manager.getGroupKey(annotationGroupSelector);
25333
25848
  return manager.getAnnotations(groupKey, toolName);
25334
25849
  }
25850
+ function getAnnotation(annotationUID) {
25851
+ const manager = getAnnotationManager();
25852
+ return manager.getAnnotation(annotationUID);
25853
+ }
25335
25854
  function getAllAnnotations() {
25336
25855
  const manager = getAnnotationManager();
25337
25856
  return manager.getAllAnnotations();
@@ -25341,7 +25860,7 @@ function clearParentAnnotation(annotation) {
25341
25860
  if (!parentAnnotationUID) {
25342
25861
  return;
25343
25862
  }
25344
- const parentAnnotation = (0,_getAnnotation__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotation */ .g)(parentAnnotationUID);
25863
+ const parentAnnotation = getAnnotation(parentAnnotationUID);
25345
25864
  const childUIDIndex = parentAnnotation.childAnnotationUIDs.indexOf(childUID);
25346
25865
  parentAnnotation.childAnnotationUIDs.splice(childUIDIndex, 1);
25347
25866
  annotation.parentAnnotationUID = undefined;
@@ -25361,11 +25880,11 @@ function addChildAnnotation(parentAnnotation, childAnnotation) {
25361
25880
  }
25362
25881
  function getParentAnnotation(annotation) {
25363
25882
  return annotation.parentAnnotationUID
25364
- ? (0,_getAnnotation__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotation */ .g)(annotation.parentAnnotationUID)
25883
+ ? getAnnotation(annotation.parentAnnotationUID)
25365
25884
  : undefined;
25366
25885
  }
25367
25886
  function getChildAnnotations(annotation) {
25368
- return (annotation.childAnnotationUIDs?.map((childAnnotationUID) => (0,_getAnnotation__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotation */ .g)(childAnnotationUID)) ?? []);
25887
+ return (annotation.childAnnotationUIDs?.map((childAnnotationUID) => getAnnotation(childAnnotationUID)) ?? []);
25369
25888
  }
25370
25889
  function addAnnotation(annotation, annotationGroupSelector) {
25371
25890
  if (!annotation.annotationUID) {
@@ -25375,11 +25894,11 @@ function addAnnotation(annotation, annotationGroupSelector) {
25375
25894
  if (annotationGroupSelector instanceof HTMLDivElement) {
25376
25895
  const groupKey = manager.getGroupKey(annotationGroupSelector);
25377
25896
  manager.addAnnotation(annotation, groupKey);
25378
- (0,_helpers_state__WEBPACK_IMPORTED_MODULE_3__/* .triggerAnnotationAddedForElement */ .$f)(annotation, annotationGroupSelector);
25897
+ (0,_helpers_state__WEBPACK_IMPORTED_MODULE_1__/* .triggerAnnotationAddedForElement */ .$f)(annotation, annotationGroupSelector);
25379
25898
  }
25380
25899
  else {
25381
25900
  manager.addAnnotation(annotation, undefined);
25382
- (0,_helpers_state__WEBPACK_IMPORTED_MODULE_3__/* .triggerAnnotationAddedForFOR */ ._3)(annotation);
25901
+ (0,_helpers_state__WEBPACK_IMPORTED_MODULE_1__/* .triggerAnnotationAddedForFOR */ ._3)(annotation);
25383
25902
  }
25384
25903
  return annotation.annotationUID;
25385
25904
  }
@@ -25399,13 +25918,13 @@ function removeAnnotation(annotationUID) {
25399
25918
  }
25400
25919
  annotation.childAnnotationUIDs?.forEach((childAnnotationUID) => removeAnnotation(childAnnotationUID));
25401
25920
  manager.removeAnnotation(annotationUID);
25402
- (0,_helpers_state__WEBPACK_IMPORTED_MODULE_3__/* .triggerAnnotationRemoved */ .SH)({ annotation, annotationManagerUID: manager.uid });
25921
+ (0,_helpers_state__WEBPACK_IMPORTED_MODULE_1__/* .triggerAnnotationRemoved */ .SH)({ annotation, annotationManagerUID: manager.uid });
25403
25922
  }
25404
25923
  function removeAllAnnotations() {
25405
25924
  const manager = getAnnotationManager();
25406
25925
  const removedAnnotations = manager.removeAllAnnotations();
25407
25926
  for (const annotation of removedAnnotations) {
25408
- (0,_helpers_state__WEBPACK_IMPORTED_MODULE_3__/* .triggerAnnotationRemoved */ .SH)({
25927
+ (0,_helpers_state__WEBPACK_IMPORTED_MODULE_1__/* .triggerAnnotationRemoved */ .SH)({
25409
25928
  annotation,
25410
25929
  annotationManagerUID: manager.uid,
25411
25930
  });
@@ -25416,7 +25935,7 @@ function removeAnnotations(toolName, annotationGroupSelector) {
25416
25935
  const groupKey = manager.getGroupKey(annotationGroupSelector);
25417
25936
  const removedAnnotations = manager.removeAnnotations(groupKey, toolName);
25418
25937
  for (const annotation of removedAnnotations) {
25419
- (0,_helpers_state__WEBPACK_IMPORTED_MODULE_3__/* .triggerAnnotationRemoved */ .SH)({
25938
+ (0,_helpers_state__WEBPACK_IMPORTED_MODULE_1__/* .triggerAnnotationRemoved */ .SH)({
25420
25939
  annotation,
25421
25940
  annotationManagerUID: manager.uid,
25422
25941
  });
@@ -25427,7 +25946,7 @@ function invalidateAnnotation(annotation) {
25427
25946
  while (currAnnotation) {
25428
25947
  currAnnotation.invalidated = true;
25429
25948
  currAnnotation = currAnnotation.parentAnnotationUID
25430
- ? (0,_getAnnotation__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotation */ .g)(currAnnotation.parentAnnotationUID)
25949
+ ? getAnnotation(currAnnotation.parentAnnotationUID)
25431
25950
  : undefined;
25432
25951
  }
25433
25952
  }
@@ -25448,7 +25967,7 @@ function invalidateAnnotation(annotation) {
25448
25967
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81985);
25449
25968
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99737);
25450
25969
  /* harmony import */ var _annotationSelection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17343);
25451
- /* harmony import */ var _getAnnotation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(69059);
25970
+ /* harmony import */ var _annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82056);
25452
25971
 
25453
25972
 
25454
25973
 
@@ -25474,7 +25993,7 @@ function showAllAnnotations() {
25474
25993
  publish(detail);
25475
25994
  }
25476
25995
  function isAnnotationVisible(annotationUID) {
25477
- const annotation = (0,_getAnnotation__WEBPACK_IMPORTED_MODULE_3__/* .getAnnotation */ .g)(annotationUID);
25996
+ const annotation = (0,_annotationState__WEBPACK_IMPORTED_MODULE_3__.getAnnotation)(annotationUID);
25478
25997
  if (annotation) {
25479
25998
  return !globalHiddenAnnotationUIDsSet.has(annotationUID);
25480
25999
  }
@@ -25489,7 +26008,7 @@ function makeEventDetail() {
25489
26008
  function show(annotationUID, annotationUIDsSet, detail) {
25490
26009
  if (annotationUIDsSet.delete(annotationUID)) {
25491
26010
  detail.lastVisible.push(annotationUID);
25492
- const annotation = (0,_getAnnotation__WEBPACK_IMPORTED_MODULE_3__/* .getAnnotation */ .g)(annotationUID);
26011
+ const annotation = (0,_annotationState__WEBPACK_IMPORTED_MODULE_3__.getAnnotation)(annotationUID);
25493
26012
  annotation.isVisible = true;
25494
26013
  }
25495
26014
  }
@@ -25758,24 +26277,6 @@ var ToolStyle = __webpack_require__(8710);
25758
26277
 
25759
26278
 
25760
26279
 
25761
- /***/ }),
25762
-
25763
- /***/ 69059:
25764
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25765
-
25766
- "use strict";
25767
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25768
- /* harmony export */ g: () => (/* binding */ getAnnotation)
25769
- /* harmony export */ });
25770
- /* harmony import */ var _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67013);
25771
-
25772
- function getAnnotation(annotationUID) {
25773
- const manager = _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_0__/* .defaultFrameOfReferenceSpecificAnnotationManager */ .H;
25774
- const annotation = manager.getAnnotation(annotationUID);
25775
- return annotation;
25776
- }
25777
-
25778
-
25779
26280
  /***/ }),
25780
26281
 
25781
26282
  /***/ 44049:
@@ -25881,7 +26382,7 @@ function _triggerAnnotationCompleted(eventDetail) {
25881
26382
  // EXPORTS
25882
26383
  __webpack_require__.d(__webpack_exports__, {
25883
26384
  config: () => (/* reexport */ config),
25884
- state: () => (/* reexport */ annotationState)
26385
+ state: () => (/* binding */ state)
25885
26386
  });
25886
26387
 
25887
26388
  // UNUSED EXPORTS: AnnotationGroup, FrameOfReferenceSpecificAnnotationManager, locking, selection, visibility
@@ -25973,6 +26474,8 @@ class AnnotationGroup {
25973
26474
  }
25974
26475
  }
25975
26476
 
26477
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/resetAnnotationManager.js + 1 modules
26478
+ var resetAnnotationManager = __webpack_require__(97);
25976
26479
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/index.js
25977
26480
 
25978
26481
 
@@ -25982,6 +26485,11 @@ class AnnotationGroup {
25982
26485
 
25983
26486
 
25984
26487
 
26488
+ const state = {
26489
+ ...annotationState,
26490
+ resetAnnotationManager: resetAnnotationManager/* resetAnnotationManager */.c,
26491
+ };
26492
+
25985
26493
 
25986
26494
 
25987
26495
  /***/ }),
@@ -27092,11 +27600,16 @@ function addSurfaceRepresentationToViewportMap(viewportInputMap) {
27092
27600
  /***/ }),
27093
27601
 
27094
27602
  /***/ 30935:
27095
- /***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
27603
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27096
27604
 
27097
27605
  "use strict";
27098
27606
 
27099
- // UNUSED EXPORTS: addSegmentations, default
27607
+ // EXPORTS
27608
+ __webpack_require__.d(__webpack_exports__, {
27609
+ d: () => (/* binding */ addSegmentations)
27610
+ });
27611
+
27612
+ // UNUSED EXPORTS: default
27100
27613
 
27101
27614
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/SegmentationStateManager.js
27102
27615
  var SegmentationStateManager = __webpack_require__(59475);
@@ -27109,14 +27622,14 @@ var esm = __webpack_require__(81985);
27109
27622
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/helpers/normalizeSegmentationInput.js
27110
27623
 
27111
27624
 
27112
- function normalizeSegmentationInput_normalizeSegmentationInput(segmentationInput) {
27625
+ function normalizeSegmentationInput(segmentationInput) {
27113
27626
  const { segmentationId, representation, config } = segmentationInput;
27114
27627
  const { type, data: inputData } = representation;
27115
27628
  const data = inputData ? { ...inputData } : {};
27116
27629
  if (!data) {
27117
27630
  throw new Error('Segmentation representation data may not be undefined');
27118
27631
  }
27119
- if (type === SegmentationRepresentations.Contour) {
27632
+ if (type === enums.SegmentationRepresentations.Contour) {
27120
27633
  normalizeContourData(data);
27121
27634
  }
27122
27635
  const normalizedSegments = normalizeSegments(config?.segments, type, data);
@@ -27150,7 +27663,7 @@ function normalizeSegments(segmentsConfig, type, data) {
27150
27663
  };
27151
27664
  });
27152
27665
  }
27153
- else if (type === SegmentationRepresentations.Surface) {
27666
+ else if (type === enums.SegmentationRepresentations.Surface) {
27154
27667
  normalizeSurfaceSegments(normalizedSegments, data);
27155
27668
  }
27156
27669
  else {
@@ -27161,7 +27674,7 @@ function normalizeSegments(segmentsConfig, type, data) {
27161
27674
  function normalizeSurfaceSegments(normalizedSegments, surfaceData) {
27162
27675
  const { geometryIds } = surfaceData;
27163
27676
  geometryIds.forEach((geometryId) => {
27164
- const geometry = cache.getGeometry(geometryId);
27677
+ const geometry = esm.cache.getGeometry(geometryId);
27165
27678
  if (geometry?.data) {
27166
27679
  const { segmentIndex } = geometry.data;
27167
27680
  normalizedSegments[segmentIndex] = { segmentIndex };
@@ -27177,19 +27690,19 @@ function createDefaultSegment() {
27177
27690
  active: true,
27178
27691
  };
27179
27692
  }
27180
- /* harmony default export */ const helpers_normalizeSegmentationInput = ((/* unused pure expression or super */ null && (normalizeSegmentationInput_normalizeSegmentationInput)));
27693
+ /* harmony default export */ const helpers_normalizeSegmentationInput = (normalizeSegmentationInput);
27181
27694
 
27182
27695
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/addSegmentations.js
27183
27696
 
27184
27697
 
27185
27698
 
27186
27699
  function addSegmentations(segmentationInputArray, suppressEvents) {
27187
- const segmentationStateManager = defaultSegmentationStateManager;
27700
+ const segmentationStateManager = SegmentationStateManager/* defaultSegmentationStateManager */._6;
27188
27701
  segmentationInputArray.forEach((segmentationInput) => {
27189
- const segmentation = normalizeSegmentationInput(segmentationInput);
27702
+ const segmentation = helpers_normalizeSegmentationInput(segmentationInput);
27190
27703
  segmentationStateManager.addSegmentation(segmentation);
27191
27704
  if (!suppressEvents) {
27192
- triggerSegmentationModified(segmentation.segmentationId);
27705
+ (0,triggerSegmentationEvents.triggerSegmentationModified)(segmentation.segmentationId);
27193
27706
  }
27194
27707
  });
27195
27708
  }
@@ -27346,6 +27859,23 @@ function getCurrentLabelmapImageIdForViewport(viewportId, segmentationId) {
27346
27859
  }
27347
27860
 
27348
27861
 
27862
+ /***/ }),
27863
+
27864
+ /***/ 33283:
27865
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27866
+
27867
+ "use strict";
27868
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27869
+ /* harmony export */ T: () => (/* binding */ getSegmentation)
27870
+ /* harmony export */ });
27871
+ /* harmony import */ var _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59475);
27872
+
27873
+ function getSegmentation(segmentationId) {
27874
+ const segmentationStateManager = _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__/* .defaultSegmentationStateManager */ ._6;
27875
+ return segmentationStateManager.getSegmentation(segmentationId);
27876
+ }
27877
+
27878
+
27349
27879
  /***/ }),
27350
27880
 
27351
27881
  /***/ 93210:
@@ -27354,9 +27884,9 @@ function getCurrentLabelmapImageIdForViewport(viewportId, segmentationId) {
27354
27884
  "use strict";
27355
27885
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27356
27886
  /* harmony export */ Ut: () => (/* binding */ getSegmentationRepresentation),
27887
+ /* harmony export */ ny: () => (/* binding */ getSegmentationRepresentationsBySegmentationId),
27357
27888
  /* harmony export */ r$: () => (/* binding */ getSegmentationRepresentations)
27358
27889
  /* harmony export */ });
27359
- /* unused harmony export getSegmentationRepresentationsBySegmentationId */
27360
27890
  /* harmony import */ var _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59475);
27361
27891
 
27362
27892
  function getSegmentationRepresentations(viewportId, specifier = {}) {
@@ -27372,7 +27902,7 @@ function getSegmentationRepresentation(viewportId, specifier) {
27372
27902
  return representations?.[0];
27373
27903
  }
27374
27904
  function getSegmentationRepresentationsBySegmentationId(segmentationId) {
27375
- const segmentationStateManager = defaultSegmentationStateManager;
27905
+ const segmentationStateManager = _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__/* .defaultSegmentationStateManager */ ._6;
27376
27906
  return segmentationStateManager.getSegmentationRepresentationsBySegmentationId(segmentationId);
27377
27907
  }
27378
27908
 
@@ -27412,6 +27942,23 @@ function getSegmentations() {
27412
27942
  }
27413
27943
 
27414
27944
 
27945
+ /***/ }),
27946
+
27947
+ /***/ 71309:
27948
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27949
+
27950
+ "use strict";
27951
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27952
+ /* harmony export */ B: () => (/* binding */ getStackSegmentationImageIdsForViewport)
27953
+ /* harmony export */ });
27954
+ /* harmony import */ var _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59475);
27955
+
27956
+ function getStackSegmentationImageIdsForViewport(viewportId, segmentationId) {
27957
+ const segmentationStateManager = _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__/* .defaultSegmentationStateManager */ ._6;
27958
+ return segmentationStateManager.getStackSegmentationImageIdsForViewport(viewportId, segmentationId);
27959
+ }
27960
+
27961
+
27415
27962
  /***/ }),
27416
27963
 
27417
27964
  /***/ 58859:
@@ -27440,20 +27987,22 @@ function getViewportIdsWithSegmentation(segmentationId) {
27440
27987
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27441
27988
 
27442
27989
  "use strict";
27443
- /* unused harmony export getViewportSegmentations */
27990
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27991
+ /* harmony export */ a: () => (/* binding */ getViewportSegmentations)
27992
+ /* harmony export */ });
27444
27993
  /* harmony import */ var _getSegmentation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33283);
27445
27994
  /* harmony import */ var _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59475);
27446
27995
 
27447
27996
 
27448
27997
  function getViewportSegmentations(viewportId, type) {
27449
- const segmentationStateManager = defaultSegmentationStateManager;
27998
+ const segmentationStateManager = _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_1__/* .defaultSegmentationStateManager */ ._6;
27450
27999
  const state = segmentationStateManager.getState();
27451
28000
  const viewportRepresentations = state.viewportSegRepresentations[viewportId];
27452
28001
  const segmentations = viewportRepresentations.map((representation) => {
27453
28002
  if (type && representation.type === type) {
27454
- return getSegmentation(representation.segmentationId);
28003
+ return (0,_getSegmentation__WEBPACK_IMPORTED_MODULE_0__/* .getSegmentation */ .T)(representation.segmentationId);
27455
28004
  }
27456
- return getSegmentation(representation.segmentationId);
28005
+ return (0,_getSegmentation__WEBPACK_IMPORTED_MODULE_0__/* .getSegmentation */ .T)(representation.segmentationId);
27457
28006
  });
27458
28007
  const filteredSegmentations = segmentations.filter((segmentation) => segmentation !== undefined);
27459
28008
  return filteredSegmentations;
@@ -27489,10 +28038,11 @@ __webpack_require__.d(__webpack_exports__, {
27489
28038
  addSegmentationRepresentations: () => (/* reexport */ addSegmentationRepresentationsToViewport/* addSegmentationRepresentations */.gR),
27490
28039
  config: () => (/* reexport */ config_namespaceObject),
27491
28040
  segmentIndex: () => (/* reexport */ segmentIndex),
27492
- segmentLocking: () => (/* reexport */ segmentLocking)
28041
+ segmentLocking: () => (/* reexport */ segmentLocking),
28042
+ state: () => (/* reexport */ segmentationState)
27493
28043
  });
27494
28044
 
27495
- // UNUSED EXPORTS: addContourRepresentationToViewport, addContourRepresentationToViewportMap, addLabelmapRepresentationToViewport, addLabelmapRepresentationToViewportMap, addSegmentations, addSurfaceRepresentationToViewport, addSurfaceRepresentationToViewportMap, getLabelmapImageIds, helpers, polySeg, removeAllSegmentationRepresentations, removeAllSegmentations, removeContourRepresentation, removeLabelmapRepresentation, removeSegment, removeSegmentation, removeSegmentationRepresentation, removeSegmentationRepresentations, removeSurfaceRepresentation, state, triggerSegmentationEvents, updateSegmentations
28045
+ // UNUSED EXPORTS: addContourRepresentationToViewport, addContourRepresentationToViewportMap, addLabelmapRepresentationToViewport, addLabelmapRepresentationToViewportMap, addSegmentations, addSurfaceRepresentationToViewport, addSurfaceRepresentationToViewportMap, getLabelmapImageIds, helpers, polySeg, removeAllSegmentationRepresentations, removeAllSegmentations, removeContourRepresentation, removeLabelmapRepresentation, removeSegment, removeSegmentation, removeSegmentationRepresentation, removeSegmentationRepresentations, removeSurfaceRepresentation, triggerSegmentationEvents, updateSegmentations
27496
28046
 
27497
28047
  // NAMESPACE OBJECT: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/config/index.js
27498
28048
  var config_namespaceObject = {};
@@ -27528,8 +28078,8 @@ function updateSegmentations_updateSegmentations(segmentationUpdateArray, suppre
27528
28078
  var activeSegmentation = __webpack_require__(26228);
27529
28079
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentLocking.js
27530
28080
  var segmentLocking = __webpack_require__(26795);
27531
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationState.js + 2 modules
27532
- var segmentationState = __webpack_require__(98870);
28081
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationState.js + 1 modules
28082
+ var segmentationState = __webpack_require__(83243);
27533
28083
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/config/segmentationColor.js
27534
28084
  var segmentationColor = __webpack_require__(93733);
27535
28085
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentationRepresentation.js
@@ -28334,7 +28884,10 @@ const _debouncedSegmentationModified = (0,_utilities_debounce__WEBPACK_IMPORTED_
28334
28884
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28335
28885
 
28336
28886
  "use strict";
28337
- /* unused harmony exports removeSegmentation, removeAllSegmentations */
28887
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
28888
+ /* harmony export */ j: () => (/* binding */ removeAllSegmentations),
28889
+ /* harmony export */ z: () => (/* binding */ removeSegmentation)
28890
+ /* harmony export */ });
28338
28891
  /* harmony import */ var _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59475);
28339
28892
  /* harmony import */ var _triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49906);
28340
28893
  /* harmony import */ var _removeSegmentationRepresentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53662);
@@ -28342,19 +28895,19 @@ const _debouncedSegmentationModified = (0,_utilities_debounce__WEBPACK_IMPORTED_
28342
28895
 
28343
28896
 
28344
28897
  function removeSegmentation(segmentationId) {
28345
- const segmentationStateManager = defaultSegmentationStateManager;
28898
+ const segmentationStateManager = _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__/* .defaultSegmentationStateManager */ ._6;
28346
28899
  const viewportsWithSegmentation = segmentationStateManager
28347
28900
  .getAllViewportSegmentationRepresentations()
28348
28901
  .filter(({ representations }) => representations.some((rep) => rep.segmentationId === segmentationId))
28349
28902
  .map(({ viewportId }) => viewportId);
28350
28903
  viewportsWithSegmentation.forEach((viewportId) => {
28351
- removeSegmentationRepresentations(viewportId, { segmentationId });
28904
+ (0,_removeSegmentationRepresentations__WEBPACK_IMPORTED_MODULE_2__/* .removeSegmentationRepresentations */ .nc)(viewportId, { segmentationId });
28352
28905
  });
28353
28906
  segmentationStateManager.removeSegmentation(segmentationId);
28354
- triggerSegmentationRemoved(segmentationId);
28907
+ (0,_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_1__.triggerSegmentationRemoved)(segmentationId);
28355
28908
  }
28356
28909
  function removeAllSegmentations() {
28357
- const segmentationStateManager = defaultSegmentationStateManager;
28910
+ const segmentationStateManager = _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__/* .defaultSegmentationStateManager */ ._6;
28358
28911
  const segmentations = segmentationStateManager.getState().segmentations;
28359
28912
  segmentations.forEach((segmentation) => {
28360
28913
  removeSegmentation(segmentation.segmentationId);
@@ -28366,18 +28919,26 @@ function removeAllSegmentations() {
28366
28919
  /***/ }),
28367
28920
 
28368
28921
  /***/ 53662:
28369
- /***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
28922
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28370
28923
 
28371
28924
  "use strict";
28372
28925
 
28373
- // UNUSED EXPORTS: removeAllSegmentationRepresentations, removeContourRepresentation, removeLabelmapRepresentation, removeSegmentationRepresentation, removeSegmentationRepresentations, removeSurfaceRepresentation
28926
+ // EXPORTS
28927
+ __webpack_require__.d(__webpack_exports__, {
28928
+ us: () => (/* binding */ removeAllSegmentationRepresentations),
28929
+ OE: () => (/* binding */ removeContourRepresentation),
28930
+ kN: () => (/* binding */ removeLabelmapRepresentation),
28931
+ E8: () => (/* binding */ removeSegmentationRepresentation),
28932
+ nc: () => (/* binding */ removeSegmentationRepresentations),
28933
+ JC: () => (/* binding */ removeSurfaceRepresentation)
28934
+ });
28374
28935
 
28375
28936
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/SegmentationRepresentations.js
28376
- var enums_SegmentationRepresentations = __webpack_require__(18682);
28937
+ var SegmentationRepresentations = __webpack_require__(18682);
28377
28938
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.js
28378
- var Labelmap_labelmapDisplay = __webpack_require__(684);
28939
+ var labelmapDisplay = __webpack_require__(684);
28379
28940
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/displayTools/Contour/contourDisplay.js
28380
- var Contour_contourDisplay = __webpack_require__(25894);
28941
+ var contourDisplay = __webpack_require__(25894);
28381
28942
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentationRepresentation.js
28382
28943
  var getSegmentationRepresentation = __webpack_require__(93210);
28383
28944
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js
@@ -28385,7 +28946,7 @@ var esm = __webpack_require__(81985);
28385
28946
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/SegmentationStateManager.js
28386
28947
  var SegmentationStateManager = __webpack_require__(59475);
28387
28948
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/displayTools/Surface/surfaceDisplay.js
28388
- var Surface_surfaceDisplay = __webpack_require__(67014);
28949
+ var surfaceDisplay = __webpack_require__(67014);
28389
28950
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/displayTools/Surface/index.js
28390
28951
 
28391
28952
 
@@ -28407,13 +28968,13 @@ function removeSegmentationRepresentations(viewportId, specifier, immediate) {
28407
28968
  function _removeSegmentationRepresentations(viewportId, specifier, immediate) {
28408
28969
  const { segmentationId, type } = specifier;
28409
28970
  _removeRepresentationObject(viewportId, segmentationId, type, immediate);
28410
- return defaultSegmentationStateManager.removeSegmentationRepresentations(viewportId, {
28971
+ return SegmentationStateManager/* defaultSegmentationStateManager */._6.removeSegmentationRepresentations(viewportId, {
28411
28972
  segmentationId,
28412
28973
  type,
28413
28974
  });
28414
28975
  }
28415
28976
  function removeAllSegmentationRepresentations() {
28416
- const state = defaultSegmentationStateManager.getAllViewportSegmentationRepresentations();
28977
+ const state = SegmentationStateManager/* defaultSegmentationStateManager */._6.getAllViewportSegmentationRepresentations();
28417
28978
  state.forEach(({ viewportId, representations }) => {
28418
28979
  representations.forEach(({ segmentationId, type }) => {
28419
28980
  removeSegmentationRepresentation(viewportId, {
@@ -28422,43 +28983,43 @@ function removeAllSegmentationRepresentations() {
28422
28983
  });
28423
28984
  });
28424
28985
  });
28425
- defaultSegmentationStateManager.resetState();
28986
+ SegmentationStateManager/* defaultSegmentationStateManager */._6.resetState();
28426
28987
  }
28427
28988
  function removeLabelmapRepresentation(viewportId, segmentationId, immediate) {
28428
28989
  removeSegmentationRepresentation(viewportId, {
28429
28990
  segmentationId,
28430
- type: SegmentationRepresentations.Labelmap,
28991
+ type: SegmentationRepresentations/* default */.A.Labelmap,
28431
28992
  }, immediate);
28432
28993
  }
28433
28994
  function removeContourRepresentation(viewportId, segmentationId, immediate) {
28434
28995
  removeSegmentationRepresentation(viewportId, {
28435
28996
  segmentationId,
28436
- type: SegmentationRepresentations.Contour,
28997
+ type: SegmentationRepresentations/* default */.A.Contour,
28437
28998
  }, immediate);
28438
28999
  }
28439
29000
  function removeSurfaceRepresentation(viewportId, segmentationId, immediate) {
28440
29001
  removeSegmentationRepresentation(viewportId, {
28441
29002
  segmentationId,
28442
- type: SegmentationRepresentations.Surface,
29003
+ type: SegmentationRepresentations/* default */.A.Surface,
28443
29004
  }, immediate);
28444
29005
  }
28445
29006
  function _removeRepresentationObject(viewportId, segmentationId, type, immediate) {
28446
- const representations = getSegmentationRepresentations(viewportId, {
29007
+ const representations = (0,getSegmentationRepresentation/* getSegmentationRepresentations */.r$)(viewportId, {
28447
29008
  segmentationId,
28448
29009
  type,
28449
29010
  });
28450
29011
  representations.forEach((representation) => {
28451
- if (representation.type === SegmentationRepresentations.Labelmap) {
28452
- labelmapDisplay.removeRepresentation(viewportId, representation.segmentationId, immediate);
29012
+ if (representation.type === SegmentationRepresentations/* default */.A.Labelmap) {
29013
+ labelmapDisplay/* default.removeRepresentation */.Ay.removeRepresentation(viewportId, representation.segmentationId, immediate);
28453
29014
  }
28454
- else if (representation.type === SegmentationRepresentations.Contour) {
28455
- contourDisplay.removeRepresentation(viewportId, representation.segmentationId, immediate);
29015
+ else if (representation.type === SegmentationRepresentations/* default */.A.Contour) {
29016
+ contourDisplay/* default */.A.removeRepresentation(viewportId, representation.segmentationId, immediate);
28456
29017
  }
28457
- else if (representation.type === SegmentationRepresentations.Surface) {
28458
- surfaceDisplay.removeRepresentation(viewportId, representation.segmentationId, immediate);
29018
+ else if (representation.type === SegmentationRepresentations/* default */.A.Surface) {
29019
+ surfaceDisplay/* default */.Ay.removeRepresentation(viewportId, representation.segmentationId, immediate);
28459
29020
  }
28460
29021
  });
28461
- const { viewport } = getEnabledElementByViewportId(viewportId) || {};
29022
+ const { viewport } = (0,esm.getEnabledElementByViewportId)(viewportId) || {};
28462
29023
  if (viewport) {
28463
29024
  viewport.render();
28464
29025
  }
@@ -28581,20 +29142,40 @@ function getLockedSegmentIndices(segmentationId) {
28581
29142
 
28582
29143
  /***/ }),
28583
29144
 
28584
- /***/ 98870:
29145
+ /***/ 83243:
28585
29146
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28586
29147
 
28587
29148
  "use strict";
29149
+ // ESM COMPAT FLAG
29150
+ __webpack_require__.r(__webpack_exports__);
28588
29151
 
28589
29152
  // EXPORTS
28590
29153
  __webpack_require__.d(__webpack_exports__, {
29154
+ addColorLUT: () => (/* reexport */ addColorLUT/* addColorLUT */.u),
29155
+ addSegmentations: () => (/* reexport */ addSegmentations/* addSegmentations */.d),
29156
+ destroy: () => (/* binding */ destroy),
29157
+ getColorLUT: () => (/* reexport */ getColorLUT/* getColorLUT */.B),
28591
29158
  getCurrentLabelmapImageIdForViewport: () => (/* reexport */ getCurrentLabelmapImageIdForViewport/* getCurrentLabelmapImageIdForViewport */.v),
29159
+ getNextColorLUTIndex: () => (/* reexport */ getNextColorLUTIndex/* getNextColorLUTIndex */.u),
28592
29160
  getSegmentation: () => (/* reexport */ getSegmentation/* getSegmentation */.T),
28593
- getStackSegmentationImageIdsForViewport: () => (/* reexport */ getStackSegmentationImageIdsForViewport)
29161
+ getSegmentationRepresentation: () => (/* reexport */ getSegmentationRepresentation/* getSegmentationRepresentation */.Ut),
29162
+ getSegmentationRepresentations: () => (/* reexport */ getSegmentationRepresentation/* getSegmentationRepresentations */.r$),
29163
+ getSegmentationRepresentationsBySegmentationId: () => (/* reexport */ getSegmentationRepresentation/* getSegmentationRepresentationsBySegmentationId */.ny),
29164
+ getSegmentations: () => (/* reexport */ getSegmentations/* getSegmentations */.K),
29165
+ getStackSegmentationImageIdsForViewport: () => (/* reexport */ getStackSegmentationImageIdsForViewport/* getStackSegmentationImageIdsForViewport */.B),
29166
+ getViewportIdsWithSegmentation: () => (/* reexport */ getViewportIdsWithSegmentation/* getViewportIdsWithSegmentation */.P),
29167
+ getViewportSegmentations: () => (/* reexport */ getViewportSegmentations/* getViewportSegmentations */.a),
29168
+ removeAllSegmentationRepresentations: () => (/* reexport */ removeSegmentationRepresentations/* removeAllSegmentationRepresentations */.us),
29169
+ removeAllSegmentations: () => (/* reexport */ removeSegmentation/* removeAllSegmentations */.j),
29170
+ removeColorLUT: () => (/* reexport */ removeColorLUT),
29171
+ removeContourRepresentation: () => (/* reexport */ removeSegmentationRepresentations/* removeContourRepresentation */.OE),
29172
+ removeLabelmapRepresentation: () => (/* reexport */ removeSegmentationRepresentations/* removeLabelmapRepresentation */.kN),
29173
+ removeSegmentation: () => (/* reexport */ removeSegmentation/* removeSegmentation */.z),
29174
+ removeSegmentationRepresentation: () => (/* reexport */ removeSegmentationRepresentations/* removeSegmentationRepresentation */.E8),
29175
+ removeSurfaceRepresentation: () => (/* reexport */ removeSegmentationRepresentations/* removeSurfaceRepresentation */.JC),
29176
+ updateLabelmapSegmentationImageReferences: () => (/* reexport */ updateLabelmapSegmentationImageReferences/* updateLabelmapSegmentationImageReferences */.t)
28594
29177
  });
28595
29178
 
28596
- // UNUSED EXPORTS: addColorLUT, addSegmentations, destroy, getColorLUT, getNextColorLUTIndex, getSegmentationRepresentation, getSegmentationRepresentations, getSegmentationRepresentationsBySegmentationId, getSegmentations, getViewportIdsWithSegmentation, getViewportSegmentations, removeAllSegmentationRepresentations, removeAllSegmentations, removeColorLUT, removeContourRepresentation, removeLabelmapRepresentation, removeSegmentation, removeSegmentationRepresentation, removeSurfaceRepresentation, updateLabelmapSegmentationImageReferences
28597
-
28598
29179
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentation.js
28599
29180
  var getSegmentation = __webpack_require__(33283);
28600
29181
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentations.js
@@ -28616,7 +29197,7 @@ var SegmentationStateManager = __webpack_require__(59475);
28616
29197
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/removeColorLUT.js
28617
29198
 
28618
29199
  function removeColorLUT(colorLUTIndex) {
28619
- const segmentationStateManager = defaultSegmentationStateManager;
29200
+ const segmentationStateManager = SegmentationStateManager/* defaultSegmentationStateManager */._6;
28620
29201
  segmentationStateManager.removeColorLUT(colorLUTIndex);
28621
29202
  }
28622
29203
 
@@ -28628,13 +29209,8 @@ var getViewportIdsWithSegmentation = __webpack_require__(58859);
28628
29209
  var getCurrentLabelmapImageIdForViewport = __webpack_require__(97577);
28629
29210
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/updateLabelmapSegmentationImageReferences.js
28630
29211
  var updateLabelmapSegmentationImageReferences = __webpack_require__(78231);
28631
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getStackSegmentationImageIdsForViewport.js
28632
-
28633
- function getStackSegmentationImageIdsForViewport(viewportId, segmentationId) {
28634
- const segmentationStateManager = SegmentationStateManager/* defaultSegmentationStateManager */._6;
28635
- return segmentationStateManager.getStackSegmentationImageIdsForViewport(viewportId, segmentationId);
28636
- }
28637
-
29212
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getStackSegmentationImageIdsForViewport.js
29213
+ var getStackSegmentationImageIdsForViewport = __webpack_require__(71309);
28638
29214
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentationRepresentation.js
28639
29215
  var getSegmentationRepresentation = __webpack_require__(93210);
28640
29216
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationState.js
@@ -28655,7 +29231,7 @@ var getSegmentationRepresentation = __webpack_require__(93210);
28655
29231
 
28656
29232
 
28657
29233
  function destroy() {
28658
- defaultSegmentationStateManager.resetState();
29234
+ SegmentationStateManager/* defaultSegmentationStateManager */._6.resetState();
28659
29235
  }
28660
29236
 
28661
29237
 
@@ -29563,6 +30139,7 @@ class BidirectionalTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .Annotation
29563
30139
  if (newAnnotation && !hasMoved) {
29564
30140
  return;
29565
30141
  }
30142
+ this.doneEditMemo();
29566
30143
  data.handles.activeHandleIndex = null;
29567
30144
  this._deactivateModify(element);
29568
30145
  this._deactivateDraw(element);
@@ -29613,9 +30190,10 @@ class BidirectionalTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .Annotation
29613
30190
  const eventDetail = evt.detail;
29614
30191
  const { currentPoints, element } = eventDetail;
29615
30192
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
29616
- const { renderingEngine, viewport } = enabledElement;
30193
+ const { viewport } = enabledElement;
29617
30194
  const { worldToCanvas } = viewport;
29618
- const { annotation, viewportIdsToRender, handleIndex } = this.editData;
30195
+ const { annotation, viewportIdsToRender, handleIndex, newAnnotation } = this.editData;
30196
+ this.createMemo(element, annotation, { newAnnotation });
29619
30197
  const { data } = annotation;
29620
30198
  const worldPos = currentPoints.world;
29621
30199
  data.handles.points[handleIndex] = [...worldPos];
@@ -29669,9 +30247,8 @@ class BidirectionalTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .Annotation
29669
30247
  this.isDrawing = true;
29670
30248
  const eventDetail = evt.detail;
29671
30249
  const { element } = eventDetail;
29672
- const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
29673
- const { renderingEngine } = enabledElement;
29674
- const { annotation, viewportIdsToRender, handleIndex, movingTextBox } = this.editData;
30250
+ const { annotation, viewportIdsToRender, handleIndex, movingTextBox, newAnnotation, } = this.editData;
30251
+ this.createMemo(element, annotation, { newAnnotation });
29675
30252
  const { data } = annotation;
29676
30253
  if (movingTextBox) {
29677
30254
  const { deltaPoints } = eventDetail;
@@ -30982,7 +31559,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
30982
31559
  this._deactivateModify(element);
30983
31560
  this._deactivateDraw(element);
30984
31561
  (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_15__.resetElementCursor)(element);
30985
- const { renderingEngine } = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
31562
+ this.doneEditMemo();
30986
31563
  this.editData = null;
30987
31564
  this.isDrawing = false;
30988
31565
  if (this.isHandleOutsideImage &&
@@ -30998,7 +31575,8 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
30998
31575
  this.isDrawing = true;
30999
31576
  const eventDetail = evt.detail;
31000
31577
  const { element } = eventDetail;
31001
- const { annotation, viewportIdsToRender, handleIndex, movingTextBox } = this.editData;
31578
+ const { annotation, viewportIdsToRender, handleIndex, movingTextBox, newAnnotation, } = this.editData;
31579
+ this.createMemo(element, annotation, { newAnnotation });
31002
31580
  const { data } = annotation;
31003
31581
  if (movingTextBox) {
31004
31582
  const { deltaPoints } = eventDetail;
@@ -31449,13 +32027,52 @@ class AnnotationDisplayTool extends _BaseTool__WEBPACK_IMPORTED_MODULE_1__/* ["d
31449
32027
  };
31450
32028
  }
31451
32029
  filterInteractableAnnotationsForElement(element, annotations) {
31452
- if (!annotations || !annotations.length) {
31453
- return;
32030
+ if (!annotations?.length) {
32031
+ return [];
31454
32032
  }
31455
32033
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
31456
32034
  const { viewport } = enabledElement;
31457
32035
  return (0,_utilities_planar_filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(viewport, annotations);
31458
32036
  }
32037
+ createAnnotation(evt) {
32038
+ const eventDetail = evt.detail;
32039
+ const { currentPoints, element } = eventDetail;
32040
+ const { world: worldPos } = currentPoints;
32041
+ const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
32042
+ const { viewport } = enabledElement;
32043
+ const camera = viewport.getCamera();
32044
+ const { viewPlaneNormal, viewUp, position: cameraPosition } = camera;
32045
+ const referencedImageId = this.getReferencedImageId(viewport, worldPos, viewPlaneNormal, viewUp);
32046
+ const viewReference = viewport.getViewReference({ points: [worldPos] });
32047
+ return {
32048
+ highlighted: true,
32049
+ invalidated: true,
32050
+ metadata: {
32051
+ toolName: this.getToolName(),
32052
+ ...viewReference,
32053
+ referencedImageId,
32054
+ viewUp,
32055
+ cameraPosition,
32056
+ },
32057
+ data: {
32058
+ cachedStats: {},
32059
+ handles: {
32060
+ points: [],
32061
+ activeHandleIndex: null,
32062
+ textBox: {
32063
+ hasMoved: false,
32064
+ worldPosition: [0, 0, 0],
32065
+ worldBoundingBox: {
32066
+ topLeft: [0, 0, 0],
32067
+ topRight: [0, 0, 0],
32068
+ bottomLeft: [0, 0, 0],
32069
+ bottomRight: [0, 0, 0],
32070
+ },
32071
+ },
32072
+ },
32073
+ },
32074
+ };
32075
+ }
31459
32076
  getReferencedImageId(viewport, worldPos, viewPlaneNormal, viewUp) {
31460
32077
  const targetId = this.getTargetId(viewport);
31461
32078
  let referencedImageId = targetId.split(/^[a-zA-Z]+:/)[1];
@@ -31487,21 +32104,34 @@ AnnotationDisplayTool.toolName = 'AnnotationDisplayTool';
31487
32104
  /* harmony import */ var _enums_ToolModes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49892);
31488
32105
 
31489
32106
 
32107
+ const { DefaultHistoryMemo } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.HistoryMemo;
31490
32108
  class BaseTool {
32109
+ static { this.defaults = {
32110
+ configuration: {
32111
+ strategies: {},
32112
+ defaultStrategy: undefined,
32113
+ activeStrategy: undefined,
32114
+ strategyOptions: {},
32115
+ },
32116
+ }; }
31491
32117
  constructor(toolProps, defaultToolProps) {
31492
- const initialProps = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.deepMerge(defaultToolProps, toolProps);
32118
+ const mergedDefaults = BaseTool.mergeDefaultProps(BaseTool.defaults, defaultToolProps);
32119
+ const initialProps = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.deepMerge(mergedDefaults, toolProps);
31493
32120
  const { configuration = {}, supportedInteractionTypes, toolGroupId, } = initialProps;
31494
- if (!configuration.strategies) {
31495
- configuration.strategies = {};
31496
- configuration.defaultStrategy = undefined;
31497
- configuration.activeStrategy = undefined;
31498
- configuration.strategyOptions = {};
31499
- }
31500
32121
  this.toolGroupId = toolGroupId;
31501
32122
  this.supportedInteractionTypes = supportedInteractionTypes || [];
31502
32123
  this.configuration = Object.assign({}, configuration);
31503
32124
  this.mode = _enums_ToolModes__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.Disabled;
31504
32125
  }
32126
+ static mergeDefaultProps(defaultProps = {}, additionalProps) {
32127
+ if (!additionalProps) {
32128
+ return defaultProps;
32129
+ }
32130
+ return _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.deepMerge(defaultProps, additionalProps);
32131
+ }
32132
+ get toolName() {
32133
+ return this.getToolName();
32134
+ }
31505
32135
  getToolName() {
31506
32136
  return this.constructor.toolName;
31507
32137
  }
@@ -31565,6 +32195,38 @@ class BaseTool {
31565
32195
  }
31566
32196
  throw new Error('getTargetId: viewport must have a getViewReferenceId method');
31567
32197
  }
32198
+ undo() {
32199
+ this.doneEditMemo();
32200
+ DefaultHistoryMemo.undo();
32201
+ }
32202
+ redo() {
32203
+ DefaultHistoryMemo.redo();
32204
+ }
32205
+ static createZoomPanMemo(viewport) {
32206
+ const state = {
32207
+ pan: viewport.getPan(),
32208
+ zoom: viewport.getZoom(),
32209
+ };
32210
+ const zoomPanMemo = {
32211
+ restoreMemo: () => {
32212
+ const currentPan = viewport.getPan();
32213
+ const currentZoom = viewport.getZoom();
32214
+ viewport.setZoom(state.zoom);
32215
+ viewport.setPan(state.pan);
32216
+ viewport.render();
32217
+ state.pan = currentPan;
32218
+ state.zoom = currentZoom;
32219
+ },
32220
+ };
32221
+ DefaultHistoryMemo.push(zoomPanMemo);
32222
+ return zoomPanMemo;
32223
+ }
32224
+ doneEditMemo() {
32225
+ if (this.memo?.commitMemo?.()) {
32226
+ DefaultHistoryMemo.push(this.memo);
32227
+ }
32228
+ this.memo = null;
32229
+ }
31568
32230
  }
31569
32231
  BaseTool.toolName = 'BaseTool';
31570
32232
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BaseTool);
@@ -32028,24 +32690,15 @@ async function render(viewport, representation) {
32028
32690
  /* harmony export */ });
32029
32691
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81985);
32030
32692
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3823);
32031
- /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85817);
32032
- /* harmony import */ var _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17492);
32033
- /* harmony import */ var _strategies_eraseSphere__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1989);
32034
- /* harmony import */ var _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(56789);
32035
- /* harmony import */ var _strategies_eraseCircle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(33852);
32036
- /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(99737);
32037
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(89578);
32038
- /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(7001);
32039
- /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(58640);
32040
- /* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(98870);
32041
- /* harmony import */ var _stateManagement_segmentation_segmentLocking__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(26795);
32042
- /* harmony import */ var _stateManagement_segmentation_getActiveSegmentIndex__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(60740);
32043
- /* harmony import */ var _stateManagement_segmentation_config_segmentationColor__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(93733);
32044
- /* harmony import */ var _stateManagement_segmentation_getActiveSegmentation__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(67165);
32045
-
32046
-
32047
-
32048
-
32693
+ /* harmony import */ var _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17492);
32694
+ /* harmony import */ var _strategies_eraseSphere__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1989);
32695
+ /* harmony import */ var _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(56789);
32696
+ /* harmony import */ var _strategies_eraseCircle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(33852);
32697
+ /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(99737);
32698
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89578);
32699
+ /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7001);
32700
+ /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(58640);
32701
+ /* harmony import */ var _LabelmapBaseTool__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23631);
32049
32702
 
32050
32703
 
32051
32704
 
@@ -32057,19 +32710,18 @@ async function render(viewport, representation) {
32057
32710
 
32058
32711
 
32059
32712
 
32060
-
32061
- class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
32713
+ class BrushTool extends _LabelmapBaseTool__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A {
32062
32714
  constructor(toolProps = {}, defaultToolProps = {
32063
32715
  supportedInteractionTypes: ['Mouse', 'Touch'],
32064
32716
  configuration: {
32065
32717
  strategies: {
32066
- FILL_INSIDE_CIRCLE: _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_5__/* .fillInsideCircle */ .kr,
32067
- ERASE_INSIDE_CIRCLE: _strategies_eraseCircle__WEBPACK_IMPORTED_MODULE_6__/* .eraseInsideCircle */ .r,
32068
- FILL_INSIDE_SPHERE: _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_3__/* .fillInsideSphere */ .Jq,
32069
- ERASE_INSIDE_SPHERE: _strategies_eraseSphere__WEBPACK_IMPORTED_MODULE_4__/* .eraseInsideSphere */ ._,
32070
- THRESHOLD_INSIDE_CIRCLE: _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_5__/* .thresholdInsideCircle */ .q,
32071
- THRESHOLD_INSIDE_SPHERE: _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_3__/* .thresholdInsideSphere */ .rd,
32072
- THRESHOLD_INSIDE_SPHERE_WITH_ISLAND_REMOVAL: _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_3__/* .thresholdInsideSphereIsland */ .Sw,
32718
+ FILL_INSIDE_CIRCLE: _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_4__/* .fillInsideCircle */ .kr,
32719
+ ERASE_INSIDE_CIRCLE: _strategies_eraseCircle__WEBPACK_IMPORTED_MODULE_5__/* .eraseInsideCircle */ .r,
32720
+ FILL_INSIDE_SPHERE: _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_2__/* .fillInsideSphere */ .Jq,
32721
+ ERASE_INSIDE_SPHERE: _strategies_eraseSphere__WEBPACK_IMPORTED_MODULE_3__/* .eraseInsideSphere */ ._,
32722
+ THRESHOLD_INSIDE_CIRCLE: _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_4__/* .thresholdInsideCircle */ .q,
32723
+ THRESHOLD_INSIDE_SPHERE: _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_2__/* .thresholdInsideSphere */ .rd,
32724
+ THRESHOLD_INSIDE_SPHERE_WITH_ISLAND_REMOVAL: _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_2__/* .thresholdInsideSphereIsland */ .Sw,
32073
32725
  },
32074
32726
  strategySpecificConfiguration: {
32075
32727
  THRESHOLD: {
@@ -32089,8 +32741,8 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
32089
32741
  dragTimeMs: 500,
32090
32742
  },
32091
32743
  actions: {
32092
- [_enums__WEBPACK_IMPORTED_MODULE_7__.StrategyCallbacks.AcceptPreview]: {
32093
- method: _enums__WEBPACK_IMPORTED_MODULE_7__.StrategyCallbacks.AcceptPreview,
32744
+ [_enums__WEBPACK_IMPORTED_MODULE_6__.StrategyCallbacks.AcceptPreview]: {
32745
+ method: _enums__WEBPACK_IMPORTED_MODULE_6__.StrategyCallbacks.AcceptPreview,
32094
32746
  bindings: [
32095
32747
  {
32096
32748
  key: 'Enter',
@@ -32101,14 +32753,6 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
32101
32753
  },
32102
32754
  }) {
32103
32755
  super(toolProps, defaultToolProps);
32104
- this._previewData = {
32105
- preview: null,
32106
- element: null,
32107
- timerStart: 0,
32108
- timer: null,
32109
- startPoint: [NaN, NaN],
32110
- isDrag: false,
32111
- };
32112
32756
  this.onSetToolPassive = (evt) => {
32113
32757
  this.disableCursor();
32114
32758
  };
@@ -32124,18 +32768,18 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
32124
32768
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
32125
32769
  this._editData = this.createEditData(element);
32126
32770
  this._activateDraw(element);
32127
- (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_9__.hideElementCursor)(element);
32771
+ (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__.hideElementCursor)(element);
32128
32772
  evt.preventDefault();
32129
32773
  this._previewData.isDrag = false;
32130
32774
  this._previewData.timerStart = Date.now();
32131
32775
  const hoverData = this._hoverData || this.createHoverData(element);
32132
- (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A)(hoverData.viewportIdsToRender);
32776
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(hoverData.viewportIdsToRender);
32133
32777
  const operationData = this.getOperationData(element);
32134
- this.applyActiveStrategyCallback(enabledElement, operationData, _enums__WEBPACK_IMPORTED_MODULE_7__.StrategyCallbacks.OnInteractionStart);
32778
+ this.applyActiveStrategyCallback(enabledElement, operationData, _enums__WEBPACK_IMPORTED_MODULE_6__.StrategyCallbacks.OnInteractionStart);
32135
32779
  return true;
32136
32780
  };
32137
32781
  this.mouseMoveCallback = (evt) => {
32138
- if (this.mode === _enums__WEBPACK_IMPORTED_MODULE_7__.ToolModes.Active) {
32782
+ if (this.mode === _enums__WEBPACK_IMPORTED_MODULE_6__.ToolModes.Active) {
32139
32783
  this.updateCursor(evt);
32140
32784
  if (!this.configuration.preview.enabled) {
32141
32785
  return;
@@ -32172,7 +32816,7 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
32172
32816
  if (this._previewData.preview) {
32173
32817
  return;
32174
32818
  }
32175
- this._previewData.preview = this.applyActiveStrategyCallback((0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(this._previewData.element), this.getOperationData(this._previewData.element), _enums__WEBPACK_IMPORTED_MODULE_7__.StrategyCallbacks.Preview);
32819
+ this._previewData.preview = this.applyActiveStrategyCallback((0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(this._previewData.element), this.getOperationData(this._previewData.element), _enums__WEBPACK_IMPORTED_MODULE_6__.StrategyCallbacks.Preview);
32176
32820
  };
32177
32821
  this._dragCallback = (evt) => {
32178
32822
  const eventData = evt.detail;
@@ -32180,7 +32824,7 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
32180
32824
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
32181
32825
  this.updateCursor(evt);
32182
32826
  const { viewportIdsToRender } = this._hoverData;
32183
- (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A)(viewportIdsToRender);
32827
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(viewportIdsToRender);
32184
32828
  const delta = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.distance */ .Zc.distance(currentPoints.canvas, this._previewData.startPoint);
32185
32829
  const { dragTimeMs, dragMoveDistance } = this.configuration.preview;
32186
32830
  if (!this._previewData.isDrag &&
@@ -32203,168 +32847,31 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
32203
32847
  if (!this._previewData.preview && !this._previewData.isDrag) {
32204
32848
  this.applyActiveStrategy(enabledElement, operationData);
32205
32849
  }
32850
+ this.doneEditMemo();
32206
32851
  this._deactivateDraw(element);
32207
- (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_9__.resetElementCursor)(element);
32852
+ (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__.resetElementCursor)(element);
32208
32853
  this.updateCursor(evt);
32209
32854
  this._editData = null;
32210
- this.applyActiveStrategyCallback(enabledElement, operationData, _enums__WEBPACK_IMPORTED_MODULE_7__.StrategyCallbacks.OnInteractionEnd);
32855
+ this.applyActiveStrategyCallback(enabledElement, operationData, _enums__WEBPACK_IMPORTED_MODULE_6__.StrategyCallbacks.OnInteractionEnd);
32211
32856
  if (!this._previewData.isDrag) {
32212
32857
  this.acceptPreview(element);
32213
32858
  }
32214
32859
  };
32215
32860
  this._activateDraw = (element) => {
32216
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_7__.Events.MOUSE_UP, this._endCallback);
32217
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_7__.Events.MOUSE_DRAG, this._dragCallback);
32218
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_7__.Events.MOUSE_CLICK, this._endCallback);
32861
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_UP, this._endCallback);
32862
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_DRAG, this._dragCallback);
32863
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_CLICK, this._endCallback);
32219
32864
  };
32220
32865
  this._deactivateDraw = (element) => {
32221
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_7__.Events.MOUSE_UP, this._endCallback);
32222
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_7__.Events.MOUSE_DRAG, this._dragCallback);
32223
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_7__.Events.MOUSE_CLICK, this._endCallback);
32866
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_UP, this._endCallback);
32867
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_DRAG, this._dragCallback);
32868
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_CLICK, this._endCallback);
32224
32869
  };
32225
32870
  }
32226
32871
  disableCursor() {
32227
32872
  this._hoverData = undefined;
32228
32873
  this.rejectPreview();
32229
32874
  }
32230
- createEditData(element) {
32231
- const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
32232
- const { viewport } = enabledElement;
32233
- const activeSegmentation = (0,_stateManagement_segmentation_getActiveSegmentation__WEBPACK_IMPORTED_MODULE_15__/* .getActiveSegmentation */ .T)(viewport.id);
32234
- if (!activeSegmentation) {
32235
- const event = new CustomEvent(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.Enums.Events.ERROR_EVENT, {
32236
- detail: {
32237
- type: 'Segmentation',
32238
- message: 'No active segmentation detected, create a segmentation representation before using the brush tool',
32239
- },
32240
- cancelable: true,
32241
- });
32242
- _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.dispatchEvent(event);
32243
- return null;
32244
- }
32245
- const { segmentationId } = activeSegmentation;
32246
- const segmentsLocked = (0,_stateManagement_segmentation_segmentLocking__WEBPACK_IMPORTED_MODULE_12__.getLockedSegmentIndices)(segmentationId);
32247
- const { representationData } = (0,_stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_11__.getSegmentation)(segmentationId);
32248
- if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.BaseVolumeViewport) {
32249
- const { volumeId } = representationData[_enums__WEBPACK_IMPORTED_MODULE_7__.SegmentationRepresentations.Labelmap];
32250
- const actors = viewport.getActors();
32251
- const isStackViewport = viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.StackViewport;
32252
- if (isStackViewport) {
32253
- const event = new CustomEvent(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.Enums.Events.ERROR_EVENT, {
32254
- detail: {
32255
- type: 'Segmentation',
32256
- message: 'Cannot perform brush operation on the selected viewport',
32257
- },
32258
- cancelable: true,
32259
- });
32260
- _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.dispatchEvent(event);
32261
- return null;
32262
- }
32263
- const volumes = actors.map((actorEntry) => _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(actorEntry.referencedId));
32264
- const segmentationVolume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(volumeId);
32265
- const referencedVolumeIdToThreshold = volumes.find((volume) => _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.isEqual(volume.dimensions, segmentationVolume.dimensions))?.volumeId || volumes[0]?.volumeId;
32266
- return {
32267
- volumeId,
32268
- referencedVolumeId: this.configuration.thresholdVolumeId ?? referencedVolumeIdToThreshold,
32269
- segmentsLocked,
32270
- };
32271
- }
32272
- else {
32273
- const segmentationImageId = (0,_stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_11__.getCurrentLabelmapImageIdForViewport)(viewport.id, segmentationId);
32274
- if (!segmentationImageId) {
32275
- return;
32276
- }
32277
- if (this.configuration.activeStrategy.includes('SPHERE')) {
32278
- const referencedImageIds = viewport.getImageIds();
32279
- const isValidVolumeForSphere = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.isValidVolume(referencedImageIds);
32280
- if (!isValidVolumeForSphere) {
32281
- throw new Error('Volume is not reconstructable for sphere manipulation');
32282
- }
32283
- const volumeId = `${segmentationId}_${viewport.id}`;
32284
- const volume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(volumeId);
32285
- if (volume) {
32286
- return {
32287
- imageId: segmentationImageId,
32288
- segmentsLocked,
32289
- override: {
32290
- voxelManager: volume.voxelManager,
32291
- imageData: volume.imageData,
32292
- },
32293
- };
32294
- }
32295
- else {
32296
- const labelmapImageIds = (0,_stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_11__.getStackSegmentationImageIdsForViewport)(viewport.id, segmentationId);
32297
- if (!labelmapImageIds || labelmapImageIds.length === 1) {
32298
- return {
32299
- imageId: segmentationImageId,
32300
- segmentsLocked,
32301
- };
32302
- }
32303
- const volume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.volumeLoader.createAndCacheVolumeFromImagesSync(volumeId, labelmapImageIds);
32304
- return {
32305
- imageId: segmentationImageId,
32306
- segmentsLocked,
32307
- override: {
32308
- voxelManager: volume.voxelManager,
32309
- imageData: volume.imageData,
32310
- },
32311
- };
32312
- }
32313
- }
32314
- else {
32315
- return {
32316
- imageId: segmentationImageId,
32317
- segmentsLocked,
32318
- };
32319
- }
32320
- }
32321
- }
32322
- createHoverData(element, centerCanvas) {
32323
- const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
32324
- const { viewport } = enabledElement;
32325
- const camera = viewport.getCamera();
32326
- const { viewPlaneNormal, viewUp } = camera;
32327
- const viewportIdsToRender = [viewport.id];
32328
- const { segmentIndex, segmentationId, segmentColor } = this.getActiveSegmentationData(viewport) || {};
32329
- const brushCursor = {
32330
- metadata: {
32331
- viewPlaneNormal: [...viewPlaneNormal],
32332
- viewUp: [...viewUp],
32333
- FrameOfReferenceUID: viewport.getFrameOfReferenceUID(),
32334
- referencedImageId: '',
32335
- toolName: this.getToolName(),
32336
- segmentColor,
32337
- },
32338
- data: {},
32339
- };
32340
- return {
32341
- brushCursor,
32342
- centerCanvas,
32343
- segmentIndex,
32344
- viewport,
32345
- segmentationId,
32346
- segmentColor,
32347
- viewportIdsToRender,
32348
- };
32349
- }
32350
- getActiveSegmentationData(viewport) {
32351
- const viewportId = viewport.id;
32352
- const activeRepresentation = (0,_stateManagement_segmentation_getActiveSegmentation__WEBPACK_IMPORTED_MODULE_15__/* .getActiveSegmentation */ .T)(viewportId);
32353
- if (!activeRepresentation) {
32354
- return;
32355
- }
32356
- const { segmentationId } = activeRepresentation;
32357
- const segmentIndex = (0,_stateManagement_segmentation_getActiveSegmentIndex__WEBPACK_IMPORTED_MODULE_13__/* .getActiveSegmentIndex */ .Q)(segmentationId);
32358
- if (!segmentIndex) {
32359
- return;
32360
- }
32361
- const segmentColor = (0,_stateManagement_segmentation_config_segmentationColor__WEBPACK_IMPORTED_MODULE_14__.getSegmentIndexColor)(viewportId, segmentationId, segmentIndex);
32362
- return {
32363
- segmentIndex,
32364
- segmentationId,
32365
- segmentColor,
32366
- };
32367
- }
32368
32875
  updateCursor(evt) {
32369
32876
  const eventData = evt.detail;
32370
32877
  const { element } = eventData;
@@ -32375,28 +32882,7 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
32375
32882
  if (!this._hoverData) {
32376
32883
  return;
32377
32884
  }
32378
- (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A)(this._hoverData.viewportIdsToRender);
32379
- }
32380
- getOperationData(element) {
32381
- const editData = this._editData || this.createEditData(element);
32382
- const { segmentIndex, segmentationId, brushCursor } = this._hoverData || this.createHoverData(element);
32383
- const { data, metadata = {} } = brushCursor || {};
32384
- const { viewPlaneNormal, viewUp } = metadata;
32385
- const operationData = {
32386
- ...editData,
32387
- points: data?.handles?.points,
32388
- segmentIndex,
32389
- previewColors: this.configuration.preview.enabled
32390
- ? this.configuration.preview.previewColors
32391
- : null,
32392
- viewPlaneNormal,
32393
- toolGroupId: this.toolGroupId,
32394
- segmentationId,
32395
- viewUp,
32396
- strategySpecificConfiguration: this.configuration.strategySpecificConfiguration,
32397
- preview: this._previewData?.preview,
32398
- };
32399
- return operationData;
32885
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(this._hoverData.viewportIdsToRender);
32400
32886
  }
32401
32887
  _calculateCursor(element, centerCanvas) {
32402
32888
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
@@ -32451,27 +32937,9 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
32451
32937
  return;
32452
32938
  }
32453
32939
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
32454
- const stats = this.applyActiveStrategyCallback(enabledElement, this.getOperationData(element), _enums__WEBPACK_IMPORTED_MODULE_7__.StrategyCallbacks.GetStatistics, segmentIndices);
32940
+ const stats = this.applyActiveStrategyCallback(enabledElement, this.getOperationData(element), _enums__WEBPACK_IMPORTED_MODULE_6__.StrategyCallbacks.GetStatistics, segmentIndices);
32455
32941
  return stats;
32456
32942
  }
32457
- rejectPreview(element = this._previewData.element) {
32458
- if (!element || !this._previewData.preview) {
32459
- return;
32460
- }
32461
- const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
32462
- this.applyActiveStrategyCallback(enabledElement, this.getOperationData(element), _enums__WEBPACK_IMPORTED_MODULE_7__.StrategyCallbacks.RejectPreview);
32463
- this._previewData.preview = null;
32464
- this._previewData.isDrag = false;
32465
- }
32466
- acceptPreview(element = this._previewData.element) {
32467
- if (!element) {
32468
- return;
32469
- }
32470
- const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
32471
- this.applyActiveStrategyCallback(enabledElement, this.getOperationData(element), _enums__WEBPACK_IMPORTED_MODULE_7__.StrategyCallbacks.AcceptPreview);
32472
- this._previewData.isDrag = false;
32473
- this._previewData.preview = null;
32474
- }
32475
32943
  invalidateBrushCursor() {
32476
32944
  if (this._hoverData === undefined) {
32477
32945
  return;
@@ -32518,7 +32986,7 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
32518
32986
  return;
32519
32987
  }
32520
32988
  const circleUID = '0';
32521
- (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_8__.drawCircle)(svgDrawingHelper, annotationUID, circleUID, center, radius, {
32989
+ (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_7__.drawCircle)(svgDrawingHelper, annotationUID, circleUID, center, radius, {
32522
32990
  color,
32523
32991
  });
32524
32992
  const activeStrategy = this.configuration.activeStrategy;
@@ -32528,7 +32996,7 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
32528
32996
  };
32529
32997
  if (dynamicRadiusInCanvas) {
32530
32998
  const circleUID1 = '1';
32531
- (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_8__.drawCircle)(svgDrawingHelper, annotationUID, circleUID1, center, dynamicRadiusInCanvas, {
32999
+ (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_7__.drawCircle)(svgDrawingHelper, annotationUID, circleUID1, center, dynamicRadiusInCanvas, {
32532
33000
  color,
32533
33001
  });
32534
33002
  }
@@ -33339,8 +33807,8 @@ var getViewportForAnnotation = __webpack_require__(62514);
33339
33807
  var annotationHydration = __webpack_require__(64485);
33340
33808
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/index.js + 8 modules
33341
33809
  var contours = __webpack_require__(54010);
33342
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/index.js + 15 modules
33343
- var segmentation = __webpack_require__(67470);
33810
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/index.js + 21 modules
33811
+ var segmentation = __webpack_require__(26971);
33344
33812
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/drawing/index.js + 1 modules
33345
33813
  var drawing = __webpack_require__(66990);
33346
33814
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/index.js