@ohif/app 3.13.0-beta.55 → 3.13.0-beta.57

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/{2075.bundle.0e69a126a39539ff8e9a.js → 2075.bundle.23265b8e7597c398db4f.js} +22 -22
  2. package/dist/{3461.bundle.e527b6102089241a08a4.js → 3461.bundle.b655849c1ba6566602f9.js} +10 -5
  3. package/dist/{8963.bundle.0f106869f9d0eb0bba03.js → 4579.bundle.d5ef5d2773b62664e752.js} +28 -80
  4. package/dist/{5028.bundle.64e0b8f7138a94f618f0.js → 5028.bundle.45fecbd127eeff1a0974.js} +2 -2
  5. package/dist/{6376.bundle.839c708f2fc41e76ee58.js → 6376.bundle.738c873196491232acb6.js} +1 -1
  6. package/dist/{6386.bundle.e75a2f70039dfe42f935.js → 6386.bundle.6667cdf4dbea2109a438.js} +14 -0
  7. package/dist/{7190.bundle.6314b558746e394aeb0e.js → 7190.bundle.3738008038e70525764f.js} +1090 -782
  8. package/dist/{7537.bundle.1c612642a1e8a96179ed.js → 7537.bundle.03b36e2bf6285e71718d.js} +2 -1
  9. package/dist/{8305.bundle.542bb77e07b85db27cd2.js → 8305.bundle.b82aab492af93134f2c8.js} +2 -2
  10. package/dist/{8583.bundle.7ea87eed08326b01736e.js → 8583.bundle.a7fac43e4a53b4bd11e2.js} +2 -2
  11. package/dist/{9039.bundle.6c84d903d5baaecf2f3a.js → 9039.bundle.8686977ad015d1bda4ab.js} +132 -64
  12. package/dist/{9195.bundle.b0bd35b23c7aa169b105.js → 9195.bundle.01d23d17e6b812946e71.js} +17 -6
  13. package/dist/{9205.bundle.9a5f5dd04fd0831d9a4a.js → 9205.bundle.6b78bf79808aee905cd5.js} +110 -42
  14. package/dist/{app.bundle.04375dd24e95144264bc.js → app.bundle.c5811ab6d141ad64e2f4.js} +56 -27
  15. package/dist/{compute.bundle.ba3878791df68055b11d.js → compute.bundle.3b615c718f2b47a606dd.js} +1 -1
  16. package/dist/index.html +1 -1
  17. package/dist/{interpolation.bundle.53073c15cca1c5a41ae4.js → interpolation.bundle.2559b710030605fc2bc6.js} +1 -1
  18. package/dist/{polySeg.bundle.70369a8c69b843375431.js → polySeg.bundle.742a17aa1a2d5e60bd5c.js} +1 -1
  19. package/dist/sw.js +1 -1
  20. package/package.json +21 -21
  21. /package/dist/{1459.bundle.4f54bf77141a08462da6.js → 1459.bundle.718ed3e06ddad6886842.js} +0 -0
  22. /package/dist/{1933.bundle.8c1773e86b1eed77653a.js → 1933.bundle.a2ec7f8a65111243f6dc.js} +0 -0
  23. /package/dist/{2018.bundle.d76655cc62a1009337cb.js → 2018.bundle.8cb089e81368eb734980.js} +0 -0
  24. /package/dist/{213.bundle.364991fba6e70bc7cd77.js → 213.bundle.dc576ea795e4a6a7dc3e.js} +0 -0
  25. /package/dist/{2424.bundle.03de3be230cc85c5c14c.js → 2424.bundle.bc4c7415edc6a01f7dd2.js} +0 -0
  26. /package/dist/{3138.bundle.40ff12b4aa9261c7a645.js → 3138.bundle.d2c48ea91c3fdd90fe21.js} +0 -0
  27. /package/dist/{4507.bundle.a11a6b1400ac7a346237.js → 4507.bundle.3d6b17fe9baabc952b22.js} +0 -0
  28. /package/dist/{4688.bundle.2a7b26d424c2833ea120.js → 4688.bundle.896ddb11e9276caec842.js} +0 -0
  29. /package/dist/{4819.bundle.41df7cda2c874834364b.js → 4819.bundle.9afd6cfc8a24b319b76a.js} +0 -0
  30. /package/dist/{5015.bundle.930236f37a00de540ef9.js → 5015.bundle.d89c0342dd9bde5f8abd.js} +0 -0
  31. /package/dist/{5457.bundle.7cea223c7bcc026dc730.js → 5457.bundle.c018f8a44ea6381bd15f.js} +0 -0
  32. /package/dist/{5485.bundle.95465ead6fa4364e4f5b.js → 5485.bundle.49c5559cad07ebabe3e0.js} +0 -0
  33. /package/dist/{6027.bundle.341f4c542e39956faace.js → 6027.bundle.46b8af7ad7e241eff14b.js} +0 -0
  34. /package/dist/{7639.bundle.51442e9ba8673a681f7c.js → 7639.bundle.7aa2c60eef713d244379.js} +0 -0
  35. /package/dist/{8499.bundle.bc39abf1c562140f68e8.js → 8499.bundle.739bf1264b665b4a2e1c.js} +0 -0
  36. /package/dist/{85.bundle.83e606ea86caa2df88ef.js → 85.bundle.c0e6e3180af6c4f8dabf.js} +0 -0
  37. /package/dist/{8558.bundle.e4185367997d3d6c77b7.js → 8558.bundle.e25ba6de607a3de1fc18.js} +0 -0
  38. /package/dist/{9927.bundle.35cc9feef2f57895ee4f.js → 9927.bundle.cd4c30c6f12bcacff2d2.js} +0 -0
@@ -4141,6 +4141,7 @@ class StackViewport extends Viewport/* default */.A {
4141
4141
  this.targetImageIdIndex = 0;
4142
4142
  this.resetCamera();
4143
4143
  this.initializeElementDisabledHandler();
4144
+ console.warn('Linked CS3D version test. Remove before merging.');
4144
4145
  }
4145
4146
  setUseCPURendering(value) {
4146
4147
  this.useCPURendering = value;
@@ -36328,7 +36329,7 @@ function uuidv4() {
36328
36329
 
36329
36330
  "use strict";
36330
36331
  /* unused harmony export version */
36331
- const version = '4.20.0';
36332
+ const version = '4.21.2';
36332
36333
 
36333
36334
 
36334
36335
  /***/ },
@@ -28,8 +28,8 @@ var i18n_src = __webpack_require__(89010);
28
28
  var esm = __webpack_require__(15327);
29
29
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js
30
30
  var dist_esm = __webpack_require__(4667);
31
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/adapters/dist/esm/index.js + 76 modules
32
- var adapters_dist_esm = __webpack_require__(28963);
31
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/adapters/dist/esm/index.js + 72 modules
32
+ var adapters_dist_esm = __webpack_require__(64579);
33
33
  // EXTERNAL MODULE: ../../../node_modules/dcmjs/build/dcmjs.es.js
34
34
  var dcmjs_es = __webpack_require__(5842);
35
35
  ;// ../../../extensions/cornerstone-dicom-seg/src/utils/dicomlabToRGB.ts
@@ -1471,8 +1471,8 @@ function createAndDownloadTMTVReport(segReport, additionalReportRows, options =
1471
1471
  }
1472
1472
  // EXTERNAL MODULE: ../../../node_modules/dcmjs/build/dcmjs.es.js
1473
1473
  var dcmjs_es = __webpack_require__(5842);
1474
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/adapters/dist/esm/index.js + 76 modules
1475
- var adapters_dist_esm = __webpack_require__(28963);
1474
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/adapters/dist/esm/index.js + 72 modules
1475
+ var adapters_dist_esm = __webpack_require__(64579);
1476
1476
  ;// ../../../extensions/tmtv/src/utils/dicomRTAnnotationExport/RTStructureSet/dicomRTAnnotationExport.js
1477
1477
 
1478
1478
 
@@ -7306,7 +7306,7 @@ var COLOR_LUT = __webpack_require__(93952);
7306
7306
 
7307
7307
 
7308
7308
  ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/version.js
7309
- const version = '4.20.0';
7309
+ const version = '4.21.2';
7310
7310
 
7311
7311
  ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/synchronizers/callbacks/cameraSyncCallback.js
7312
7312
  /* unused harmony import specifier */ var cameraSyncCallback_getRenderingEngine;
@@ -14266,6 +14266,11 @@ const CrosshairsTool_OPERATION = {
14266
14266
  SLAB: 3,
14267
14267
  };
14268
14268
  class CrosshairsTool extends base/* AnnotationTool */.EC {
14269
+ static { this.minimalModeExamples = new Map([
14270
+ ['Default', { enabled: false, lineLengthInPx: 40 }],
14271
+ ['Minimal 40px', { enabled: true, lineLengthInPx: 40 }],
14272
+ ['Minimal 80px', { enabled: true, lineLengthInPx: 80 }],
14273
+ ]); }
14269
14274
  constructor(toolProps = {}, defaultToolProps = {
14270
14275
  supportedInteractionTypes: ['Mouse'],
14271
14276
  configuration: {
@@ -14284,6 +14289,10 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
14284
14289
  enableHDPIHandles: false,
14285
14290
  referenceLinesCenterGapRadius: 20,
14286
14291
  referenceLinesCenterGapRatio: null,
14292
+ minimal: {
14293
+ enabled: false,
14294
+ lineLengthInPx: 40,
14295
+ },
14287
14296
  filterActorUIDsToSetSlabThickness: [],
14288
14297
  slabThicknessBlendMode: esm.Enums.BlendModes.MAXIMUM_INTENSITY_BLEND,
14289
14298
  centerPoint: {
@@ -14612,15 +14621,15 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
14612
14621
  gl_matrix_esm/* vec2.normalize */.Zc.normalize(canvasUnitVectorFromCenter, canvasUnitVectorFromCenter);
14613
14622
  const canvasVectorFromCenterLong = gl_matrix_esm/* vec2.create */.Zc.create();
14614
14623
  gl_matrix_esm/* vec2.scale */.Zc.scale(canvasVectorFromCenterLong, canvasUnitVectorFromCenter, canvasDiagonalLength * 100);
14615
- const canvasVectorFromCenterMid = gl_matrix_esm/* vec2.create */.Zc.create();
14616
- gl_matrix_esm/* vec2.scale */.Zc.scale(canvasVectorFromCenterMid, canvasUnitVectorFromCenter, canvasMinDimensionLength * 0.4);
14617
14624
  const canvasVectorFromCenterShort = gl_matrix_esm/* vec2.create */.Zc.create();
14618
14625
  gl_matrix_esm/* vec2.scale */.Zc.scale(canvasVectorFromCenterShort, canvasUnitVectorFromCenter, canvasMinDimensionLength * 0.2);
14619
14626
  const canvasVectorFromCenterStart = gl_matrix_esm/* vec2.create */.Zc.create();
14620
14627
  const mobileConfig = this.configuration.mobile;
14621
- const { referenceLinesCenterGapRatio } = mobileConfig?.enabled
14628
+ const activeConfiguration = mobileConfig?.enabled
14622
14629
  ? mobileConfig
14623
14630
  : this.configuration;
14631
+ const { referenceLinesCenterGapRatio } = activeConfiguration;
14632
+ const minimalCrosshairConfig = getMinimalCrosshairConfig(this.configuration);
14624
14633
  const centerGap = referenceLinesCenterGapRatio > 0
14625
14634
  ? canvasMinDimensionLength * referenceLinesCenterGapRatio
14626
14635
  : this.configuration.referenceLinesCenterGapRadius;
@@ -14639,10 +14648,18 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
14639
14648
  gl_matrix_esm/* vec2.subtract */.Zc.subtract(refLinePointFour, refLinesCenter, canvasVectorFromCenterLong);
14640
14649
  (0,liangBarksyClip/* default */.A)(refLinePointOne, refLinePointTwo, canvasBox);
14641
14650
  (0,liangBarksyClip/* default */.A)(refLinePointThree, refLinePointFour, canvasBox);
14642
- const rotHandleOne = gl_matrix_esm/* vec2.create */.Zc.create();
14643
- gl_matrix_esm/* vec2.subtract */.Zc.subtract(rotHandleOne, crosshairCenterCanvas, canvasVectorFromCenterMid);
14644
- const rotHandleTwo = gl_matrix_esm/* vec2.create */.Zc.create();
14645
- gl_matrix_esm/* vec2.add */.Zc.add(rotHandleTwo, crosshairCenterCanvas, canvasVectorFromCenterMid);
14651
+ if (minimalCrosshairConfig.enabled) {
14652
+ const minimalCanvasVectorFromCenterLong = gl_matrix_esm/* vec2.create */.Zc.create();
14653
+ gl_matrix_esm/* vec2.scale */.Zc.scale(minimalCanvasVectorFromCenterLong, canvasUnitVectorFromCenter, minimalCrosshairConfig.lineLengthInPx);
14654
+ gl_matrix_esm/* vec2.add */.Zc.add(refLinePointOne, refLinesCenter, canvasVectorFromCenterStart);
14655
+ gl_matrix_esm/* vec2.add */.Zc.add(refLinePointTwo, refLinePointOne, minimalCanvasVectorFromCenterLong);
14656
+ gl_matrix_esm/* vec2.subtract */.Zc.subtract(refLinePointThree, refLinesCenter, canvasVectorFromCenterStart);
14657
+ gl_matrix_esm/* vec2.subtract */.Zc.subtract(refLinePointFour, refLinePointThree, minimalCanvasVectorFromCenterLong);
14658
+ (0,liangBarksyClip/* default */.A)(refLinePointOne, refLinePointTwo, canvasBox);
14659
+ (0,liangBarksyClip/* default */.A)(refLinePointThree, refLinePointFour, canvasBox);
14660
+ }
14661
+ const rotHandleOne = getSegmentMidpoint(refLinePointOne, refLinePointTwo);
14662
+ const rotHandleTwo = getSegmentMidpoint(refLinePointThree, refLinePointFour);
14646
14663
  let stHandlesCenterCanvas = gl_matrix_esm/* vec2.clone */.Zc.clone(crosshairCenterCanvas);
14647
14664
  if (!otherViewportDraggableRotatable &&
14648
14665
  otherViewportSlabThicknessControlsOn) {
@@ -14722,12 +14739,15 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
14722
14739
  const color = viewportColor !== undefined ? viewportColor : 'rgb(200, 200, 200)';
14723
14740
  referenceLines.forEach((line, lineIndex) => {
14724
14741
  const otherViewport = line[0];
14742
+ const minimalCrosshairConfig = getMinimalCrosshairConfig(this.configuration);
14725
14743
  const viewportColor = this._getReferenceLineColor(otherViewport.id);
14726
14744
  const viewportControllable = this._getReferenceLineControllable(otherViewport.id);
14727
- const viewportDraggableRotatable = this._getReferenceLineDraggableRotatable(otherViewport.id) ||
14728
- this.configuration.mobile?.enabled;
14729
- const viewportSlabThicknessControlsOn = this._getReferenceLineSlabThicknessControlsOn(otherViewport.id) ||
14730
- this.configuration.mobile?.enabled;
14745
+ const viewportDraggableRotatable = !minimalCrosshairConfig.enabled &&
14746
+ (this._getReferenceLineDraggableRotatable(otherViewport.id) ||
14747
+ this.configuration.mobile?.enabled);
14748
+ const viewportSlabThicknessControlsOn = !minimalCrosshairConfig.enabled &&
14749
+ (this._getReferenceLineSlabThicknessControlsOn(otherViewport.id) ||
14750
+ this.configuration.mobile?.enabled);
14731
14751
  const selectedViewportId = data.activeViewportIds.find((id) => id === otherViewport.id);
14732
14752
  let color = viewportColor !== undefined ? viewportColor : 'rgb(200, 200, 200)';
14733
14753
  let lineWidth = 1;
@@ -14738,7 +14758,8 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
14738
14758
  lineWidth = 2.5;
14739
14759
  }
14740
14760
  let lineUID = `${lineIndex}`;
14741
- if (viewportControllable && viewportDraggableRotatable) {
14761
+ if (viewportControllable &&
14762
+ (viewportDraggableRotatable || minimalCrosshairConfig.enabled)) {
14742
14763
  lineUID = `${lineIndex}One`;
14743
14764
  (0,drawingSvg.drawLine)(svgDrawingHelper, annotationUID, lineUID, line[1], line[2], {
14744
14765
  color,
@@ -14776,31 +14797,33 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
14776
14797
  newRtpoints.push(rotHandleWorldOne, rotHandleWorldTwo);
14777
14798
  const slabThicknessHandlesActive = data.handles.activeOperation === CrosshairsTool_OPERATION.SLAB;
14778
14799
  const slabThicknessHandles = [line[11], line[12], line[13], line[14]];
14779
- const slabThicknessHandleWorldOne = [
14780
- viewport.canvasToWorld(line[11]),
14781
- otherViewport,
14782
- line[5],
14783
- line[6],
14784
- ];
14785
- const slabThicknessHandleWorldTwo = [
14786
- viewport.canvasToWorld(line[12]),
14787
- otherViewport,
14788
- line[5],
14789
- line[6],
14790
- ];
14791
- const slabThicknessHandleWorldThree = [
14792
- viewport.canvasToWorld(line[13]),
14793
- otherViewport,
14794
- line[7],
14795
- line[8],
14796
- ];
14797
- const slabThicknessHandleWorldFour = [
14798
- viewport.canvasToWorld(line[14]),
14799
- otherViewport,
14800
- line[7],
14801
- line[8],
14802
- ];
14803
- newStpoints.push(slabThicknessHandleWorldOne, slabThicknessHandleWorldTwo, slabThicknessHandleWorldThree, slabThicknessHandleWorldFour);
14800
+ if (!minimalCrosshairConfig.enabled) {
14801
+ const slabThicknessHandleWorldOne = [
14802
+ viewport.canvasToWorld(line[11]),
14803
+ otherViewport,
14804
+ line[5],
14805
+ line[6],
14806
+ ];
14807
+ const slabThicknessHandleWorldTwo = [
14808
+ viewport.canvasToWorld(line[12]),
14809
+ otherViewport,
14810
+ line[5],
14811
+ line[6],
14812
+ ];
14813
+ const slabThicknessHandleWorldThree = [
14814
+ viewport.canvasToWorld(line[13]),
14815
+ otherViewport,
14816
+ line[7],
14817
+ line[8],
14818
+ ];
14819
+ const slabThicknessHandleWorldFour = [
14820
+ viewport.canvasToWorld(line[14]),
14821
+ otherViewport,
14822
+ line[7],
14823
+ line[8],
14824
+ ];
14825
+ newStpoints.push(slabThicknessHandleWorldOne, slabThicknessHandleWorldTwo, slabThicknessHandleWorldThree, slabThicknessHandleWorldFour);
14826
+ }
14804
14827
  let handleRadius = this.configuration.handleRadius *
14805
14828
  (this.configuration.enableHDPIHandles ? window.devicePixelRatio : 1);
14806
14829
  let opacity = 1;
@@ -15137,6 +15160,7 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
15137
15160
  emitEvent: true,
15138
15161
  updateViewportCameras: false,
15139
15162
  });
15163
+ viewport.render();
15140
15164
  state/* state */.wk.isInteractingWithTool = false;
15141
15165
  return true;
15142
15166
  };
@@ -15813,6 +15837,7 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
15813
15837
  }
15814
15838
  }
15815
15839
  _getRotationHandleNearImagePoint(viewport, annotation, canvasCoords, proximity) {
15840
+ const minimalCrosshairConfig = getMinimalCrosshairConfig(this.configuration);
15816
15841
  const { data } = annotation;
15817
15842
  const { rotationPoints } = data.handles;
15818
15843
  for (let i = 0; i < rotationPoints.length; i++) {
@@ -15822,7 +15847,8 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
15822
15847
  if (!viewportControllable) {
15823
15848
  continue;
15824
15849
  }
15825
- const viewportDraggableRotatable = this._getReferenceLineDraggableRotatable(otherViewport.id);
15850
+ const viewportDraggableRotatable = !minimalCrosshairConfig.enabled &&
15851
+ this._getReferenceLineDraggableRotatable(otherViewport.id);
15826
15852
  if (!viewportDraggableRotatable) {
15827
15853
  continue;
15828
15854
  }
@@ -15838,6 +15864,7 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
15838
15864
  return null;
15839
15865
  }
15840
15866
  _getSlabThicknessHandleNearImagePoint(viewport, annotation, canvasCoords, proximity) {
15867
+ const minimalCrosshairConfig = getMinimalCrosshairConfig(this.configuration);
15841
15868
  const { data } = annotation;
15842
15869
  const { slabThicknessPoints } = data.handles;
15843
15870
  for (let i = 0; i < slabThicknessPoints.length; i++) {
@@ -15847,7 +15874,8 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
15847
15874
  if (!viewportControllable) {
15848
15875
  continue;
15849
15876
  }
15850
- const viewportSlabThicknessControlsOn = this._getReferenceLineSlabThicknessControlsOn(otherViewport.id);
15877
+ const viewportSlabThicknessControlsOn = !minimalCrosshairConfig.enabled &&
15878
+ this._getReferenceLineSlabThicknessControlsOn(otherViewport.id);
15851
15879
  if (!viewportSlabThicknessControlsOn) {
15852
15880
  continue;
15853
15881
  }
@@ -15864,6 +15892,7 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
15864
15892
  return null;
15865
15893
  }
15866
15894
  _pointNearTool(element, annotation, canvasCoords, proximity) {
15895
+ const minimalCrosshairConfig = getMinimalCrosshairConfig(this.configuration);
15867
15896
  const enabledElement = (0,esm.getEnabledElement)(element);
15868
15897
  const { viewport } = enabledElement;
15869
15898
  const { clientWidth, clientHeight } = viewport.canvas;
@@ -15876,7 +15905,8 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
15876
15905
  const otherViewport = rotationPoints[i][1];
15877
15906
  const viewportControllable = this._getReferenceLineControllable(otherViewport.id);
15878
15907
  const viewportDraggableRotatable = this._getReferenceLineDraggableRotatable(otherViewport.id);
15879
- if (!viewportControllable || !viewportDraggableRotatable) {
15908
+ if (!viewportControllable ||
15909
+ (!viewportDraggableRotatable && !minimalCrosshairConfig.enabled)) {
15880
15910
  continue;
15881
15911
  }
15882
15912
  const lineSegment1 = {
@@ -15913,7 +15943,8 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
15913
15943
  continue;
15914
15944
  }
15915
15945
  const viewportControllable = this._getReferenceLineControllable(otherViewport.id);
15916
- const viewportSlabThicknessControlsOn = this._getReferenceLineSlabThicknessControlsOn(otherViewport.id);
15946
+ const viewportSlabThicknessControlsOn = !minimalCrosshairConfig.enabled &&
15947
+ this._getReferenceLineSlabThicknessControlsOn(otherViewport.id);
15917
15948
  if (!viewportControllable || !viewportSlabThicknessControlsOn) {
15918
15949
  continue;
15919
15950
  }
@@ -15966,6 +15997,29 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
15966
15997
  return data.handles.activeOperation === CrosshairsTool_OPERATION.DRAG ? true : false;
15967
15998
  }
15968
15999
  }
16000
+ function getMinimalCrosshairConfig(configuration) {
16001
+ const minimal = configuration?.minimal;
16002
+ if (!minimal?.enabled) {
16003
+ return {
16004
+ enabled: false,
16005
+ lineLengthInPx: 0,
16006
+ };
16007
+ }
16008
+ const lineLengthInPx = typeof minimal.lineLengthInPx === 'number' &&
16009
+ Number.isFinite(minimal.lineLengthInPx)
16010
+ ? minimal.lineLengthInPx
16011
+ : 40;
16012
+ return {
16013
+ enabled: true,
16014
+ lineLengthInPx: Math.max(0, lineLengthInPx),
16015
+ };
16016
+ }
16017
+ function getSegmentMidpoint(start, end) {
16018
+ const midpoint = gl_matrix_esm/* vec2.create */.Zc.create();
16019
+ gl_matrix_esm/* vec2.add */.Zc.add(midpoint, start, end);
16020
+ gl_matrix_esm/* vec2.scale */.Zc.scale(midpoint, midpoint, 0.5);
16021
+ return midpoint;
16022
+ }
15969
16023
  CrosshairsTool.toolName = 'Crosshairs';
15970
16024
  /* harmony default export */ const tools_CrosshairsTool = ((/* unused pure expression or super */ null && (CrosshairsTool)));
15971
16025
 
@@ -37966,6 +38020,8 @@ AnnotationTool.toolName = 'AnnotationTool';
37966
38020
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(58640);
37967
38021
  /* harmony import */ var _LabelmapBaseTool__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23631);
37968
38022
  /* harmony import */ var _strategies_utils_getStrategyData__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(40905);
38023
+ /* harmony import */ var _stateManagement_segmentation_getActiveSegmentation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(67165);
38024
+
37969
38025
 
37970
38026
 
37971
38027
 
@@ -38062,6 +38118,18 @@ class BrushTool extends _LabelmapBaseTool__WEBPACK_IMPORTED_MODULE_9__/* ["defau
38062
38118
  const { element, currentPoints } = eventData;
38063
38119
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
38064
38120
  const { viewport } = enabledElement;
38121
+ const activeSegmentation = (0,_stateManagement_segmentation_getActiveSegmentation__WEBPACK_IMPORTED_MODULE_11__/* .getActiveSegmentation */ .T)(viewport.id);
38122
+ if (!activeSegmentation) {
38123
+ const event = new CustomEvent(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.Enums.Events.ERROR_EVENT, {
38124
+ detail: {
38125
+ type: 'Segmentation',
38126
+ message: 'No active segmentation detected, create a segmentation representation before using the brush tool',
38127
+ },
38128
+ cancelable: true,
38129
+ });
38130
+ _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.dispatchEvent(event);
38131
+ return false;
38132
+ }
38065
38133
  this._editData = this.createEditData(element);
38066
38134
  this._activateDraw(element);
38067
38135
  (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_7__.hideElementCursor)(element);
@@ -38443,14 +38511,6 @@ class LabelmapBaseTool extends _base__WEBPACK_IMPORTED_MODULE_1__/* .BaseTool */
38443
38511
  const { viewport } = enabledElement;
38444
38512
  const activeSegmentation = (0,_stateManagement_segmentation_getActiveSegmentation__WEBPACK_IMPORTED_MODULE_3__/* .getActiveSegmentation */ .T)(viewport.id);
38445
38513
  if (!activeSegmentation) {
38446
- const event = new CustomEvent(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.Enums.Events.ERROR_EVENT, {
38447
- detail: {
38448
- type: 'Segmentation',
38449
- message: 'No active segmentation detected, create a segmentation representation before using the brush tool',
38450
- },
38451
- cancelable: true,
38452
- });
38453
- _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.dispatchEvent(event);
38454
38514
  return null;
38455
38515
  }
38456
38516
  const { segmentationId } = activeSegmentation;
@@ -39793,28 +39853,36 @@ function _findSvgLayer(element) {
39793
39853
  return internalDiv?.querySelector(':scope > .svg-layer') || null;
39794
39854
  }
39795
39855
  function _determineCorners(canvasPoints) {
39796
- const p0 = canvasPoints[0];
39797
- if (!p0 || canvasPoints.length < 2) {
39856
+ const validPoints = canvasPoints.filter(Boolean);
39857
+ const p0 = validPoints[0];
39858
+ if (!p0 || validPoints.length < 2) {
39798
39859
  return { left: p0, right: p0, top: p0, bottom: p0 };
39799
39860
  }
39800
- const handlesLeftToRight = [canvasPoints[0], canvasPoints[1]].sort(_compareX);
39801
- const handlesTopToBottom = [canvasPoints[0], canvasPoints[1]].sort(_compareY);
39802
- const left = handlesLeftToRight[0];
39803
- const right = handlesLeftToRight[handlesLeftToRight.length - 1];
39804
- const top = handlesTopToBottom[0];
39805
- const bottom = handlesTopToBottom[handlesTopToBottom.length - 1];
39861
+ let left = p0;
39862
+ let right = p0;
39863
+ let top = p0;
39864
+ let bottom = p0;
39865
+ for (let i = 1; i < validPoints.length; i++) {
39866
+ const point = validPoints[i];
39867
+ if (point[0] < left[0]) {
39868
+ left = point;
39869
+ }
39870
+ if (point[0] > right[0]) {
39871
+ right = point;
39872
+ }
39873
+ if (point[1] < top[1]) {
39874
+ top = point;
39875
+ }
39876
+ if (point[1] > bottom[1]) {
39877
+ bottom = point;
39878
+ }
39879
+ }
39806
39880
  return {
39807
39881
  left,
39808
39882
  top,
39809
39883
  bottom,
39810
39884
  right,
39811
39885
  };
39812
- function _compareX(a, b) {
39813
- return a[0] < b[0] ? -1 : 1;
39814
- }
39815
- function _compareY(a, b) {
39816
- return a[1] < b[1] ? -1 : 1;
39817
- }
39818
39886
  }
39819
39887
  function _estimateTextBoxSize(textLines) {
39820
39888
  const estimatedPadding = 25;
@@ -5201,12 +5201,17 @@ function getDisplaySetInfo(instances) {
5201
5201
  const instancesMap = new Map();
5202
5202
  let firstTimePointInstances;
5203
5203
  if (instances[0].NumberOfFrames > 1 && timePoints.length > 1) {
5204
- // handle multiframe dynamic volume
5205
- firstTimePointInstances = timePoints[0].map(imageId => dist_esm.metaData.get('instance', imageId));
5204
+ // Handle multiframe dynamic volumes. Local file frame imageIds do not
5205
+ // always resolve to a frame-level instance object, so keep resolved
5206
+ // entries and fall back to the source multiframe instance when needed.
5207
+ firstTimePointInstances = timePoints[0].map(imageId => dist_esm.metaData.get('instance', imageId)).filter(Boolean);
5208
+ if (!firstTimePointInstances.length) {
5209
+ firstTimePointInstances = [instances[0]];
5210
+ }
5206
5211
  } else {
5207
5212
  // O(n) to convert it into a map and O(1) to find each instance
5208
5213
  instances.forEach(instance => instancesMap.set(instance.imageId, instance));
5209
- firstTimePointInstances = timePoint.map(imageId => instancesMap.get(imageId));
5214
+ firstTimePointInstances = timePoint.map(imageId => instancesMap.get(imageId)).filter(Boolean);
5210
5215
  }
5211
5216
  displaySetInfo = getSopClassHandlerModule_isDisplaySetReconstructable(firstTimePointInstances, appConfig);
5212
5217
  } else {
@@ -10404,8 +10409,14 @@ function getDataSourceConfigurationCustomization({
10404
10409
  const {
10405
10410
  sortingCriteria
10406
10411
  } = src/* utils */.Wp;
10412
+ const {
10413
+ seriesSortCriteria
10414
+ } = sortingCriteria;
10415
+
10416
+ /** Stable series order for e2e (Playwright sets TEST_ENV=true via cross-env). */
10417
+ const sortingCriteriaFn = false ? 0 : seriesSortCriteria.seriesInfoSortingCriteria;
10407
10418
  /* harmony default export */ const sortingCriteriaCustomization = ({
10408
- sortingCriteria: sortingCriteria.seriesSortCriteria.seriesInfoSortingCriteria
10419
+ sortingCriteria: sortingCriteriaFn
10409
10420
  });
10410
10421
  ;// ../../../extensions/default/src/customizations/onDropHandlerCustomization.ts
10411
10422
  /* harmony default export */ const onDropHandlerCustomization = ({
@@ -10476,8 +10487,8 @@ function AboutModalDefault() {
10476
10487
  name
10477
10488
  } = (0,browser_detect_es5/* default */.A)();
10478
10489
  const browser = `${name[0].toUpperCase()}${name.substr(1)} ${version}`;
10479
- const versionNumber = "3.13.0-beta.55";
10480
- const commitHash = "961eea1c39c37a940c1707c3dfafcede5f4af994";
10490
+ const versionNumber = "3.13.0-beta.57";
10491
+ const commitHash = "f5a66b9eea236cd3291eac857208d7465516c89a";
10481
10492
  const [main, beta] = versionNumber.split('-');
10482
10493
  return /*#__PURE__*/react.createElement(ui_next_src/* AboutModal */.VTU, {
10483
10494
  className: "w-[400px]"