@ohif/app 3.13.0-beta.119 → 3.13.0-beta.120

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 (39) hide show
  1. package/dist/{1483.bundle.e208a19dd0ff9a11.js → 1483.bundle.5e93c978bd32d7de.js} +1 -1
  2. package/dist/{2343.bundle.e50c08b2df863e1a.js → 2343.bundle.3445fda02a002697.js} +12 -8
  3. package/dist/{2036.bundle.1b6c0d890aa6bf4e.js → 2493.bundle.f3b6a64d158365da.js} +113 -35
  4. package/dist/{3215.bundle.1fca83719c1b786b.js → 3330.bundle.b1297ef8c94e5440.js} +796 -180
  5. package/dist/{2690.bundle.f5dc28ac498de122.js → 3568.bundle.45dc681ef6890166.js} +2112 -76
  6. package/dist/{6495.bundle.84b83aa091c338cd.js → 6495.bundle.a6764fdb8c0c252f.js} +846 -219
  7. package/dist/{8668.bundle.93c88419e37dc076.js → 8668.bundle.0e47f7231aa07da2.js} +227 -3
  8. package/dist/{9402.bundle.0dd1b538f0708077.js → 9402.bundle.928437e2e48c12dd.js} +2 -2
  9. package/dist/{9560.bundle.bb39f946ea79cf0e.js → 9560.bundle.517f0ef7ee3a20bf.js} +159 -196
  10. package/dist/{app.bundle.bdeb02edea129b2c.js → app.bundle.81a823d1149be346.js} +99 -25
  11. package/dist/{compute.bundle.77e80c1775429bd6.js → compute.bundle.9cc3697d07fbb082.js} +3 -3
  12. package/dist/index.html +1 -1
  13. package/dist/{polySeg.bundle.5e350e0723aa59b6.js → polySeg.bundle.a526954fc2fed311.js} +3 -3
  14. package/dist/sw.js +1 -1
  15. package/package.json +6 -6
  16. /package/dist/{100.bundle.bd6735a86c215595.js → 100.bundle.84a35e9d087b403c.js} +0 -0
  17. /package/dist/{1180.bundle.4c5146471b4d3497.js → 1180.bundle.7f790d9fd6fb031c.js} +0 -0
  18. /package/dist/{1602.bundle.163e3da3a27b860c.js → 1602.bundle.254a392a6b5d2b85.js} +0 -0
  19. /package/dist/{2779.bundle.664d9d0a704f7b94.js → 2779.bundle.c879d6af5dc0c274.js} +0 -0
  20. /package/dist/{3500.bundle.18412afd9ee5d6a7.js → 3500.bundle.d4aaab15c4461cc4.js} +0 -0
  21. /package/dist/{3760.bundle.f69046888fc2b881.js → 3760.bundle.c95abd6ab662bd3b.js} +0 -0
  22. /package/dist/{4556.bundle.128d2abaea69dce3.js → 4556.bundle.c3ac23e680d677b2.js} +0 -0
  23. /package/dist/{4683.bundle.b02523a9d66f4d19.js → 4683.bundle.ed3f14fcb89fbad1.js} +0 -0
  24. /package/dist/{5189.bundle.2a0f740738759e32.js → 5189.bundle.ea191ea99047fd6f.js} +0 -0
  25. /package/dist/{5642.bundle.1622d255af1102d8.js → 5642.bundle.98e17a4413db6ef1.js} +0 -0
  26. /package/dist/{5696.bundle.2f47cb5ab5a7f983.js → 5696.bundle.e77041f7e2b08236.js} +0 -0
  27. /package/dist/{6749.bundle.9f0550714a4d5f8b.js → 6749.bundle.9dcda33e49485da4.js} +0 -0
  28. /package/dist/{7231.bundle.46f843b74a964f89.js → 7231.bundle.1063d727ad99108a.js} +0 -0
  29. /package/dist/{7248.bundle.bffd4e60f806e25d.js → 7248.bundle.ab6f276adad059da.js} +0 -0
  30. /package/dist/{7499.bundle.bb240e8754167cb2.js → 7499.bundle.832916b9b820c33f.js} +0 -0
  31. /package/dist/{781.bundle.f7411dabe0628911.js → 781.bundle.f06b6ab92ef4d695.js} +0 -0
  32. /package/dist/{8423.bundle.071901427fd3cd9e.js → 8423.bundle.ebf8d7d638d9616b.js} +0 -0
  33. /package/dist/{8492.bundle.9c17dcbab24b07c3.js → 8492.bundle.1ceeb18471c1c06b.js} +0 -0
  34. /package/dist/{8832.bundle.e413f00216682f40.js → 8832.bundle.1eb46bfa451c792f.js} +0 -0
  35. /package/dist/{9116.bundle.1cb5c393e3a152cd.js → 9116.bundle.1d0c6c18a4db51cc.js} +0 -0
  36. /package/dist/{9290.bundle.77a274271ce884a3.js → 9290.bundle.82e8dfc0f73c41bb.js} +0 -0
  37. /package/dist/{9383.bundle.9b1d03c71cc52f4f.js → 9383.bundle.ec44c452ccc23e93.js} +0 -0
  38. /package/dist/{9415.bundle.d3532cc872787744.js → 9415.bundle.69d74a2b03d5d6e4.js} +0 -0
  39. /package/dist/{9437.bundle.a18085ed31658c82.js → 9437.bundle.ca5db89624e35827.js} +0 -0
@@ -77,7 +77,7 @@ function createTools({
77
77
  }, {
78
78
  toolName: toolNames.MarkerLabelmap
79
79
  }, {
80
- toolName: toolNames.RegionSegmentPlus
80
+ toolName: toolNames.ClickSegment
81
81
  }, {
82
82
  toolName: 'CircularEraser',
83
83
  parentTool: 'Brush',
@@ -2166,7 +2166,7 @@ function initCornerstoneTools(configuration = {}) {
2166
2166
  (0,dist_esm.addTool)(dist_esm.SegmentLabelTool);
2167
2167
  (0,dist_esm.addTool)(ai_dist_esm/* .LabelmapSlicePropagationTool */.Bj);
2168
2168
  (0,dist_esm.addTool)(ai_dist_esm/* .MarkerLabelmapTool */.pY);
2169
- (0,dist_esm.addTool)(dist_esm.RegionSegmentPlusTool);
2169
+ (0,dist_esm.addTool)(dist_esm.ClickSegmentTool);
2170
2170
  (0,dist_esm.addTool)(dist_esm.LivewireContourSegmentationTool);
2171
2171
  (0,dist_esm.addTool)(dist_esm.SculptorTool);
2172
2172
  (0,dist_esm.addTool)(dist_esm.SplineContourSegmentationTool);
@@ -2228,7 +2228,7 @@ const initCornerstoneTools_toolNames = {
2228
2228
  SegmentLabel: dist_esm.SegmentLabelTool.toolName,
2229
2229
  LabelmapSlicePropagation: ai_dist_esm/* .LabelmapSlicePropagationTool.toolName */.Bj.toolName,
2230
2230
  MarkerLabelmap: ai_dist_esm/* .MarkerLabelmapTool.toolName */.pY.toolName,
2231
- RegionSegmentPlus: dist_esm.RegionSegmentPlusTool.toolName,
2231
+ ClickSegment: dist_esm.ClickSegmentTool.toolName,
2232
2232
  LivewireContourSegmentation: dist_esm.LivewireContourSegmentationTool.toolName,
2233
2233
  SculptorTool: dist_esm.SculptorTool.toolName,
2234
2234
  SplineContourSegmentation: dist_esm.SplineContourSegmentationTool.toolName,
@@ -9321,15 +9321,19 @@ const segmentationToolbarButtons = [
9321
9321
  }, 'runSegmentBidirectional']
9322
9322
  }
9323
9323
  }, {
9324
- id: 'RegionSegmentPlus',
9324
+ id: 'ClickSegment',
9325
9325
  uiType: 'ohif.toolBoxButton',
9326
9326
  props: {
9327
9327
  icon: 'icon-tool-click-segment',
9328
- label: i18next/* ["default"].t */.A.t('Buttons:One Click Segment'),
9329
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Detects segmentable regions with one click. Hover for visual feedback—click when a plus sign appears to auto-segment the lesion.'),
9328
+ label: i18next/* ["default"].t */.A.t('Buttons:Click to Segment'),
9329
+ tooltip: i18next/* ["default"].t */.A.t('Buttons:PET only. Click-to-segment lesions with no configuration. Hover for visual feedback—click when a plus sign appears to segment the lesion.'),
9330
9330
  evaluate: [{
9331
+ name: 'evaluate.modality.supported',
9332
+ supportedModalities: ['PT'],
9333
+ disabledText: i18next/* ["default"].t */.A.t('Buttons:Tool not available for this modality')
9334
+ }, {
9331
9335
  name: 'evaluate.cornerstone.segmentation',
9332
- toolNames: ['RegionSegmentPlus'],
9336
+ toolNames: ['ClickSegment'],
9333
9337
  disabledText: i18next/* ["default"].t */.A.t('Buttons:Create new segmentation to enable this tool.')
9334
9338
  }, {
9335
9339
  name: 'evaluate.cornerstone.hasSegmentationOfType',
@@ -9702,7 +9706,7 @@ const segmentationToolboxSections = {
9702
9706
  [segmentationToolbarCustomization_TOOLBAR_SECTIONS.contourSegmentationToolbox]: ['ContourTools'],
9703
9707
  [segmentationToolbarCustomization_TOOLBAR_SECTIONS.labelMapSegmentationUtilities]: ['LabelMapUtilities'],
9704
9708
  [segmentationToolbarCustomization_TOOLBAR_SECTIONS.contourSegmentationUtilities]: ['ContourUtilities'],
9705
- LabelMapTools: ['LabelmapSlicePropagation', 'BrushTools', 'MarkerLabelmap', 'RegionSegmentPlus', 'Shapes', 'LabelMapEditWithContour'],
9709
+ LabelMapTools: ['LabelmapSlicePropagation', 'BrushTools', 'MarkerLabelmap', 'ClickSegment', 'Shapes', 'LabelMapEditWithContour'],
9706
9710
  ContourTools: ['PlanarFreehandContourSegmentationTool', 'SculptorTool', 'SplineContourSegmentationTool', 'LivewireContourSegmentationTool'],
9707
9711
  LabelMapUtilities: ['InterpolateLabelmap', 'SegmentBidirectional'],
9708
9712
  ContourUtilities: ['LogicalContourOperations', 'SimplifyContours', 'SmoothContours'],
@@ -9879,7 +9883,7 @@ function getToolGroupToolsCustomization({
9879
9883
  }, {
9880
9884
  toolName: initCornerstoneTools_toolNames.MarkerLabelmap
9881
9885
  }, {
9882
- toolName: initCornerstoneTools_toolNames.RegionSegmentPlus
9886
+ toolName: initCornerstoneTools_toolNames.ClickSegment
9883
9887
  }, {
9884
9888
  toolName: initCornerstoneTools_toolNames.LabelMapEditWithContourTool
9885
9889
  }, {
@@ -1,4 +1,4 @@
1
- (globalThis["rspackChunk"] = globalThis["rspackChunk"] || []).push([[2036], {
1
+ (globalThis["rspackChunk"] = globalThis["rspackChunk"] || []).push([[2493], {
2
2
  5842(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
3
3
  "use strict";
4
4
  __webpack_require__.d(__webpack_exports__, {
@@ -79848,28 +79848,6 @@ function loadImageToCanvas(options) {
79848
79848
  }
79849
79849
 
79850
79850
 
79851
- },
79852
- 80977(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
79853
- "use strict";
79854
- __webpack_require__.r(__webpack_exports__);
79855
- __webpack_require__.d(__webpack_exports__, {
79856
- aiLog: () => (aiLog),
79857
- coreLog: () => (coreLog),
79858
- cs3dLog: () => (cs3dLog),
79859
- dicomConsistencyLog: () => (dicomConsistencyLog),
79860
- examplesLog: () => (examplesLog),
79861
- getLogger: () => (getLogger),
79862
- getRootLogger: () => (getRootLogger),
79863
- imageConsistencyLog: () => (imageConsistencyLog),
79864
- loaderLog: () => (loaderLog),
79865
- toolsLog: () => (toolsLog),
79866
- workerLog: () => (workerLog)
79867
- });
79868
- /* import */ var _cornerstonejs_utils__rspack_import_0 = __webpack_require__(53103);
79869
-
79870
- const { /* getRootLogger */pp: getRootLogger, /* getLogger */tZ: getLogger, /* cs3dLog */gE: cs3dLog, /* workerLog */bM: workerLog, /* coreLog */uu: coreLog, /* toolsLog */UA: toolsLog, /* loaderLog */_E: loaderLog, /* aiLog */RZ: aiLog, /* examplesLog */UX: examplesLog, /* dicomConsistencyLog */HL: dicomConsistencyLog, /* imageConsistencyLog */U5: imageConsistencyLog, } = _cornerstonejs_utils__rspack_import_0/* .logging */.m9;
79871
-
79872
-
79873
79851
  },
79874
79852
  52014(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
79875
79853
  "use strict";
@@ -81222,6 +81200,72 @@ function viewportIsInStackMode(viewport) {
81222
81200
  }
81223
81201
 
81224
81202
 
81203
+ },
81204
+ 28656(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
81205
+ "use strict";
81206
+ __webpack_require__.d(__webpack_exports__, {
81207
+ fT: () => (mapScalarToViewportVoiIntensity),
81208
+ j_: () => (mapMappedBandToRawRange),
81209
+ l2: () => (mapViewportVoiIntensityToScalar)
81210
+ });
81211
+ /* import */ var _enums_VOILUTFunctionType_js__rspack_import_0 = __webpack_require__(78072);
81212
+ /* import */ var _logit_js__rspack_import_1 = __webpack_require__(52014);
81213
+ /* import */ var _windowLevel_js__rspack_import_2 = __webpack_require__(37579);
81214
+
81215
+
81216
+
81217
+ const Y_EPS = 1e-6;
81218
+ function mapScalarToViewportVoiIntensity(value, props) {
81219
+ const { lower, upper } = props.voiRange;
81220
+ const span = upper - lower;
81221
+ const fn = props.VOILUTFunction;
81222
+ const applyInvert = (y) => (props.invert === true ? 1 - y : y);
81223
+ if (fn === _enums_VOILUTFunctionType_js__rspack_import_0/* ["default"].SAMPLED_SIGMOID */.A.SAMPLED_SIGMOID || fn === 'SIGMOID') {
81224
+ const { windowCenter, windowWidth } = _windowLevel_js__rspack_import_2.toWindowLevel(lower, upper);
81225
+ const w = Math.max(Math.abs(windowWidth), 1e-12);
81226
+ return applyInvert(1 / (1 + Math.exp((-4 * (value - windowCenter)) / w)));
81227
+ }
81228
+ if (span === 0 || !Number.isFinite(span)) {
81229
+ return applyInvert(0);
81230
+ }
81231
+ return applyInvert(clamp01((value - lower) / span));
81232
+ }
81233
+ function mapViewportVoiIntensityToScalar(mapped01, props) {
81234
+ const { lower, upper } = props.voiRange;
81235
+ const fn = props.VOILUTFunction;
81236
+ const y = props.invert === true ? clamp01(1 - clamp01(mapped01)) : clamp01(mapped01);
81237
+ if (fn === _enums_VOILUTFunctionType_js__rspack_import_0/* ["default"].SAMPLED_SIGMOID */.A.SAMPLED_SIGMOID || fn === 'SIGMOID') {
81238
+ const { windowCenter, windowWidth } = _windowLevel_js__rspack_import_2.toWindowLevel(lower, upper);
81239
+ const yy = clamp(y, Y_EPS, 1 - Y_EPS);
81240
+ return (0,_logit_js__rspack_import_1/* .logit */.i)(yy, windowCenter, windowWidth);
81241
+ }
81242
+ const span = upper - lower;
81243
+ if (span === 0 || !Number.isFinite(span)) {
81244
+ return lower;
81245
+ }
81246
+ return lower + y * span;
81247
+ }
81248
+ function mapMappedBandToRawRange(mappedMin, mappedMax, props) {
81249
+ const a = Math.min(mappedMin, mappedMax);
81250
+ const b = Math.max(mappedMin, mappedMax);
81251
+ const rawAtA = mapViewportVoiIntensityToScalar(a, props);
81252
+ const rawAtB = mapViewportVoiIntensityToScalar(b, props);
81253
+ return {
81254
+ rawMin: Math.min(rawAtA, rawAtB),
81255
+ rawMax: Math.max(rawAtA, rawAtB),
81256
+ };
81257
+ }
81258
+ function clamp01(x) {
81259
+ if (!Number.isFinite(x)) {
81260
+ return 0;
81261
+ }
81262
+ return clamp(x, 0, 1);
81263
+ }
81264
+ function clamp(x, lo, hi) {
81265
+ return Math.min(hi, Math.max(lo, x));
81266
+ }
81267
+
81268
+
81225
81269
  },
81226
81270
  37579(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
81227
81271
  "use strict";
@@ -81298,7 +81342,7 @@ function worldToImageCoords(imageId, worldCoords) {
81298
81342
  },
81299
81343
  22202() {
81300
81344
  "use strict";
81301
- const version = '5.4.12';
81345
+ const version = '5.4.13';
81302
81346
 
81303
81347
 
81304
81348
  },
@@ -82071,7 +82115,7 @@ const TransferSyntaxes = {
82071
82115
 
82072
82116
 
82073
82117
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/metadata/dist/esm/version.js
82074
- const version = '5.4.12';
82118
+ const version = '5.4.13';
82075
82119
 
82076
82120
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/metadata/dist/esm/metaData.js
82077
82121
 
@@ -95643,7 +95687,8 @@ function createBidirectionalToolData(bidirectionalData, viewport) {
95643
95687
  1732(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
95644
95688
  "use strict";
95645
95689
  __webpack_require__.d(__webpack_exports__, {
95646
- createLabelmapMemo: () => (createLabelmapMemo)
95690
+ createLabelmapMemo: () => (createLabelmapMemo),
95691
+ memoAsStep: () => (memoAsStep)
95647
95692
  });
95648
95693
  /* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(88479);
95649
95694
  /* import */ var _stateManagement_segmentation_triggerSegmentationEvents_js__rspack_import_1 = __webpack_require__(49256);
@@ -95653,14 +95698,46 @@ const { VoxelManager, RLEVoxelMap } = _cornerstonejs_core__rspack_import_0.utili
95653
95698
  function createLabelmapMemo(segmentationId, segmentationVoxelManager) {
95654
95699
  return createRleMemo(segmentationId, segmentationVoxelManager);
95655
95700
  }
95701
+ function memoAsStep(memo) {
95702
+ return {
95703
+ undo: () => memo.restoreMemo(true),
95704
+ redo: () => memo.restoreMemo(false),
95705
+ };
95706
+ }
95656
95707
  function restoreMemo(isUndo) {
95657
- const { segmentationVoxelManager, undoVoxelManager, redoVoxelManager } = this;
95658
- const useVoxelManager = isUndo === false ? redoVoxelManager : undoVoxelManager;
95659
- useVoxelManager.forEach(({ value, pointIJK }) => {
95660
- segmentationVoxelManager.setAtIJKPoint(pointIJK, value);
95661
- });
95662
- const slices = useVoxelManager.getArrayOfModifiedSlices();
95663
- (0,_stateManagement_segmentation_triggerSegmentationEvents_js__rspack_import_1.triggerSegmentationDataModified)(this.segmentationId, slices);
95708
+ const undo = isUndo !== false;
95709
+ const priorSteps = this.priorSteps ?? [];
95710
+ const postSteps = this.postSteps ?? [];
95711
+ const restoreVoxelChanges = () => {
95712
+ const { segmentationVoxelManager, undoVoxelManager, redoVoxelManager } = this;
95713
+ const useVoxelManager = undo ? undoVoxelManager : redoVoxelManager;
95714
+ if (!useVoxelManager) {
95715
+ return;
95716
+ }
95717
+ useVoxelManager.forEach(({ value, pointIJK }) => {
95718
+ segmentationVoxelManager.setAtIJKPoint(pointIJK, value);
95719
+ });
95720
+ const slices = useVoxelManager.getArrayOfModifiedSlices();
95721
+ (0,_stateManagement_segmentation_triggerSegmentationEvents_js__rspack_import_1.triggerSegmentationDataModified)(this.segmentationId, slices);
95722
+ };
95723
+ if (undo) {
95724
+ for (let i = postSteps.length - 1; i >= 0; i--) {
95725
+ postSteps[i].undo();
95726
+ }
95727
+ restoreVoxelChanges();
95728
+ for (let i = priorSteps.length - 1; i >= 0; i--) {
95729
+ priorSteps[i].undo();
95730
+ }
95731
+ }
95732
+ else {
95733
+ for (const step of priorSteps) {
95734
+ step.redo();
95735
+ }
95736
+ restoreVoxelChanges();
95737
+ for (const step of postSteps) {
95738
+ step.redo();
95739
+ }
95740
+ }
95664
95741
  }
95665
95742
  function createRleMemo(segmentationId, segmentationVoxelManager) {
95666
95743
  const voxelManager = VoxelManager.createRLEHistoryVoxelManager(segmentationVoxelManager);
@@ -95679,8 +95756,9 @@ function commitMemo() {
95679
95756
  if (this.redoVoxelManager) {
95680
95757
  return true;
95681
95758
  }
95759
+ const hasSteps = !!(this.priorSteps?.length || this.postSteps?.length);
95682
95760
  if (!this.voxelManager.modifiedSlices.size) {
95683
- return false;
95761
+ return hasSteps;
95684
95762
  }
95685
95763
  const { segmentationVoxelManager } = this;
95686
95764
  const undoVoxelManager = VoxelManager.createRLEHistoryVoxelManager(segmentationVoxelManager);
@@ -96360,7 +96438,7 @@ __webpack_require__.d(logging_namespaceObject, {
96360
96438
 
96361
96439
 
96362
96440
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/utils/dist/esm/version.js
96363
- const version = '5.4.12';
96441
+ const version = '5.4.13';
96364
96442
 
96365
96443
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/utils/dist/esm/utilities/object/asArray.js
96366
96444
  function asArray(item) {