@ohif/app 3.12.0-beta.52 → 3.12.0-beta.53

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/{1447.bundle.f58681b8a8c6746c3256.js → 1447.bundle.ec55b67e67336fc21395.js} +2 -2
  2. package/dist/{1919.bundle.b1390ab4c85106c069e2.js → 1919.bundle.4e6bd406f3e744fac297.js} +1 -0
  3. package/dist/{2243.bundle.92d2afd8756bda5e2ca3.js → 2243.bundle.d37af11011d841506650.js} +1 -0
  4. package/dist/{2518.bundle.fbbfa351f8e8c446599b.js → 2518.bundle.57c229a14e22d23db384.js} +1 -0
  5. package/dist/{2974.bundle.ec95e58b346dbe30a362.js → 2974.bundle.a90a9df917b90bc02c69.js} +1 -0
  6. package/dist/{4019.bundle.c5b332003e3cd00868ce.js → 4019.bundle.13e7f662a9e489b74a27.js} +70 -3
  7. package/dist/{4759.bundle.8686abdd7bcf4aa7d107.js → 4759.bundle.c3bfca952eea20a0d6f9.js} +1 -0
  8. package/dist/{5674.bundle.24de237ef15879b25714.js → 5674.bundle.8c34228471ff9e53b8c3.js} +1 -0
  9. package/dist/{6991.bundle.d0c8eb5e352477b0d42e.js → 6991.bundle.80eea6ff61dba94b2879.js} +1 -0
  10. package/dist/{7412.bundle.80f68b38041e891c64a8.js → 7412.bundle.42d0b84eb71e17deea44.js} +274 -81
  11. package/dist/{8558.bundle.9ee1f10769f9cac46bb3.js → 8558.bundle.7b39c27e2bd32e4a18aa.js} +1 -0
  12. package/dist/{934.bundle.d028841173058da9793c.js → 934.bundle.f62759c74362ecd45046.js} +1 -0
  13. package/dist/{9819.bundle.f9a684737e748002f1c2.js → 9819.bundle.cb36094b2dbfe6332e89.js} +16 -6
  14. package/dist/{9856.bundle.8e21e8c0322a0837862b.js → 9856.bundle.9a1396fddc3af67dcaf4.js} +169 -14
  15. package/dist/{9892.bundle.83de6c11c8a9eb4bba25.js → 9892.bundle.f00828c8f4763b097271.js} +258 -76
  16. package/dist/{app.bundle.7ea0ea630b0467e32f40.js → app.bundle.b5c364b2112dc6c8fef1.js} +11 -4
  17. package/dist/{compute.bundle.f176731b761d630f358c.js → compute.bundle.957cf6f00e6c9f033f51.js} +1 -1
  18. package/dist/index.html +1 -1
  19. package/dist/{polySeg.bundle.1ab7dd310985596b4098.js → polySeg.bundle.99fe77d122f62107b12e.js} +1 -1
  20. package/dist/sw.js +1 -1
  21. package/package.json +21 -21
  22. /package/dist/{1459.bundle.26bd313381a55ecd59f7.js → 1459.bundle.9803b32f90cade8bbab5.js} +0 -0
  23. /package/dist/{1604.bundle.813a49f279de52122def.js → 1604.bundle.82b3545ba77291673ab0.js} +0 -0
  24. /package/dist/{1807.bundle.9609cc9a5502d3c5c4ba.js → 1807.bundle.52567533b273a2581fe6.js} +0 -0
  25. /package/dist/{213.bundle.844009eea53b5e7b71bf.js → 213.bundle.32923830428c6ce36969.js} +0 -0
  26. /package/dist/{2424.bundle.d3c0fa7cda17e7a40fc9.js → 2424.bundle.c757e549b61768f3907f.js} +0 -0
  27. /package/dist/{3409.bundle.c756a8ccaa7faa1d9235.js → 3409.bundle.fdd66303b88b09df1755.js} +0 -0
  28. /package/dist/{4113.bundle.31fe4e2a2956ce6c5d2d.js → 4113.bundle.8aa17598a438e0f59977.js} +0 -0
  29. /package/dist/{414.bundle.113bc87916aa22d4cccc.js → 414.bundle.2812dfdd9dcbf5ec54f4.js} +0 -0
  30. /package/dist/{5457.bundle.1d6b074af89e69a54dde.js → 5457.bundle.a34aefc642710f3c4bfe.js} +0 -0
  31. /package/dist/{5485.bundle.ae87fca794a3248efdaa.js → 5485.bundle.6a30e022e40ee4efcf64.js} +0 -0
  32. /package/dist/{6027.bundle.2b0e82eb38b6a028a255.js → 6027.bundle.13ce9445760aecded831.js} +0 -0
  33. /package/dist/{6201.bundle.0d8aa2fba299a8cc92a9.js → 6201.bundle.1449ec26ca43420a516a.js} +0 -0
  34. /package/dist/{7197.bundle.7cc9bb98050e4ae0294d.js → 7197.bundle.20b8564f4a4af9191bef.js} +0 -0
  35. /package/dist/{7639.bundle.fb8c61c6588c528d336f.js → 7639.bundle.6988d6e467128811633c.js} +0 -0
  36. /package/dist/{810.bundle.04da3bf08f7df9589091.js → 810.bundle.c1486b31c437a41ef7ce.js} +0 -0
  37. /package/dist/{85.bundle.72ca9e62d8bcef003e42.js → 85.bundle.a84605c91fb325b762dd.js} +0 -0
  38. /package/dist/{8815.bundle.c5c714fe2a3ff31aacad.js → 8815.bundle.9531838f1288ab88a108.js} +0 -0
@@ -6925,7 +6925,7 @@ var COLOR_LUT = __webpack_require__(93952);
6925
6925
 
6926
6926
 
6927
6927
  ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/version.js
6928
- const version = '4.3.14';
6928
+ const version = '4.5.1';
6929
6929
 
6930
6930
  ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/synchronizers/callbacks/cameraSyncCallback.js
6931
6931
 
@@ -7874,6 +7874,7 @@ var stackPrefetchUtils = __webpack_require__(94762);
7874
7874
 
7875
7875
 
7876
7876
 
7877
+
7877
7878
  const { imageRetrieveMetadataProvider } = esm.utilities;
7878
7879
  let configuration = {
7879
7880
  maxImagesToPrefetch: Infinity,
@@ -7933,6 +7934,13 @@ function prefetch(element) {
7933
7934
  console.log('prefetch done: %s', imageId);
7934
7935
  const imageIdIndex = stack.imageIds.indexOf(imageId);
7935
7936
  removeFromList(imageIdIndex);
7937
+ if (stackPrefetch.indicesToRequest.length === 0) {
7938
+ const eventDetail = {
7939
+ element: element,
7940
+ lastPrefetchedImageId: imageId,
7941
+ };
7942
+ (0,esm.triggerEvent)(esm.eventTarget, enums.Events.STACK_PREFETCH_COMPLETE, eventDetail);
7943
+ }
7936
7944
  }
7937
7945
  let lowerIndex = nearest.low;
7938
7946
  let higherIndex = nearest.high;
@@ -8035,6 +8043,7 @@ const stackPrefetch = { enable: stackPrefetch_enable, disable: stackPrefetch_dis
8035
8043
 
8036
8044
 
8037
8045
 
8046
+
8038
8047
  const { imageRetrieveMetadataProvider: stackContextPrefetch_imageRetrieveMetadataProvider } = esm.utilities;
8039
8048
  let stackContextPrefetch_configuration = {
8040
8049
  maxImagesToPrefetch: Infinity,
@@ -8139,6 +8148,13 @@ function stackContextPrefetch_prefetch(element, priority = 0) {
8139
8148
  }
8140
8149
  }
8141
8150
  }
8151
+ if (stackPrefetch.indicesToRequest.length === 0) {
8152
+ const eventDetail = {
8153
+ element: element,
8154
+ lastPrefetchedImageId: imageId,
8155
+ };
8156
+ (0,esm.triggerEvent)(esm.eventTarget, enums.Events.STACK_PREFETCH_COMPLETE, eventDetail);
8157
+ }
8142
8158
  }
8143
8159
  const requestFn = (imageId, options) => {
8144
8160
  const { retrieveOptions = {} } = esm.metaData.get(stackContextPrefetch_imageRetrieveMetadataProvider.IMAGE_RETRIEVE_CONFIGURATION, imageId, 'stack') || {};
@@ -20271,68 +20287,79 @@ class EllipticalROITool extends base/* AnnotationTool */.EC {
20271
20287
  pos1Index[0] = Math.floor(pos1Index[0]);
20272
20288
  pos1Index[1] = Math.floor(pos1Index[1]);
20273
20289
  pos1Index[2] = Math.floor(pos1Index[2]);
20274
- const post2Index = EllipticalROITool_transformWorldToIndex(imageData, worldPos2);
20275
- post2Index[0] = Math.floor(post2Index[0]);
20276
- post2Index[1] = Math.floor(post2Index[1]);
20277
- post2Index[2] = Math.floor(post2Index[2]);
20278
- this.isHandleOutsideImage = !this._isInsideVolume(pos1Index, post2Index, dimensions);
20279
- const iMin = Math.min(pos1Index[0], post2Index[0]);
20280
- const iMax = Math.max(pos1Index[0], post2Index[0]);
20281
- const jMin = Math.min(pos1Index[1], post2Index[1]);
20282
- const jMax = Math.max(pos1Index[1], post2Index[1]);
20283
- const kMin = Math.min(pos1Index[2], post2Index[2]);
20284
- const kMax = Math.max(pos1Index[2], post2Index[2]);
20285
- const boundsIJK = [
20286
- [iMin, iMax],
20287
- [jMin, jMax],
20288
- [kMin, kMax],
20289
- ];
20290
- const center = [
20291
- (topLeftWorld[0] + bottomRightWorld[0]) / 2,
20292
- (topLeftWorld[1] + bottomRightWorld[1]) / 2,
20293
- (topLeftWorld[2] + bottomRightWorld[2]) / 2,
20294
- ];
20295
- const ellipseObj = {
20296
- center,
20297
- xRadius: Math.abs(topLeftWorld[0] - bottomRightWorld[0]) / 2,
20298
- yRadius: Math.abs(topLeftWorld[1] - bottomRightWorld[1]) / 2,
20299
- zRadius: Math.abs(topLeftWorld[2] - bottomRightWorld[2]) / 2,
20300
- };
20301
- const { worldWidth, worldHeight } = (0,getWorldWidthAndHeightFromTwoPoints/* default */.A)(viewPlaneNormal, viewUp, worldPos1, worldPos2);
20302
- const isEmptyArea = worldWidth === 0 && worldHeight === 0;
20303
- const handles = [pos1Index, post2Index];
20304
- const { scale, areaUnit } = (0,getCalibratedUnits/* getCalibratedLengthUnitsAndScale */.Op)(image, handles);
20305
- const area = Math.abs(Math.PI * (worldWidth / 2) * (worldHeight / 2)) /
20306
- scale /
20307
- scale;
20308
- const pixelUnitsOptions = {
20309
- isPreScaled: (0,isViewportPreScaled/* isViewportPreScaled */.u)(viewport, targetId),
20310
- isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
20311
- };
20312
- const modalityUnit = (0,getPixelValueUnits/* getPixelValueUnits */.j)(metadata.Modality, annotation.metadata.referencedImageId, pixelUnitsOptions);
20313
- let pointsInShape;
20314
- if (voxelManager) {
20315
- const pointsInShape = voxelManager.forEach(this.configuration.statsCalculator.statsCallback, {
20316
- boundsIJK,
20317
- imageData,
20318
- isInObject: (pointLPS) => (0,ellipse.pointInEllipse)(ellipseObj, pointLPS, { fast: true }),
20319
- returnPoints: this.configuration.storePointData,
20320
- });
20290
+ const pos2Index = EllipticalROITool_transformWorldToIndex(imageData, worldPos2);
20291
+ pos2Index[0] = Math.floor(pos2Index[0]);
20292
+ pos2Index[1] = Math.floor(pos2Index[1]);
20293
+ pos2Index[2] = Math.floor(pos2Index[2]);
20294
+ if (this._isInsideVolume(pos1Index, pos2Index, dimensions)) {
20295
+ const iMin = Math.min(pos1Index[0], pos2Index[0]);
20296
+ const iMax = Math.max(pos1Index[0], pos2Index[0]);
20297
+ const jMin = Math.min(pos1Index[1], pos2Index[1]);
20298
+ const jMax = Math.max(pos1Index[1], pos2Index[1]);
20299
+ const kMin = Math.min(pos1Index[2], pos2Index[2]);
20300
+ const kMax = Math.max(pos1Index[2], pos2Index[2]);
20301
+ const boundsIJK = [
20302
+ [iMin, iMax],
20303
+ [jMin, jMax],
20304
+ [kMin, kMax],
20305
+ ];
20306
+ const center = [
20307
+ (topLeftWorld[0] + bottomRightWorld[0]) / 2,
20308
+ (topLeftWorld[1] + bottomRightWorld[1]) / 2,
20309
+ (topLeftWorld[2] + bottomRightWorld[2]) / 2,
20310
+ ];
20311
+ const xRadius = Math.abs(topLeftWorld[0] - bottomRightWorld[0]) / 2;
20312
+ const yRadius = Math.abs(topLeftWorld[1] - bottomRightWorld[1]) / 2;
20313
+ const zRadius = Math.abs(topLeftWorld[2] - bottomRightWorld[2]) / 2;
20314
+ const ellipseObj = {
20315
+ center,
20316
+ xRadius: xRadius < esm.EPSILON / 2 ? 0 : xRadius,
20317
+ yRadius: yRadius < esm.EPSILON / 2 ? 0 : yRadius,
20318
+ zRadius: zRadius < esm.EPSILON / 2 ? 0 : zRadius,
20319
+ };
20320
+ const { worldWidth, worldHeight } = (0,getWorldWidthAndHeightFromTwoPoints/* default */.A)(viewPlaneNormal, viewUp, worldPos1, worldPos2);
20321
+ const isEmptyArea = worldWidth === 0 && worldHeight === 0;
20322
+ const handles = [pos1Index, pos2Index];
20323
+ const { scale, unit, areaUnit } = (0,getCalibratedUnits/* getCalibratedLengthUnitsAndScale */.Op)(image, handles);
20324
+ const aspect = (0,getCalibratedUnits/* getCalibratedAspect */.CQ)(image);
20325
+ const area = Math.abs(Math.PI *
20326
+ (worldWidth / scale / 2) *
20327
+ (worldHeight / aspect / scale / 2));
20328
+ const pixelUnitsOptions = {
20329
+ isPreScaled: (0,isViewportPreScaled/* isViewportPreScaled */.u)(viewport, targetId),
20330
+ isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
20331
+ };
20332
+ const modalityUnit = (0,getPixelValueUnits/* getPixelValueUnits */.j)(metadata.Modality, annotation.metadata.referencedImageId, pixelUnitsOptions);
20333
+ let pointsInShape;
20334
+ if (voxelManager) {
20335
+ pointsInShape = voxelManager.forEach(this.configuration.statsCalculator.statsCallback, {
20336
+ isInObject: (pointLPS) => (0,ellipse.pointInEllipse)(ellipseObj, pointLPS, { fast: true }),
20337
+ boundsIJK,
20338
+ imageData,
20339
+ returnPoints: this.configuration.storePointData,
20340
+ });
20341
+ }
20342
+ const stats = this.configuration.statsCalculator.getStatistics();
20343
+ cachedStats[targetId] = {
20344
+ Modality: metadata.Modality,
20345
+ area,
20346
+ mean: stats.mean?.value,
20347
+ max: stats.max?.value,
20348
+ min: stats.min?.value,
20349
+ stdDev: stats.stdDev?.value,
20350
+ statsArray: stats.array,
20351
+ pointsInShape,
20352
+ isEmptyArea,
20353
+ areaUnit,
20354
+ modalityUnit,
20355
+ };
20356
+ }
20357
+ else {
20358
+ this.isHandleOutsideImage = true;
20359
+ cachedStats[targetId] = {
20360
+ Modality: metadata.Modality,
20361
+ };
20321
20362
  }
20322
- const stats = this.configuration.statsCalculator.getStatistics();
20323
- cachedStats[targetId] = {
20324
- Modality: metadata.Modality,
20325
- area,
20326
- mean: stats.mean?.value,
20327
- max: stats.max?.value,
20328
- min: stats.min?.value,
20329
- stdDev: stats.stdDev?.value,
20330
- statsArray: stats.array,
20331
- pointsInShape,
20332
- isEmptyArea,
20333
- areaUnit,
20334
- modalityUnit,
20335
- };
20336
20363
  }
20337
20364
  const invalidated = annotation.invalidated;
20338
20365
  annotation.invalidated = false;
@@ -36672,6 +36699,7 @@ class BrushTool extends _LabelmapBaseTool__WEBPACK_IMPORTED_MODULE_10__/* ["defa
36672
36699
  },
36673
36700
  }) {
36674
36701
  super(toolProps, defaultToolProps);
36702
+ this._lastDragInfo = null;
36675
36703
  this.onSetToolPassive = (evt) => {
36676
36704
  this.disableCursor();
36677
36705
  };
@@ -36683,14 +36711,24 @@ class BrushTool extends _LabelmapBaseTool__WEBPACK_IMPORTED_MODULE_10__/* ["defa
36683
36711
  };
36684
36712
  this.preMouseDownCallback = (evt) => {
36685
36713
  const eventData = evt.detail;
36686
- const { element } = eventData;
36714
+ const { element, currentPoints } = eventData;
36687
36715
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
36716
+ const { viewport } = enabledElement;
36688
36717
  this._editData = this.createEditData(element);
36689
36718
  this._activateDraw(element);
36690
36719
  (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__.hideElementCursor)(element);
36691
36720
  evt.preventDefault();
36692
36721
  this._previewData.isDrag = false;
36693
36722
  this._previewData.timerStart = Date.now();
36723
+ const canvasPoint = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.clone */ .Zc.clone(currentPoints.canvas);
36724
+ const worldPoint = viewport.canvasToWorld([
36725
+ canvasPoint[0],
36726
+ canvasPoint[1],
36727
+ ]);
36728
+ this._lastDragInfo = {
36729
+ canvas: canvasPoint,
36730
+ world: gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.clone */ .eR.clone(worldPoint),
36731
+ };
36694
36732
  const hoverData = this._hoverData || this.createHoverData(element);
36695
36733
  (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(hoverData.viewportIdsToRender);
36696
36734
  const operationData = this.getOperationData(element);
@@ -36765,6 +36803,7 @@ class BrushTool extends _LabelmapBaseTool__WEBPACK_IMPORTED_MODULE_10__/* ["defa
36765
36803
  const eventData = evt.detail;
36766
36804
  const { element, currentPoints } = eventData;
36767
36805
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
36806
+ const { viewport } = enabledElement;
36768
36807
  this.updateCursor(evt);
36769
36808
  const { viewportIdsToRender } = this._hoverData;
36770
36809
  (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(viewportIdsToRender);
@@ -36779,11 +36818,39 @@ class BrushTool extends _LabelmapBaseTool__WEBPACK_IMPORTED_MODULE_10__/* ["defa
36779
36818
  window.clearTimeout(this._previewData.timer);
36780
36819
  this._previewData.timer = null;
36781
36820
  }
36782
- this._previewData.preview = this.applyActiveStrategy(enabledElement, this.getOperationData(element));
36821
+ if (!this._lastDragInfo) {
36822
+ const startCanvas = this._previewData.startPoint;
36823
+ const startWorld = viewport.canvasToWorld([
36824
+ startCanvas[0],
36825
+ startCanvas[1],
36826
+ ]);
36827
+ this._lastDragInfo = {
36828
+ canvas: gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.clone */ .Zc.clone(startCanvas),
36829
+ world: gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.clone */ .eR.clone(startWorld),
36830
+ };
36831
+ }
36832
+ const currentCanvas = currentPoints.canvas;
36833
+ const currentWorld = viewport.canvasToWorld([
36834
+ currentCanvas[0],
36835
+ currentCanvas[1],
36836
+ ]);
36837
+ this._hoverData = this.createHoverData(element, currentCanvas);
36838
+ this._calculateCursor(element, currentCanvas);
36839
+ const operationData = this.getOperationData(element);
36840
+ operationData.strokePointsWorld = [
36841
+ gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.clone */ .eR.clone(this._lastDragInfo.world),
36842
+ gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.clone */ .eR.clone(currentWorld),
36843
+ ];
36844
+ this._previewData.preview = this.applyActiveStrategy(enabledElement, operationData);
36845
+ const currentCanvasClone = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.clone */ .Zc.clone(currentCanvas);
36846
+ this._lastDragInfo = {
36847
+ canvas: currentCanvasClone,
36848
+ world: gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.clone */ .eR.clone(currentWorld),
36849
+ };
36783
36850
  this._previewData.element = element;
36784
36851
  this._previewData.timerStart = Date.now() + dragTimeMs;
36785
36852
  this._previewData.isDrag = true;
36786
- this._previewData.startPoint = currentPoints.canvas;
36853
+ this._previewData.startPoint = currentCanvasClone;
36787
36854
  };
36788
36855
  this._endCallback = (evt) => {
36789
36856
  const eventData = evt.detail;
@@ -36798,6 +36865,7 @@ class BrushTool extends _LabelmapBaseTool__WEBPACK_IMPORTED_MODULE_10__/* ["defa
36798
36865
  (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__.resetElementCursor)(element);
36799
36866
  this.updateCursor(evt);
36800
36867
  this._editData = null;
36868
+ this._lastDragInfo = null;
36801
36869
  this.applyActiveStrategyCallback(enabledElement, operationData, _enums__WEBPACK_IMPORTED_MODULE_2__.StrategyCallbacks.OnInteractionEnd);
36802
36870
  if (!this._previewData.isDrag) {
36803
36871
  this.acceptPreview(element);
@@ -37384,7 +37452,7 @@ function lightenColor(r, g, b, a, factor = 0.4) {
37384
37452
  /* harmony export */ pB: () => (/* binding */ CIRCLE_STRATEGY),
37385
37453
  /* harmony export */ q: () => (/* binding */ thresholdInsideCircle)
37386
37454
  /* harmony export */ });
37387
- /* unused harmony exports fillOutsideCircle, CIRCLE_THRESHOLD_STRATEGY */
37455
+ /* unused harmony exports fillOutsideCircle, CIRCLE_THRESHOLD_STRATEGY, createPointInEllipse */
37388
37456
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
37389
37457
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15327);
37390
37458
  /* harmony import */ var _utilities_boundingBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(72282);
@@ -37399,7 +37467,7 @@ function lightenColor(r, g, b, a, factor = 0.4) {
37399
37467
 
37400
37468
 
37401
37469
 
37402
- const { transformWorldToIndex, isEqual } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities;
37470
+ const { transformWorldToIndex, transformIndexToWorld, isEqual } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities;
37403
37471
  function getEllipseCornersFromCanvasCoordinates(canvasCoordinates) {
37404
37472
  const [bottom, top, left, right] = canvasCoordinates;
37405
37473
  const topLeft = [left[0], top[1]];
@@ -37408,9 +37476,82 @@ function getEllipseCornersFromCanvasCoordinates(canvasCoordinates) {
37408
37476
  const topRight = [right[0], top[1]];
37409
37477
  return [topLeft, bottomRight, bottomLeft, topRight];
37410
37478
  }
37479
+ function createCircleCornersForCenter(center, viewUp, viewRight, radius) {
37480
+ const centerVec = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .eR.fromValues(center[0], center[1], center[2]);
37481
+ const top = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create();
37482
+ gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.scaleAndAdd */ .eR.scaleAndAdd(top, centerVec, viewUp, radius);
37483
+ const bottom = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create();
37484
+ gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.scaleAndAdd */ .eR.scaleAndAdd(bottom, centerVec, viewUp, -radius);
37485
+ const right = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create();
37486
+ gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.scaleAndAdd */ .eR.scaleAndAdd(right, centerVec, viewRight, radius);
37487
+ const left = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create();
37488
+ gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.scaleAndAdd */ .eR.scaleAndAdd(left, centerVec, viewRight, -radius);
37489
+ return [
37490
+ bottom,
37491
+ top,
37492
+ left,
37493
+ right,
37494
+ ];
37495
+ }
37496
+ function createStrokePredicate(centers, radius) {
37497
+ if (!centers.length || radius <= 0) {
37498
+ return null;
37499
+ }
37500
+ const radiusSquared = radius * radius;
37501
+ const centerVecs = centers.map((point) => [point[0], point[1], point[2]]);
37502
+ const segments = [];
37503
+ for (let i = 1; i < centerVecs.length; i++) {
37504
+ const start = centerVecs[i - 1];
37505
+ const end = centerVecs[i];
37506
+ const dx = end[0] - start[0];
37507
+ const dy = end[1] - start[1];
37508
+ const dz = end[2] - start[2];
37509
+ const lengthSquared = dx * dx + dy * dy + dz * dz;
37510
+ segments.push({ start, vector: [dx, dy, dz], lengthSquared });
37511
+ }
37512
+ return (worldPoint) => {
37513
+ if (!worldPoint) {
37514
+ return false;
37515
+ }
37516
+ for (const centerVec of centerVecs) {
37517
+ const dx = worldPoint[0] - centerVec[0];
37518
+ const dy = worldPoint[1] - centerVec[1];
37519
+ const dz = worldPoint[2] - centerVec[2];
37520
+ if (dx * dx + dy * dy + dz * dz <= radiusSquared) {
37521
+ return true;
37522
+ }
37523
+ }
37524
+ for (const { start, vector, lengthSquared } of segments) {
37525
+ if (lengthSquared === 0) {
37526
+ const dx = worldPoint[0] - start[0];
37527
+ const dy = worldPoint[1] - start[1];
37528
+ const dz = worldPoint[2] - start[2];
37529
+ if (dx * dx + dy * dy + dz * dz <= radiusSquared) {
37530
+ return true;
37531
+ }
37532
+ continue;
37533
+ }
37534
+ const dx = worldPoint[0] - start[0];
37535
+ const dy = worldPoint[1] - start[1];
37536
+ const dz = worldPoint[2] - start[2];
37537
+ const dot = dx * vector[0] + dy * vector[1] + dz * vector[2];
37538
+ const t = Math.max(0, Math.min(1, dot / lengthSquared));
37539
+ const projX = start[0] + vector[0] * t;
37540
+ const projY = start[1] + vector[1] * t;
37541
+ const projZ = start[2] + vector[2] * t;
37542
+ const distX = worldPoint[0] - projX;
37543
+ const distY = worldPoint[1] - projY;
37544
+ const distZ = worldPoint[2] - projZ;
37545
+ if (distX * distX + distY * distY + distZ * distZ <= radiusSquared) {
37546
+ return true;
37547
+ }
37548
+ }
37549
+ return false;
37550
+ };
37551
+ }
37411
37552
  const initializeCircle = {
37412
37553
  [_enums__WEBPACK_IMPORTED_MODULE_4__.StrategyCallbacks.Initialize]: (operationData) => {
37413
- const { points, viewport, segmentationImageData, } = operationData;
37554
+ const { points, viewport, segmentationImageData, viewUp, viewPlaneNormal, } = operationData;
37414
37555
  if (!points) {
37415
37556
  return;
37416
37557
  }
@@ -37424,18 +37565,35 @@ const initializeCircle = {
37424
37565
  }
37425
37566
  operationData.centerWorld = center;
37426
37567
  operationData.centerIJK = transformWorldToIndex(segmentationImageData, center);
37568
+ const brushRadius = points.length >= 2 ? gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.distance */ .eR.distance(points[0], points[1]) / 2 : 0;
37427
37569
  const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
37428
37570
  const corners = getEllipseCornersFromCanvasCoordinates(canvasCoordinates);
37429
37571
  const cornersInWorld = corners.map((corner) => viewport.canvasToWorld(corner));
37430
- const circleCornersIJK = points.map((world) => {
37431
- return transformWorldToIndex(segmentationImageData, world);
37432
- });
37572
+ const normalizedViewUp = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .eR.fromValues(viewUp[0], viewUp[1], viewUp[2]);
37573
+ gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.normalize */ .eR.normalize(normalizedViewUp, normalizedViewUp);
37574
+ const normalizedPlaneNormal = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .eR.fromValues(viewPlaneNormal[0], viewPlaneNormal[1], viewPlaneNormal[2]);
37575
+ gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.normalize */ .eR.normalize(normalizedPlaneNormal, normalizedPlaneNormal);
37576
+ const viewRight = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create();
37577
+ gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.cross */ .eR.cross(viewRight, normalizedViewUp, normalizedPlaneNormal);
37578
+ gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.normalize */ .eR.normalize(viewRight, viewRight);
37579
+ const strokeCentersSource = operationData.strokePointsWorld &&
37580
+ operationData.strokePointsWorld.length > 0
37581
+ ? operationData.strokePointsWorld
37582
+ : [operationData.centerWorld];
37583
+ const strokeCenters = strokeCentersSource.map((point) => gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.clone */ .eR.clone(point));
37584
+ const strokeCornersWorld = strokeCenters.flatMap((centerPoint) => createCircleCornersForCenter(centerPoint, normalizedViewUp, viewRight, brushRadius));
37585
+ const circleCornersIJK = strokeCornersWorld.map((world) => transformWorldToIndex(segmentationImageData, world));
37433
37586
  const boundsIJK = (0,_utilities_boundingBox__WEBPACK_IMPORTED_MODULE_2__.getBoundingBoxAroundShapeIJK)(circleCornersIJK, segmentationImageData.getDimensions());
37434
- operationData.isInObject = createPointInEllipse(cornersInWorld);
37587
+ operationData.strokePointsWorld = strokeCenters;
37588
+ operationData.isInObject = createPointInEllipse(cornersInWorld, {
37589
+ strokePointsWorld: strokeCenters,
37590
+ segmentationImageData,
37591
+ radius: brushRadius,
37592
+ });
37435
37593
  operationData.isInObjectBoundsIJK = boundsIJK;
37436
37594
  },
37437
37595
  };
37438
- function createPointInEllipse(cornersInWorld = []) {
37596
+ function createPointInEllipse(cornersInWorld = [], options = {}) {
37439
37597
  if (!cornersInWorld || cornersInWorld.length !== 4) {
37440
37598
  throw new Error('createPointInEllipse: cornersInWorld must have 4 points');
37441
37599
  }
@@ -37454,6 +37612,8 @@ function createPointInEllipse(cornersInWorld = []) {
37454
37612
  const normal = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create();
37455
37613
  gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.cross */ .eR.cross(normal, majorAxisVec, minorAxisVec);
37456
37614
  gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.normalize */ .eR.normalize(normal, normal);
37615
+ const radiusForStroke = options.radius ?? Math.max(xRadius, yRadius);
37616
+ const strokePredicate = createStrokePredicate(options.strokePointsWorld || [], radiusForStroke);
37457
37617
  if (isEqual(xRadius, yRadius)) {
37458
37618
  const radius = xRadius;
37459
37619
  const sphereObj = {
@@ -37461,11 +37621,33 @@ function createPointInEllipse(cornersInWorld = []) {
37461
37621
  radius,
37462
37622
  radius2: radius * radius,
37463
37623
  };
37464
- return (pointLPS) => (0,_utilities_math_sphere__WEBPACK_IMPORTED_MODULE_6__/* .pointInSphere */ .d)(sphereObj, pointLPS);
37624
+ return (pointLPS, pointIJK) => {
37625
+ let worldPoint = pointLPS;
37626
+ if (!worldPoint && pointIJK && options.segmentationImageData) {
37627
+ worldPoint = transformIndexToWorld(options.segmentationImageData, pointIJK);
37628
+ }
37629
+ if (!worldPoint) {
37630
+ return false;
37631
+ }
37632
+ if (strokePredicate?.(worldPoint)) {
37633
+ return true;
37634
+ }
37635
+ return (0,_utilities_math_sphere__WEBPACK_IMPORTED_MODULE_6__/* .pointInSphere */ .d)(sphereObj, worldPoint);
37636
+ };
37465
37637
  }
37466
- return (pointLPS) => {
37638
+ return (pointLPS, pointIJK) => {
37639
+ let worldPoint = pointLPS;
37640
+ if (!worldPoint && pointIJK && options.segmentationImageData) {
37641
+ worldPoint = transformIndexToWorld(options.segmentationImageData, pointIJK);
37642
+ }
37643
+ if (!worldPoint) {
37644
+ return false;
37645
+ }
37646
+ if (strokePredicate?.(worldPoint)) {
37647
+ return true;
37648
+ }
37467
37649
  const pointVec = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create();
37468
- gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.subtract */ .eR.subtract(pointVec, pointLPS, center);
37650
+ gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.subtract */ .eR.subtract(pointVec, worldPoint, center);
37469
37651
  const distToPlane = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.dot */ .eR.dot(pointVec, normal);
37470
37652
  const proj = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create();
37471
37653
  gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.scaleAndAdd */ .eR.scaleAndAdd(proj, pointVec, normal, -distToPlane);
@@ -44223,7 +44223,7 @@ function toLowHighRange(windowWidth, windowCenter, voiLUTFunction = _enums_VOILU
44223
44223
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
44224
44224
  /* harmony export */ r: () => (/* binding */ version)
44225
44225
  /* harmony export */ });
44226
- const version = '4.3.14';
44226
+ const version = '4.5.1';
44227
44227
 
44228
44228
 
44229
44229
  /***/ }),
@@ -48335,8 +48335,15 @@ function metaDataProvider_metaDataProvider(type, imageId) {
48335
48335
  return getTransferSyntax(imageId, metaData);
48336
48336
  }
48337
48337
  if (type === MetadataModules.PET_SERIES) {
48338
+ let correctedImageData = metaData['00280051'];
48339
+ let correctedImage = metaData_getValue(metaData['00280051']);
48340
+ if (correctedImageData &&
48341
+ correctedImageData.Value &&
48342
+ Array.isArray(correctedImageData.Value)) {
48343
+ correctedImage = correctedImageData.Value.join('\\');
48344
+ }
48338
48345
  return {
48339
- correctedImage: metaData_getValue(metaData['00280051']),
48346
+ correctedImage,
48340
48347
  units: metaData_getValue(metaData['00541001']),
48341
48348
  decayCorrection: metaData_getValue(metaData['00541102']),
48342
48349
  };
@@ -135421,7 +135428,7 @@ const detectionOptions = {
135421
135428
  }
135422
135429
  });
135423
135430
  ;// ../../i18n/package.json
135424
- const package_namespaceObject = /*#__PURE__*/JSON.parse('{"rE":"3.12.0-beta.51"}');
135431
+ const package_namespaceObject = /*#__PURE__*/JSON.parse('{"rE":"3.12.0-beta.52"}');
135425
135432
  ;// ../../i18n/src/utils.js
135426
135433
  const languagesMap = {
135427
135434
  ar: 'Arabic',
@@ -386133,7 +386140,7 @@ function __rewriteRelativeImportExtension(path, preserveJsx) {
386133
386140
  /******/ // This function allow to reference async chunks
386134
386141
  /******/ __webpack_require__.u = (chunkId) => {
386135
386142
  /******/ // return url for filenames based on template
386136
- /******/ return "" + ({"572":"polySeg","2007":"interpolation","3054":"histogram-worker","3694":"compute"}[chunkId] || chunkId) + ".bundle." + {"85":"72ca9e62d8bcef003e42","147":"30b16832e09898deaf32","213":"844009eea53b5e7b71bf","319":"fc959064ddf2f6978b54","414":"113bc87916aa22d4cccc","572":"1ab7dd310985596b4098","732":"6978ac30a1e36abf06db","810":"04da3bf08f7df9589091","934":"d028841173058da9793c","1447":"f58681b8a8c6746c3256","1459":"26bd313381a55ecd59f7","1604":"813a49f279de52122def","1807":"9609cc9a5502d3c5c4ba","1919":"b1390ab4c85106c069e2","1927":"8941122be98d6aea153c","2007":"f58dd6d3d25dd22cfefd","2108":"e84aa8d858d8c4f2413e","2243":"92d2afd8756bda5e2ca3","2345":"839224623fb00f805981","2424":"d3c0fa7cda17e7a40fc9","2518":"fbbfa351f8e8c446599b","2701":"3c34bd7d28cb2d095a5c","2974":"ec95e58b346dbe30a362","3054":"b7bb02c6cd9273c422f5","3409":"c756a8ccaa7faa1d9235","3694":"f176731b761d630f358c","4019":"c5b332003e3cd00868ce","4113":"31fe4e2a2956ce6c5d2d","4202":"1cef28d8aec1155d35d1","4759":"8686abdd7bcf4aa7d107","5261":"6e1a017f8f1027557f5b","5349":"44217fe4d4ce9a3a9be3","5457":"1d6b074af89e69a54dde","5485":"ae87fca794a3248efdaa","5674":"24de237ef15879b25714","5802":"48b958ebd8d250156814","6027":"2b0e82eb38b6a028a255","6201":"0d8aa2fba299a8cc92a9","6939":"41fbdef87597b5172ec6","6991":"d0c8eb5e352477b0d42e","7159":"122cd4e6d8fd1287d07f","7197":"7cc9bb98050e4ae0294d","7412":"80f68b38041e891c64a8","7431":"f6ee76ae243ffe1c811a","7639":"fb8c61c6588c528d336f","8094":"5c44190a325ac23e3e5c","8402":"edb924cd47cd168f621c","8558":"9ee1f10769f9cac46bb3","8740":"39b40ee21a873e824ce8","8815":"c5c714fe2a3ff31aacad","9862":"1133b0f6bd2b035c85bd"}[chunkId] + ".js";
386143
+ /******/ return "" + ({"572":"polySeg","2007":"interpolation","3054":"histogram-worker","3694":"compute"}[chunkId] || chunkId) + ".bundle." + {"85":"a84605c91fb325b762dd","147":"30b16832e09898deaf32","213":"32923830428c6ce36969","319":"fc959064ddf2f6978b54","414":"2812dfdd9dcbf5ec54f4","572":"99fe77d122f62107b12e","732":"6978ac30a1e36abf06db","810":"c1486b31c437a41ef7ce","934":"f62759c74362ecd45046","1447":"ec55b67e67336fc21395","1459":"9803b32f90cade8bbab5","1604":"82b3545ba77291673ab0","1807":"52567533b273a2581fe6","1919":"4e6bd406f3e744fac297","1927":"8941122be98d6aea153c","2007":"f58dd6d3d25dd22cfefd","2108":"e84aa8d858d8c4f2413e","2243":"d37af11011d841506650","2345":"839224623fb00f805981","2424":"c757e549b61768f3907f","2518":"57c229a14e22d23db384","2701":"3c34bd7d28cb2d095a5c","2974":"a90a9df917b90bc02c69","3054":"b7bb02c6cd9273c422f5","3409":"fdd66303b88b09df1755","3694":"957cf6f00e6c9f033f51","4019":"13e7f662a9e489b74a27","4113":"8aa17598a438e0f59977","4202":"1cef28d8aec1155d35d1","4759":"c3bfca952eea20a0d6f9","5261":"6e1a017f8f1027557f5b","5349":"44217fe4d4ce9a3a9be3","5457":"a34aefc642710f3c4bfe","5485":"6a30e022e40ee4efcf64","5674":"8c34228471ff9e53b8c3","5802":"48b958ebd8d250156814","6027":"13ce9445760aecded831","6201":"1449ec26ca43420a516a","6939":"41fbdef87597b5172ec6","6991":"80eea6ff61dba94b2879","7159":"122cd4e6d8fd1287d07f","7197":"20b8564f4a4af9191bef","7412":"42d0b84eb71e17deea44","7431":"f6ee76ae243ffe1c811a","7639":"6988d6e467128811633c","8094":"5c44190a325ac23e3e5c","8402":"edb924cd47cd168f621c","8558":"7b39c27e2bd32e4a18aa","8740":"39b40ee21a873e824ce8","8815":"9531838f1288ab88a108","9862":"1133b0f6bd2b035c85bd"}[chunkId] + ".js";
386137
386144
  /******/ };
386138
386145
  /******/ })();
386139
386146
  /******/
@@ -136,7 +136,7 @@
136
136
  /******/ // This function allow to reference async chunks and sibling chunks for the entrypoint
137
137
  /******/ __webpack_require__.u = (chunkId) => {
138
138
  /******/ // return url for filenames based on template
139
- /******/ return "" + (chunkId === 3694 ? "compute" : chunkId) + ".bundle." + {"573":"a00b1c9a43f933c220ec","2345":"839224623fb00f805981","3694":"f176731b761d630f358c","4019":"c5b332003e3cd00868ce","9819":"f9a684737e748002f1c2","9856":"8e21e8c0322a0837862b"}[chunkId] + ".js";
139
+ /******/ return "" + (chunkId === 3694 ? "compute" : chunkId) + ".bundle." + {"573":"a00b1c9a43f933c220ec","2345":"839224623fb00f805981","3694":"957cf6f00e6c9f033f51","4019":"13e7f662a9e489b74a27","9819":"cb36094b2dbfe6332e89","9856":"9a1396fddc3af67dcaf4"}[chunkId] + ".js";
140
140
  /******/ };
141
141
  /******/ })();
142
142
  /******/
package/dist/index.html CHANGED
@@ -3,4 +3,4 @@
3
3
  return import(moduleId);
4
4
  }
5
5
 
6
- window.PUBLIC_URL = '/';</script><script defer="defer" src="/app.bundle.7ea0ea630b0467e32f40.js"></script><link href="/app.bundle.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="react-portal"></div><div id="root"></div></body></html>
6
+ window.PUBLIC_URL = '/';</script><script defer="defer" src="/app.bundle.b5c364b2112dc6c8fef1.js"></script><link href="/app.bundle.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="react-portal"></div><div id="root"></div></body></html>
@@ -136,7 +136,7 @@
136
136
  /******/ // This function allow to reference async chunks and sibling chunks for the entrypoint
137
137
  /******/ __webpack_require__.u = (chunkId) => {
138
138
  /******/ // return url for filenames based on template
139
- /******/ return "" + (chunkId === 3694 ? "compute" : chunkId) + ".bundle." + {"319":"fc959064ddf2f6978b54","573":"a00b1c9a43f933c220ec","3694":"f176731b761d630f358c","4019":"c5b332003e3cd00868ce","7758":"c8d106364298e7d288f0","9819":"f9a684737e748002f1c2","9892":"83de6c11c8a9eb4bba25"}[chunkId] + ".js";
139
+ /******/ return "" + (chunkId === 3694 ? "compute" : chunkId) + ".bundle." + {"319":"fc959064ddf2f6978b54","573":"a00b1c9a43f933c220ec","3694":"957cf6f00e6c9f033f51","4019":"13e7f662a9e489b74a27","7758":"c8d106364298e7d288f0","9819":"cb36094b2dbfe6332e89","9892":"f00828c8f4763b097271"}[chunkId] + ".js";
140
140
  /******/ };
141
141
  /******/ })();
142
142
  /******/