@ohif/app 3.14.0-beta.55 → 3.14.0-beta.56

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 (37) hide show
  1. package/dist/{9187.bundle.47a04a89.js → 1283.bundle.56abacf4.js} +162 -137
  2. package/dist/{4262.bundle.0c550b7f.js → 1558.bundle.03d5783b.js} +36 -11
  3. package/dist/{1566.bundle.8d90bb15.js → 1566.bundle.e9f5d851.js} +5 -1
  4. package/dist/{1645.bundle.65cff869.js → 1645.bundle.618a2886.js} +700 -389
  5. package/dist/{1724.bundle.b4757283.js → 1724.bundle.59b20c59.js} +1184 -1139
  6. package/dist/{1788.bundle.5b78672d.js → 1788.bundle.3f1349d2.js} +101 -43
  7. package/dist/1975.bundle.53cf5d7c.js +8216 -0
  8. package/dist/{5922.bundle.46b3e037.js → 2894.bundle.db3f8686.js} +240 -151
  9. package/dist/{6567.bundle.cc57e572.js → 3044.bundle.039294b9.js} +105 -76
  10. package/dist/{3386.bundle.7665dd43.js → 3386.bundle.a9fd7dfd.js} +92 -23
  11. package/dist/{4004.bundle.da822fd2.js → 4018.bundle.48c288e5.js} +128 -253
  12. package/dist/{2894.bundle.d612efb2.js → 513.bundle.9c0548cf.js} +1 -1
  13. package/dist/{5143.bundle.62bcf4ee.js → 5143.bundle.67167d39.js} +219 -147
  14. package/dist/{5895.bundle.b4892e1b.js → 5320.bundle.0c7b2cb7.js} +1473 -617
  15. package/dist/{5383.bundle.d393d2f5.js → 5383.bundle.79243338.js} +26 -4
  16. package/dist/{4324.bundle.8645d6b4.js → 5888.bundle.cd717f42.js} +1364 -8004
  17. package/dist/{8128.bundle.2afe5a05.js → 5914.bundle.00f408d2.js} +419 -49
  18. package/dist/{1284.bundle.a489bd1d.js → 5989.bundle.f8096a4e.js} +1175 -616
  19. package/dist/{6255.bundle.ee378f1c.js → 6255.bundle.521051c1.js} +42 -18
  20. package/dist/{829.bundle.e60fee3a.js → 641.bundle.4627a8e1.js} +472 -483
  21. package/dist/{1568.bundle.474a5a93.js → 9187.bundle.237037e4.js} +1 -1
  22. package/dist/{6711.bundle.baba2ccd.js → 9232.bundle.3b0caf8e.js} +10 -10
  23. package/dist/{1895.bundle.923d0bd4.js → 9620.bundle.67375c83.js} +82 -24
  24. package/dist/{app.bundle.3a861c86.js → app.bundle.5a277c45.js} +44 -44
  25. package/dist/{compute.bundle.caab94e6.js → compute.bundle.a8f26c49.js} +10 -10
  26. package/dist/index.html +1 -1
  27. package/dist/{interpolation.bundle.eed65b60.js → interpolation.bundle.aef2f614.js} +5 -5
  28. package/dist/{polySeg.bundle.34a58c4f.js → polySeg.bundle.ba052ac3.js} +11 -11
  29. package/dist/static/wasm/{27ff970b98.module.wasm → 0e14aeab30.module.wasm} +0 -0
  30. package/dist/static/wasm/58a146bc8c.module.wasm +0 -0
  31. package/dist/static/wasm/99a2672e64.module.wasm +0 -0
  32. package/dist/static/wasm/{11f8dc2413.module.wasm → d8b213f3ea.module.wasm} +0 -0
  33. package/dist/sw.js +1 -1
  34. package/package.json +6 -6
  35. package/dist/0.bundle.485115b4.js +0 -4498
  36. package/dist/static/wasm/58769f1d7d.module.wasm +0 -0
  37. /package/dist/{1895.bundle.css → 9620.bundle.css} +0 -0
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- (globalThis["rspackChunk_ohif_app"] ||= []).push([[4004], {
2
+ (globalThis["rspackChunk_ohif_app"] ||= []).push([[4018], {
3
3
  45878(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
4
4
  __webpack_require__.r(__webpack_exports__);
5
5
  /* import */ var _common_js__rspack_import_0 = __webpack_require__(23172);
@@ -970,7 +970,7 @@ function isVolumeCompatible(viewport) {
970
970
 
971
971
  },
972
972
  85387(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
973
- /* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(34047);
973
+ /* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(76368);
974
974
 
975
975
  const CalibrationTypes = _cornerstonejs_metadata__rspack_import_0/* .Enums.CalibrationTypes */.fX.ov;
976
976
  /* export default */ __webpack_exports__.A = (_cornerstonejs_metadata__rspack_import_0/* .Enums.CalibrationTypes */.fX.ov);
@@ -1183,6 +1183,7 @@ const defaultConfig = {
1183
1183
  preferSizeOverAccuracy: false,
1184
1184
  useLegacyCameraFOV: false,
1185
1185
  strictZSpacingForVolumeViewport: true,
1186
+ sliceStepMeasure: 'l2',
1186
1187
  renderingEngineMode: enums.RenderingEngineModeEnum.ContextPool,
1187
1188
  webGlContextCount: 7,
1188
1189
  planar: {
@@ -3132,6 +3133,17 @@ var ChangeTypes;
3132
3133
  /* export default */ __webpack_exports__.A = (ChangeTypes);
3133
3134
 
3134
3135
 
3136
+ },
3137
+ 52602(__unused_rspack___webpack_module__, __webpack_exports__) {
3138
+ var SegmentationRepresentations;
3139
+ (function (SegmentationRepresentations) {
3140
+ SegmentationRepresentations["Labelmap"] = "Labelmap";
3141
+ SegmentationRepresentations["Contour"] = "Contour";
3142
+ SegmentationRepresentations["Surface"] = "Surface";
3143
+ })(SegmentationRepresentations || (SegmentationRepresentations = {}));
3144
+ /* export default */ __webpack_exports__.A = (SegmentationRepresentations);
3145
+
3146
+
3135
3147
  },
3136
3148
  48413(__unused_rspack___webpack_module__, __webpack_exports__) {
3137
3149
  var StrategyCallbacks;
@@ -4548,7 +4560,11 @@ class SegmentationStateManager {
4548
4560
  delete state.viewportSegRepresentations[viewportId];
4549
4561
  }
4550
4562
  else if (activeRepresentationRemoved) {
4551
- state.viewportSegRepresentations[viewportId][0].active = true;
4563
+ const remainingRepresentations = state.viewportSegRepresentations[viewportId];
4564
+ const hasActiveRepresentation = remainingRepresentations.some((representation) => representation.active);
4565
+ if (!hasActiveRepresentation) {
4566
+ remainingRepresentations[0].active = true;
4567
+ }
4552
4568
  }
4553
4569
  }
4554
4570
  });
@@ -4559,10 +4575,9 @@ class SegmentationStateManager {
4559
4575
  removedRepresentations.forEach((representation) => {
4560
4576
  (0,_triggerSegmentationEvents_js__rspack_import_5.triggerSegmentationRepresentationRemoved)(viewportId, representation.segmentationId, representation.type);
4561
4577
  });
4562
- const remainingRepresentations = this.getSegmentationRepresentations(viewportId);
4563
- if (remainingRepresentations.length > 0 &&
4564
- remainingRepresentations[0].active) {
4565
- (0,_triggerSegmentationEvents_js__rspack_import_5.triggerSegmentationRepresentationModified)(viewportId, remainingRepresentations[0].segmentationId, remainingRepresentations[0].type);
4578
+ const activeRepresentation = this.getSegmentationRepresentations(viewportId).find((representation) => representation.active);
4579
+ if (activeRepresentation) {
4580
+ (0,_triggerSegmentationEvents_js__rspack_import_5.triggerSegmentationRepresentationModified)(viewportId, activeRepresentation.segmentationId, activeRepresentation.type);
4566
4581
  }
4567
4582
  return removedRepresentations;
4568
4583
  }
@@ -4878,6 +4893,33 @@ __webpack_require__.d(__webpack_exports__, {
4878
4893
  });
4879
4894
 
4880
4895
 
4896
+ },
4897
+ 47290(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
4898
+ /* import */ var _SegmentationStateManager_js__rspack_import_0 = __webpack_require__(91155);
4899
+
4900
+ function getSegmentationRepresentations(viewportId, specifier = {}) {
4901
+ const segmentationStateManager = _SegmentationStateManager_js__rspack_import_0/* .defaultSegmentationStateManager */._6;
4902
+ return segmentationStateManager.getSegmentationRepresentations(viewportId, specifier);
4903
+ }
4904
+ function getSegmentationRepresentation(viewportId, specifier) {
4905
+ const segmentationStateManager = _SegmentationStateManager_js__rspack_import_0/* .defaultSegmentationStateManager */._6;
4906
+ if (!specifier.segmentationId || !specifier.type) {
4907
+ throw new Error('getSegmentationRepresentation: No segmentationId or type provided, you need to provide at least one of them');
4908
+ }
4909
+ const representations = segmentationStateManager.getSegmentationRepresentations(viewportId, specifier);
4910
+ return representations?.[0];
4911
+ }
4912
+ function getSegmentationRepresentationsBySegmentationId(segmentationId) {
4913
+ const segmentationStateManager = defaultSegmentationStateManager;
4914
+ return segmentationStateManager.getSegmentationRepresentationsBySegmentationId(segmentationId);
4915
+ }
4916
+
4917
+ __webpack_require__.d(__webpack_exports__, {
4918
+ Ut: () => (getSegmentationRepresentation),
4919
+ r$: () => (getSegmentationRepresentations)
4920
+ });
4921
+
4922
+
4881
4923
  },
4882
4924
  39046(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
4883
4925
  /* import */ var _SegmentationStateManager_js__rspack_import_0 = __webpack_require__(91155);
@@ -5053,6 +5095,11 @@ function getSegmentIndexForLabelValue(segmentation, labelmapId, labelValue) {
5053
5095
  }
5054
5096
  return layer.labelToSegmentIndex?.[labelValue] ?? labelValue;
5055
5097
  }
5098
+ function getLabelToSegmentIndex(segmentation, labelmapId) {
5099
+ return {
5100
+ ...(getLabelmap(segmentation, labelmapId)?.labelToSegmentIndex ?? {}),
5101
+ };
5102
+ }
5056
5103
  function getLabelValueForSegment(segmentation, segmentIndex) {
5057
5104
  return (getSegmentBinding(segmentation, segmentIndex)?.labelValue ?? segmentIndex);
5058
5105
  }
@@ -5137,164 +5184,15 @@ function removeAllSegmentations() {
5137
5184
 
5138
5185
 
5139
5186
  },
5140
- 16489(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
5141
- /* import */ var _enums_SegmentationRepresentations_js__rspack_import_0 = __webpack_require__(52602);
5142
- /* import */ var _getSegmentationRepresentation_js__rspack_import_1 = __webpack_require__(47290);
5143
- /* import */ var _cornerstonejs_core__rspack_import_2 = __webpack_require__(62721);
5144
- /* import */ var _SegmentationStateManager_js__rspack_import_3 = __webpack_require__(91155);
5145
- /* import */ var _segmentationEventManager_js__rspack_import_4 = __webpack_require__(65604);
5146
- /* import */ var _SegmentationRepresentationDisplayRegistry_js__rspack_import_5 = __webpack_require__(55377);
5147
-
5148
-
5149
-
5150
-
5151
-
5152
-
5153
-
5154
- const cs3dLogger = _cornerstonejs_core__rspack_import_2.utilities.logger.toolsLog.getLogger('stateManagement.segmentation.removeSegmentationRepresentations');
5155
- function removeSegmentationRepresentation(viewportId, specifier, immediate) {
5156
- return _removeSegmentationRepresentations(viewportId, specifier, immediate);
5157
- }
5158
- function removeSegmentationRepresentations(viewportId, specifier, immediate) {
5159
- return _removeSegmentationRepresentations(viewportId, specifier, immediate);
5160
- }
5161
- function _removeSegmentationRepresentations(viewportId, specifier, immediate) {
5162
- const { segmentationId, type } = specifier;
5163
- _removeRepresentationObject(viewportId, segmentationId, type, immediate);
5164
- return defaultSegmentationStateManager.removeSegmentationRepresentations(viewportId, {
5165
- segmentationId,
5166
- type,
5167
- });
5168
- }
5169
- function removeAllSegmentationRepresentations() {
5170
- const state = defaultSegmentationStateManager.getAllViewportSegmentationRepresentations();
5171
- state.forEach(({ viewportId, representations }) => {
5172
- representations.forEach(({ segmentationId, type }) => {
5173
- removeSegmentationRepresentation(viewportId, {
5174
- segmentationId,
5175
- type,
5176
- });
5177
- });
5178
- });
5179
- defaultSegmentationStateManager.resetState();
5180
- }
5181
- function removeLabelmapRepresentation(viewportId, segmentationId, immediate) {
5182
- removeSegmentationRepresentation(viewportId, {
5183
- segmentationId,
5184
- type: SegmentationRepresentations.Labelmap,
5185
- }, immediate);
5186
- }
5187
- function removeContourRepresentation(viewportId, segmentationId, immediate) {
5188
- removeSegmentationRepresentation(viewportId, {
5189
- segmentationId,
5190
- type: SegmentationRepresentations.Contour,
5191
- }, immediate);
5192
- }
5193
- function removeSurfaceRepresentation(viewportId, segmentationId, immediate) {
5194
- removeSegmentationRepresentation(viewportId, {
5195
- segmentationId,
5196
- type: SegmentationRepresentations.Surface,
5197
- }, immediate);
5198
- }
5199
- function _removeRepresentationObject(viewportId, segmentationId, type, immediate) {
5200
- const representations = getSegmentationRepresentations(viewportId, {
5201
- segmentationId,
5202
- type,
5203
- });
5204
- representations.forEach((representation) => {
5205
- const display = getSegmentationRepresentationDisplay(representation.type);
5206
- if (display) {
5207
- display.removeRepresentation(viewportId, representation.segmentationId, immediate);
5208
- }
5209
- else {
5210
- cs3dLogger.warn(`No display registered for segmentation representation type ${representation.type}.`);
5211
- }
5212
- removeSegmentationListener(representation.segmentationId, representation.type);
5213
- });
5214
- const { viewport } = getEnabledElementByViewportId(viewportId) || {};
5215
- if (viewport) {
5216
- viewport.render();
5217
- }
5218
- }
5219
-
5220
-
5221
-
5222
- },
5223
- 65604(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
5224
- /* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
5225
- /* import */ var _enums_index_js__rspack_import_1 = __webpack_require__(36776);
5226
- /* import */ var _triggerSegmentationEvents_js__rspack_import_2 = __webpack_require__(11815);
5227
- /* import */ var _utilities_debounce_js__rspack_import_3 = __webpack_require__(20361);
5228
- /* import */ var _getSegmentation_js__rspack_import_4 = __webpack_require__(50115);
5229
- /* import */ var _SegmentationRepresentationDisplayRegistry_js__rspack_import_5 = __webpack_require__(55377);
5230
-
5231
-
5232
-
5233
-
5234
-
5187
+ 54766(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
5188
+ /* import */ var _SegmentationStateManager_js__rspack_import_0 = __webpack_require__(91155);
5235
5189
 
5236
- const segmentationListeners = new Map();
5237
- function addDefaultSegmentationListener(viewport, segmentationId, representationType) {
5238
- const updateFunction = (0,_SegmentationRepresentationDisplayRegistry_js__rspack_import_5/* .getSegmentationRepresentationDisplay */.I)(representationType)?.getUpdateFunction(viewport);
5239
- if (updateFunction) {
5240
- addSegmentationListener(segmentationId, representationType, updateFunction);
5241
- }
5242
- }
5243
- function addSegmentationListener(segmentationId, representationType, updateFunction) {
5244
- if (!segmentationListeners.has(segmentationId)) {
5245
- segmentationListeners.set(segmentationId, new Map());
5246
- }
5247
- const listenerMap = segmentationListeners.get(segmentationId);
5248
- if (listenerMap.has(representationType)) {
5249
- removeSegmentationListener(segmentationId, representationType);
5250
- }
5251
- const listener = createDebouncedSegmentationListener(segmentationId, representationType, updateFunction);
5252
- _cornerstonejs_core__rspack_import_0.eventTarget.addEventListener(_enums_index_js__rspack_import_1.Events.SEGMENTATION_DATA_MODIFIED, listener);
5253
- listenerMap.set(representationType, listener);
5254
- }
5255
- function removeSegmentationListener(segmentationId, representationType) {
5256
- const listenerMap = segmentationListeners.get(segmentationId);
5257
- if (!listenerMap) {
5258
- return;
5259
- }
5260
- const listener = listenerMap.get(representationType);
5261
- if (!listener) {
5262
- return;
5263
- }
5264
- _cornerstonejs_core__rspack_import_0.eventTarget.removeEventListener(_enums_index_js__rspack_import_1.Events.SEGMENTATION_DATA_MODIFIED, listener);
5265
- listenerMap.delete(representationType);
5266
- }
5267
- function removeAllSegmentationListeners(segmentationId) {
5268
- const listenerMap = segmentationListeners.get(segmentationId);
5269
- if (!listenerMap) {
5270
- return;
5271
- }
5272
- for (const listener of listenerMap.values()) {
5273
- eventTarget.removeEventListener(Events.SEGMENTATION_DATA_MODIFIED, listener);
5274
- }
5275
- segmentationListeners.delete(segmentationId);
5276
- }
5277
- function createDebouncedSegmentationListener(segmentationId, representationType, updateFunction) {
5278
- const debouncedHandler = (0,_utilities_debounce_js__rspack_import_3/* ["default"] */.A)((event) => {
5279
- const eventSegmentationId = event.detail?.segmentationId;
5280
- const segmentation = (0,_getSegmentation_js__rspack_import_4/* .getSegmentation */.T)(eventSegmentationId);
5281
- if (eventSegmentationId === segmentationId &&
5282
- !!segmentation?.representationData?.[representationType]) {
5283
- updateFunction(segmentationId);
5284
- (0,_triggerSegmentationEvents_js__rspack_import_2.triggerSegmentationModified)(segmentationId);
5285
- }
5286
- }, 300);
5287
- return ((event) => {
5288
- debouncedHandler(event);
5289
- });
5190
+ function setSegmentationRepresentationVisibility(viewportId, specifier, visible) {
5191
+ const segmentationStateManager = defaultSegmentationStateManager;
5192
+ segmentationStateManager.setSegmentationRepresentationVisibility(viewportId, specifier, visible);
5290
5193
  }
5291
5194
 
5292
5195
 
5293
- __webpack_require__.d(__webpack_exports__, {
5294
- Np: () => (addDefaultSegmentationListener)
5295
- });
5296
-
5297
-
5298
5196
  },
5299
5197
  11815(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
5300
5198
 
@@ -7003,19 +6901,19 @@ class RectangleROIStartEndThresholdTool extends _annotation_RectangleROITool_js_
7003
6901
  const worldPos = currentPoints.world;
7004
6902
  const enabledElement = (0,_cornerstonejs_core__rspack_import_0.getEnabledElement)(element);
7005
6903
  const { viewport, renderingEngine } = enabledElement;
7006
- this.isDrawing = true;
7007
6904
  const camera = viewport.getCamera();
7008
6905
  const { viewPlaneNormal, viewUp } = camera;
7009
- let referencedImageId, imageVolume, volumeId;
7010
6906
  if (viewport instanceof _cornerstonejs_core__rspack_import_0.StackViewport) {
7011
6907
  throw new Error('Stack Viewport Not implemented');
7012
6908
  }
7013
- else {
7014
- const targetId = this.getTargetId(viewport);
7015
- volumeId = _cornerstonejs_core__rspack_import_0.utilities.getVolumeId(targetId);
7016
- imageVolume = _cornerstonejs_core__rspack_import_0.cache.getVolume(volumeId);
7017
- referencedImageId = _cornerstonejs_core__rspack_import_0.utilities.getClosestImageId(imageVolume, worldPos, viewPlaneNormal);
6909
+ const target = this.getTargetVolume(viewport);
6910
+ if (!target) {
6911
+ return null;
7018
6912
  }
6913
+ const volumeId = _cornerstonejs_core__rspack_import_0.utilities.getVolumeId(target.targetId);
6914
+ const imageVolume = target.imageVolume;
6915
+ const referencedImageId = _cornerstonejs_core__rspack_import_0.utilities.getClosestImageId(imageVolume, worldPos, viewPlaneNormal);
6916
+ this.isDrawing = true;
7019
6917
  const spacingInNormal = _cornerstonejs_core__rspack_import_0.utilities.getSpacingInNormalDirection(imageVolume, viewPlaneNormal);
7020
6918
  const startCoord = this._getStartCoordinate(worldPos, viewPlaneNormal);
7021
6919
  const endCoord = this._getEndCoordinate(worldPos, spacingInNormal, viewPlaneNormal);
@@ -7100,10 +6998,11 @@ class RectangleROIStartEndThresholdTool extends _annotation_RectangleROITool_js_
7100
6998
  this.configuration.preventHandleOutsideImage) {
7101
6999
  (0,_stateManagement_index_js__rspack_import_3/* .removeAnnotation */.O8)(annotation.annotationUID);
7102
7000
  }
7103
- const targetId = this.getTargetId(enabledElement.viewport);
7104
- const imageVolume = _cornerstonejs_core__rspack_import_0.cache.getVolume(targetId.split(/volumeId:|\?/)[1]);
7105
- this._computeProjectionPoints(annotation, imageVolume);
7106
- this._computePointsInsideVolume(annotation, targetId, imageVolume, enabledElement);
7001
+ const target = this.getTargetVolume(enabledElement.viewport);
7002
+ if (target) {
7003
+ this._computeProjectionPoints(annotation, target.imageVolume);
7004
+ this._computePointsInsideVolume(annotation, target.targetId, target.imageVolume, enabledElement);
7005
+ }
7107
7006
  (0,_utilities_triggerAnnotationRenderForViewportIds_js__rspack_import_12/* ["default"] */.A)(viewportIdsToRender);
7108
7007
  if (newAnnotation) {
7109
7008
  (0,_stateManagement_annotation_helpers_state_js__rspack_import_13.triggerAnnotationCompleted)(annotation);
@@ -7158,12 +7057,10 @@ class RectangleROIStartEndThresholdTool extends _annotation_RectangleROITool_js_
7158
7057
  roundedCoord > Math.max(roundedStartCoord, roundedEndCoord)) {
7159
7058
  continue;
7160
7059
  }
7161
- const iteratorVolumeIDs = annotationEnabledElement.viewport?.volumeIds.values();
7162
- for (const volumeId of iteratorVolumeIDs) {
7163
- if (annotation.invalidated &&
7164
- annotation.metadata.volumeId === volumeId) {
7165
- this._throttledCalculateCachedStats(annotation, annotationEnabledElement);
7166
- }
7060
+ const annotationViewport = annotationEnabledElement?.viewport;
7061
+ if (annotation.invalidated &&
7062
+ annotationViewport?.hasVolumeId?.(metadata.volumeId)) {
7063
+ this._throttledCalculateCachedStats(annotation, annotationEnabledElement);
7167
7064
  }
7168
7065
  let firstOrLastSlice = false;
7169
7066
  if (roundedCoord === roundedStartCoord ||
@@ -7286,14 +7183,16 @@ class RectangleROIStartEndThresholdTool extends _annotation_RectangleROITool_js_
7286
7183
  const worldPos1 = data.handles.points[0];
7287
7184
  const worldPos2 = data.handles.points[3];
7288
7185
  const { worldWidth, worldHeight } = (0,_utilities_planar_getWorldWidthAndHeightFromCorners_js__rspack_import_9/* ["default"] */.A)(viewPlaneNormal, viewUp, worldPos1, worldPos2);
7289
- const measureInfo = (0,_utilities_getCalibratedUnits_js__rspack_import_1/* .getCalibratedLengthUnitsAndScale */.Op)(image, data.habdles);
7186
+ const indexCoordinates = data.handles.points.map((point) => image.imageData.worldToIndex(point));
7187
+ const measureInfo = (0,_utilities_getCalibratedUnits_js__rspack_import_1/* .getCalibratedLengthUnitsAndScale */.Op)(image, indexCoordinates);
7290
7188
  const area = Math.abs(worldWidth * worldHeight) /
7291
7189
  (measureInfo.scale * measureInfo.scale);
7292
7190
  const modalityUnitOptions = {
7293
7191
  isPreScaled: (0,_utilities_viewport_isViewportPreScaled_js__rspack_import_15/* .isViewportPreScaled */.u)(viewport, targetId),
7294
7192
  isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
7295
7193
  };
7296
- const modalityUnit = (0,_utilities_getPixelValueUnits_js__rspack_import_18/* .getPixelValueUnits */.j)(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
7194
+ const modality = imageVolume?.metadata?.Modality;
7195
+ const modalityUnit = (0,_utilities_getPixelValueUnits_js__rspack_import_18/* .getPixelValueUnits */.j)(modality, annotation.metadata.referencedImageId, modalityUnitOptions);
7297
7196
  for (let i = 0; i < projectionPoints.length; i++) {
7298
7197
  if (!imageVolume) {
7299
7198
  continue;
@@ -7338,7 +7237,7 @@ class RectangleROIStartEndThresholdTool extends _annotation_RectangleROITool_js_
7338
7237
  const stats = this.configuration.statsCalculator.getStatistics();
7339
7238
  data.cachedStats.pointsInVolume = pointsInsideVolume;
7340
7239
  data.cachedStats.statistics = {
7341
- Modality: metadata.Modality,
7240
+ Modality: modality,
7342
7241
  area,
7343
7242
  mean: stats.mean?.value,
7344
7243
  stdDev: stats.stdDev?.value,
@@ -7352,8 +7251,12 @@ class RectangleROIStartEndThresholdTool extends _annotation_RectangleROITool_js_
7352
7251
  const data = annotation.data;
7353
7252
  const { viewport } = enabledElement;
7354
7253
  const { cachedStats } = data;
7355
- const targetId = this.getTargetId(viewport);
7356
- const imageVolume = _cornerstonejs_core__rspack_import_0.cache.getVolume(targetId.split(/volumeId:|\?/)[1]);
7254
+ const target = this.getTargetVolume(viewport);
7255
+ if (!target) {
7256
+ annotation.invalidated = false;
7257
+ return cachedStats;
7258
+ }
7259
+ const { targetId, imageVolume } = target;
7357
7260
  this._computeProjectionPoints(annotation, imageVolume);
7358
7261
  this._computePointsInsideVolume(annotation, targetId, imageVolume, enabledElement);
7359
7262
  annotation.invalidated = false;
@@ -9085,7 +8988,7 @@ __webpack_require__.d(__webpack_exports__, {
9085
8988
  },
9086
8989
  83753(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
9087
8990
  /* import */ var _math_polyline_isClosed_js__rspack_import_0 = __webpack_require__(89102);
9088
- /* import */ var _math_polyline_index_js__rspack_import_1 = __webpack_require__(58232);
8991
+ /* import */ var _math_polyline_index_js__rspack_import_1 = __webpack_require__(1109);
9089
8992
 
9090
8993
 
9091
8994
  function findIslands(polylines, threshold) {
@@ -10678,41 +10581,6 @@ function intersectPolylines(mainPolyCoords, clipPolyCoordsInput) {
10678
10581
  }
10679
10582
 
10680
10583
 
10681
- },
10682
- 44745(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
10683
- /* import */ var _containsPoint_js__rspack_import_0 = __webpack_require__(45393);
10684
- /* import */ var _projectTo2D_js__rspack_import_1 = __webpack_require__(11542);
10685
-
10686
-
10687
- function isPointInsidePolyline3D(point, polyline, options = {}) {
10688
- const { sharedDimensionIndex, projectedPolyline } = (0,_projectTo2D_js__rspack_import_1/* .projectTo2D */.p)(polyline);
10689
- const { holes } = options;
10690
- const projectedHoles = [];
10691
- if (holes) {
10692
- for (let i = 0; i < holes.length; i++) {
10693
- const hole = holes[i];
10694
- const hole2D = [];
10695
- for (let j = 0; j < hole.length; j++) {
10696
- hole2D.push([
10697
- hole[j][(sharedDimensionIndex + 1) % 3],
10698
- hole[j][(sharedDimensionIndex + 2) % 3],
10699
- ]);
10700
- }
10701
- projectedHoles.push(hole2D);
10702
- }
10703
- }
10704
- const point2D = [
10705
- point[(sharedDimensionIndex + 1) % 3],
10706
- point[(sharedDimensionIndex + 2) % 3],
10707
- ];
10708
- return (0,_containsPoint_js__rspack_import_0/* ["default"] */.A)(projectedPolyline, point2D, { holes: projectedHoles });
10709
- }
10710
-
10711
- __webpack_require__.d(__webpack_exports__, {
10712
- i: () => (isPointInsidePolyline3D)
10713
- });
10714
-
10715
-
10716
10584
  },
10717
10585
  94018(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
10718
10586
  /* import */ var gl_matrix__rspack_import_0 = __webpack_require__(50341);
@@ -10760,40 +10628,6 @@ const pointsAreWithinCloseContourProximity = (p1, p2, closeContourProximity) =>
10760
10628
  /* export default */ __webpack_exports__.A = (pointsAreWithinCloseContourProximity);
10761
10629
 
10762
10630
 
10763
- },
10764
- 11542(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
10765
- /* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
10766
-
10767
- const epsilon = 1e-6;
10768
- function projectTo2D(polyline) {
10769
- let sharedDimensionIndex;
10770
- const testPoints = _cornerstonejs_core__rspack_import_0.utilities.getRandomSampleFromArray(polyline, 50);
10771
- for (let i = 0; i < 3; i++) {
10772
- if (testPoints.every((point, index, array) => Math.abs(point[i] - array[0][i]) < epsilon)) {
10773
- sharedDimensionIndex = i;
10774
- break;
10775
- }
10776
- }
10777
- if (sharedDimensionIndex === undefined) {
10778
- throw new Error('Cannot find a shared dimension index for polyline, probably oblique plane');
10779
- }
10780
- const points2D = [];
10781
- const firstDim = (sharedDimensionIndex + 1) % 3;
10782
- const secondDim = (sharedDimensionIndex + 2) % 3;
10783
- for (let i = 0; i < polyline.length; i++) {
10784
- points2D.push([polyline[i][firstDim], polyline[i][secondDim]]);
10785
- }
10786
- return {
10787
- sharedDimensionIndex,
10788
- projectedPolyline: points2D,
10789
- };
10790
- }
10791
-
10792
- __webpack_require__.d(__webpack_exports__, {
10793
- p: () => (projectTo2D)
10794
- });
10795
-
10796
-
10797
10631
  },
10798
10632
  99047(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
10799
10633
  /* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
@@ -12554,6 +12388,47 @@ __webpack_require__.d(__webpack_exports__, {
12554
12388
  });
12555
12389
 
12556
12390
 
12391
+ },
12392
+ 20325(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
12393
+ /* import */ var _version_js__rspack_import_0 = __webpack_require__(88253);
12394
+ /* import */ var _utilities_index_js__rspack_import_1 = __webpack_require__(28102);
12395
+ /* import */ var _utilities_logging_index_js__rspack_import_2 = __webpack_require__(68272);
12396
+ /* import */ var _utilities_object_index_js__rspack_import_3 = __webpack_require__(33430);
12397
+ /* import */ var _utilities_math_index_js__rspack_import_4 = __webpack_require__(40937);
12398
+
12399
+
12400
+
12401
+
12402
+
12403
+
12404
+ __webpack_require__.d(__webpack_exports__, {
12405
+ Et: () => (/* reexport safe */ _utilities_math_index_js__rspack_import_4.Et),
12406
+ IQ: () => (/* reexport safe */ _utilities_math_index_js__rspack_import_4.IQ),
12407
+ Ph: () => (/* reexport safe */ _utilities_math_index_js__rspack_import_4.Ph),
12408
+ WC: () => (/* reexport safe */ _utilities_math_index_js__rspack_import_4.WC),
12409
+ m9: () => (/* reexport module object */ _utilities_logging_index_js__rspack_import_2),
12410
+ n4: () => (/* reexport safe */ _utilities_math_index_js__rspack_import_4.n4)
12411
+ });
12412
+
12413
+
12414
+ },
12415
+ 40937(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
12416
+ /* import */ var _toNumber_js__rspack_import_0 = __webpack_require__(15801);
12417
+ /* import */ var _isEqual_js__rspack_import_1 = __webpack_require__(90757);
12418
+
12419
+
12420
+
12421
+
12422
+
12423
+ __webpack_require__.d(__webpack_exports__, {
12424
+ Et: () => (/* reexport safe */ _isEqual_js__rspack_import_1.Et),
12425
+ IQ: () => (/* reexport safe */ _toNumber_js__rspack_import_0.IQ),
12426
+ Ph: () => (/* reexport safe */ _isEqual_js__rspack_import_1.Ph),
12427
+ WC: () => (/* reexport safe */ _isEqual_js__rspack_import_1.WC),
12428
+ n4: () => (/* reexport safe */ _isEqual_js__rspack_import_1.n4)
12429
+ });
12430
+
12431
+
12557
12432
  },
12558
12433
  47695(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
12559
12434
  /**
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- (globalThis["rspackChunk_ohif_app"] ||= []).push([[2894], {
2
+ (globalThis["rspackChunk_ohif_app"] ||= []).push([[513], {
3
3
  23597(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
4
4
 
5
5
  // EXPORTS