@ohif/app 3.7.0-beta.32 → 3.7.0-beta.35

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 (32) hide show
  1. package/dist/{270.bundle.a4ff08f18e3da39a030b.js → 270.bundle.2d215f8720350f03e171.js} +99 -105
  2. package/dist/{283.bundle.49a1b99c4c644c056e33.js → 283.bundle.51628bee972a04e8f2a9.js} +2 -2
  3. package/dist/{351.bundle.444e1c32785871760302.js → 351.bundle.33b4d3f8b66453b5d303.js} +4 -8
  4. package/dist/{331.bundle.0293a1135afc1a55d93c.js → 389.bundle.38df7e54d2f632cfa7a0.js} +72 -47
  5. package/dist/{55.bundle.3fdadd0823a136eb4585.js → 55.bundle.b2c6b4dff2a949d25023.js} +2 -2
  6. package/dist/{707.bundle.f6089591fa5662066ba1.js → 625.bundle.56cf23e17aba289098b9.js} +14 -30
  7. package/dist/{728.bundle.75a919489af5ae4c237b.js → 728.bundle.5bef7c8643b42d70a79f.js} +9 -8
  8. package/dist/{799.bundle.620e1df13daf7b31cb3f.js → 799.bundle.6d3320855c9332c7117a.js} +1 -1
  9. package/dist/{82.bundle.1e2462a400e956390087.js → 82.bundle.2e1ab22b6d6980c356f1.js} +2 -2
  10. package/dist/{976.bundle.c6bd57d5f629041c207b.js → 976.bundle.c12649da6fb9662b9f94.js} +1 -1
  11. package/dist/{984.bundle.4208516a1e4ea7e1d2aa.js → 984.bundle.9133d3fdd441a8e6d63f.js} +5 -5
  12. package/dist/{app.bundle.1dbcce1bc2fd56fa4867.js → app.bundle.3b2fe1badff37d9e939e.js} +33 -16
  13. package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
  14. package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
  15. package/dist/index.html +1 -1
  16. package/dist/{index.worker.1c69152d710fa7b84bce.worker.js → index.worker.17eee78bdafa44cbb47d.worker.js} +2 -2
  17. package/dist/index.worker.17eee78bdafa44cbb47d.worker.js.map +1 -0
  18. package/dist/sw.js +1 -1
  19. package/package.json +19 -19
  20. package/dist/index.worker.1c69152d710fa7b84bce.worker.js.map +0 -1
  21. /package/dist/{192.bundle.26533b7ad9113e6bc34d.js → 192.bundle.6272e24776573a46ba0e.js} +0 -0
  22. /package/dist/{199.bundle.56551652377b05f85f03.js → 199.bundle.017a4d777d4c2b3ae3c7.js} +0 -0
  23. /package/dist/{208.bundle.e1f8d78968791e539ec8.js → 208.bundle.1ddd87553ed279ecf177.js} +0 -0
  24. /package/dist/{404.bundle.312d888f29f0fa5a57d9.js → 404.bundle.1dce2dd30ff876edc5f3.js} +0 -0
  25. /package/dist/{50.bundle.446a70d541ad5eaa1152.js → 50.bundle.17df79160c1183470b70.js} +0 -0
  26. /package/dist/{616.bundle.4def329c5e77446ce41a.js → 616.bundle.9ca5b6ebd436fa5c8b73.js} +0 -0
  27. /package/dist/{707.css → 625.css} +0 -0
  28. /package/dist/{642.bundle.b926cd6e393ac5fa9461.js → 642.bundle.aba522f4f50f4b897046.js} +0 -0
  29. /package/dist/{744.bundle.df7868749b17d157eff3.js → 744.bundle.6010b90be6b43b0d9bc8.js} +0 -0
  30. /package/dist/{790.bundle.14d186106edad0c5d0a7.js → 790.bundle.9f4c33a790c651348286.js} +0 -0
  31. /package/dist/{917.bundle.86db126079298a492409.js → 917.bundle.e220de67184c171f631d.js} +0 -0
  32. /package/dist/{973.bundle.8b40615552054ca421a4.js → 973.bundle.201ccef3cb047506ff92.js} +0 -0
@@ -578,8 +578,8 @@ __webpack_require__.d(synchronizers_namespaceObject, {
578
578
  var types_namespaceObject = {};
579
579
  __webpack_require__.r(types_namespaceObject);
580
580
 
581
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 335 modules
582
- var esm = __webpack_require__(77331);
581
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 336 modules
582
+ var esm = __webpack_require__(58389);
583
583
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/ToolBindings.js
584
584
  var MouseBindings;
585
585
  (function (MouseBindings) {
@@ -11672,19 +11672,28 @@ LengthTool.toolName = 'Length';
11672
11672
  /* harmony default export */ const annotation_LengthTool = (LengthTool);
11673
11673
  //# sourceMappingURL=LengthTool.js.map
11674
11674
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/getModalityUnit.js
11675
- function getModalityUnit(modality, isPreScaled, isSuvScaled) {
11675
+
11676
+ function getModalityUnit(modality, imageId, options) {
11676
11677
  if (modality === 'CT') {
11677
11678
  return 'HU';
11678
11679
  }
11679
- else if (modality === 'PT' &&
11680
- isPreScaled === true &&
11681
- isSuvScaled === true) {
11682
- return 'SUV';
11680
+ else if (modality === 'PT') {
11681
+ return _handlePTModality(imageId, options);
11683
11682
  }
11684
11683
  else {
11685
11684
  return '';
11686
11685
  }
11687
11686
  }
11687
+ function _handlePTModality(imageId, options) {
11688
+ if (!options.isPreScaled) {
11689
+ return 'raw';
11690
+ }
11691
+ if (options.isSuvScaled) {
11692
+ return 'SUV';
11693
+ }
11694
+ const petSeriesModule = esm.metaData.get('petSeriesModule', imageId);
11695
+ return petSeriesModule?.units || 'unitless';
11696
+ }
11688
11697
 
11689
11698
  //# sourceMappingURL=getModalityUnit.js.map
11690
11699
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/viewport/isViewportPreScaled.js
@@ -11877,16 +11886,20 @@ class ProbeTool extends base_AnnotationTool {
11877
11886
  const canvasCoordinates = viewport.worldToCanvas(point);
11878
11887
  styleSpecifier.annotationUID = annotationUID;
11879
11888
  const color = this.getStyle('color', styleSpecifier, annotation);
11889
+ const modalityUnitOptions = {
11890
+ isPreScaled: isViewportPreScaled(viewport, targetId),
11891
+ isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
11892
+ };
11880
11893
  if (!data.cachedStats[targetId]) {
11881
11894
  data.cachedStats[targetId] = {
11882
11895
  Modality: null,
11883
11896
  index: null,
11884
11897
  value: null,
11885
11898
  };
11886
- this._calculateCachedStats(annotation, renderingEngine, enabledElement);
11899
+ this._calculateCachedStats(annotation, renderingEngine, enabledElement, modalityUnitOptions);
11887
11900
  }
11888
11901
  else if (annotation.invalidated) {
11889
- this._calculateCachedStats(annotation, renderingEngine, enabledElement);
11902
+ this._calculateCachedStats(annotation, renderingEngine, enabledElement, modalityUnitOptions);
11890
11903
  if (viewport instanceof esm.VolumeViewport) {
11891
11904
  const { referencedImageId } = annotation.metadata;
11892
11905
  for (const targetId in data.cachedStats) {
@@ -11912,9 +11925,7 @@ class ProbeTool extends base_AnnotationTool {
11912
11925
  const handleGroupUID = '0';
11913
11926
  drawingSvg_drawHandles(svgDrawingHelper, annotationUID, handleGroupUID, [canvasCoordinates], { color });
11914
11927
  renderStatus = true;
11915
- const isPreScaled = isViewportPreScaled(viewport, targetId);
11916
- const isSuvScaled = this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId);
11917
- const textLines = this._getTextLines(data, targetId, isPreScaled, isSuvScaled);
11928
+ const textLines = this._getTextLines(data, targetId);
11918
11929
  if (textLines) {
11919
11930
  const textCanvasCoordinates = [
11920
11931
  canvasCoordinates[0] + 6,
@@ -11958,50 +11969,18 @@ class ProbeTool extends base_AnnotationTool {
11958
11969
  utilities_triggerAnnotationRenderForViewportIds(renderingEngine, viewportIdsToRender);
11959
11970
  evt.preventDefault();
11960
11971
  }
11961
- _getTextLines(data, targetId, isPreScaled, isSuvScaled) {
11972
+ _getTextLines(data, targetId) {
11962
11973
  const cachedVolumeStats = data.cachedStats[targetId];
11963
- const { index, Modality, value, SUVBw, SUVLbm, SUVBsa } = cachedVolumeStats;
11964
- if (value === undefined && SUVBw === undefined) {
11974
+ const { index, value, modalityUnit } = cachedVolumeStats;
11975
+ if (value === undefined) {
11965
11976
  return;
11966
11977
  }
11967
11978
  const textLines = [];
11968
- const unit = getModalityUnit(Modality, isPreScaled, isSuvScaled);
11969
11979
  textLines.push(`(${index[0]}, ${index[1]}, ${index[2]})`);
11970
- if (Modality === 'PT' && isPreScaled === true && SUVBw !== undefined) {
11971
- textLines.push(`${SUVBw.toFixed(2)} SUV bw`);
11972
- if (SUVLbm) {
11973
- textLines.push(`${SUVLbm.toFixed(2)} SUV lbm`);
11974
- }
11975
- if (SUVBsa) {
11976
- textLines.push(`${SUVBsa.toFixed(2)} SUV bsa`);
11977
- }
11978
- }
11979
- else {
11980
- textLines.push(`${value.toFixed(2)} ${unit}`);
11981
- }
11980
+ textLines.push(`${value.toFixed(2)} ${modalityUnit}`);
11982
11981
  return textLines;
11983
11982
  }
11984
- _getValueForModality(value, imageVolume, modality) {
11985
- const values = {};
11986
- values['value'] = value;
11987
- if (modality === 'PT' &&
11988
- imageVolume.scaling?.PT &&
11989
- (imageVolume.scaling.PT.suvbwToSuvbsa ||
11990
- imageVolume.scaling.PT.suvbwToSuvlbm)) {
11991
- const { suvbwToSuvlbm, suvbwToSuvbsa } = imageVolume.scaling.PT;
11992
- values['SUVBw'] = value;
11993
- if (suvbwToSuvlbm) {
11994
- const SUVLbm = value * suvbwToSuvlbm;
11995
- values['SUVLbm'] = SUVLbm;
11996
- }
11997
- if (suvbwToSuvbsa) {
11998
- const SUVBsa = value * suvbwToSuvbsa;
11999
- values['SUVBsa'] = SUVBsa;
12000
- }
12001
- }
12002
- return values;
12003
- }
12004
- _calculateCachedStats(annotation, renderingEngine, enabledElement) {
11983
+ _calculateCachedStats(annotation, renderingEngine, enabledElement, modalityUnitOptions) {
12005
11984
  const data = annotation.data;
12006
11985
  const { viewportId, renderingEngineId } = enabledElement;
12007
11986
  const worldPos = data.handles.points[0];
@@ -12032,11 +12011,12 @@ class ProbeTool extends base_AnnotationTool {
12032
12011
  const viewport = viewports[0];
12033
12012
  index[2] = viewport.getCurrentImageIdIndex();
12034
12013
  }
12035
- const values = this._getValueForModality(value, image, modality);
12014
+ const modalityUnit = getModalityUnit(modality, annotation.metadata.referencedImageId, modalityUnitOptions);
12036
12015
  cachedStats[targetId] = {
12037
12016
  index,
12038
- ...values,
12017
+ value,
12039
12018
  Modality: modality,
12019
+ modalityUnit,
12040
12020
  };
12041
12021
  }
12042
12022
  else {
@@ -12144,16 +12124,20 @@ class DragProbeTool extends annotation_ProbeTool {
12144
12124
  const canvasCoordinates = viewport.worldToCanvas(point);
12145
12125
  styleSpecifier.annotationUID = annotationUID;
12146
12126
  const color = this.getStyle('color', styleSpecifier, annotation);
12127
+ const modalityUnitOptions = {
12128
+ isPreScaled: isViewportPreScaled(viewport, targetId),
12129
+ isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
12130
+ };
12147
12131
  if (!data.cachedStats[targetId]) {
12148
12132
  data.cachedStats[targetId] = {
12149
12133
  Modality: null,
12150
12134
  index: null,
12151
12135
  value: null,
12152
12136
  };
12153
- this._calculateCachedStats(annotation, renderingEngine, enabledElement);
12137
+ this._calculateCachedStats(annotation, renderingEngine, enabledElement, modalityUnitOptions);
12154
12138
  }
12155
12139
  else if (annotation.invalidated) {
12156
- this._calculateCachedStats(annotation, renderingEngine, enabledElement);
12140
+ this._calculateCachedStats(annotation, renderingEngine, enabledElement, modalityUnitOptions);
12157
12141
  }
12158
12142
  if (!viewport.getRenderingEngine()) {
12159
12143
  console.warn('Rendering Engine has been destroyed');
@@ -12162,9 +12146,7 @@ class DragProbeTool extends annotation_ProbeTool {
12162
12146
  const handleGroupUID = '0';
12163
12147
  drawingSvg_drawHandles(svgDrawingHelper, annotationUID, handleGroupUID, [canvasCoordinates], { color });
12164
12148
  renderStatus = true;
12165
- const isPreScaled = isViewportPreScaled(viewport, targetId);
12166
- const isSuvScaled = this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId);
12167
- const textLines = this._getTextLines(data, targetId, isPreScaled, isSuvScaled);
12149
+ const textLines = this._getTextLines(data, targetId);
12168
12150
  if (textLines) {
12169
12151
  const textCanvasCoordinates = [
12170
12152
  canvasCoordinates[0] + 6,
@@ -12579,6 +12561,10 @@ class RectangleROITool extends base_AnnotationTool {
12579
12561
  const lineDash = this.getStyle('lineDash', styleSpecifier, annotation);
12580
12562
  const color = this.getStyle('color', styleSpecifier, annotation);
12581
12563
  const { viewPlaneNormal, viewUp } = viewport.getCamera();
12564
+ const modalityUnitOptions = {
12565
+ isPreScaled: isViewportPreScaled(viewport, targetId),
12566
+ isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
12567
+ };
12582
12568
  if (!data.cachedStats[targetId] ||
12583
12569
  data.cachedStats[targetId].areaUnit === undefined) {
12584
12570
  data.cachedStats[targetId] = {
@@ -12589,10 +12575,10 @@ class RectangleROITool extends base_AnnotationTool {
12589
12575
  stdDev: null,
12590
12576
  areaUnit: null,
12591
12577
  };
12592
- this._calculateCachedStats(annotation, viewPlaneNormal, viewUp, renderingEngine, enabledElement);
12578
+ this._calculateCachedStats(annotation, viewPlaneNormal, viewUp, renderingEngine, enabledElement, modalityUnitOptions);
12593
12579
  }
12594
12580
  else if (annotation.invalidated) {
12595
- this._throttledCalculateCachedStats(annotation, viewPlaneNormal, viewUp, renderingEngine, enabledElement);
12581
+ this._throttledCalculateCachedStats(annotation, viewPlaneNormal, viewUp, renderingEngine, enabledElement, modalityUnitOptions);
12596
12582
  if (viewport instanceof esm.VolumeViewport) {
12597
12583
  const { referencedImageId } = annotation.metadata;
12598
12584
  for (const targetId in data.cachedStats) {
@@ -12638,9 +12624,7 @@ class RectangleROITool extends base_AnnotationTool {
12638
12624
  lineWidth,
12639
12625
  }, dataId);
12640
12626
  renderStatus = true;
12641
- const isPreScaled = isViewportPreScaled(viewport, targetId);
12642
- const isSuvScaled = this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId);
12643
- const textLines = this._getTextLines(data, targetId, isPreScaled, isSuvScaled);
12627
+ const textLines = this._getTextLines(data, targetId);
12644
12628
  if (!textLines || textLines.length === 0) {
12645
12629
  continue;
12646
12630
  }
@@ -12671,21 +12655,20 @@ class RectangleROITool extends base_AnnotationTool {
12671
12655
  height: Math.abs(point0[1] - point1[1]),
12672
12656
  };
12673
12657
  };
12674
- this._getTextLines = (data, targetId, isPreScaled, isSuvScaled) => {
12658
+ this._getTextLines = (data, targetId) => {
12675
12659
  const cachedVolumeStats = data.cachedStats[targetId];
12676
- const { area, mean, max, stdDev, Modality, areaUnit } = cachedVolumeStats;
12660
+ const { area, mean, max, stdDev, areaUnit, modalityUnit } = cachedVolumeStats;
12677
12661
  if (mean === undefined) {
12678
12662
  return;
12679
12663
  }
12680
12664
  const textLines = [];
12681
- const unit = getModalityUnit(Modality, isPreScaled, isSuvScaled);
12682
12665
  textLines.push(`Area: ${area.toFixed(2)} ${areaUnit}\xb2`);
12683
- textLines.push(`Mean: ${mean.toFixed(2)} ${unit}`);
12684
- textLines.push(`Max: ${max.toFixed(2)} ${unit}`);
12685
- textLines.push(`Std Dev: ${stdDev.toFixed(2)} ${unit}`);
12666
+ textLines.push(`Mean: ${mean.toFixed(2)} ${modalityUnit}`);
12667
+ textLines.push(`Max: ${max.toFixed(2)} ${modalityUnit}`);
12668
+ textLines.push(`Std Dev: ${stdDev.toFixed(2)} ${modalityUnit}`);
12686
12669
  return textLines;
12687
12670
  };
12688
- this._calculateCachedStats = (annotation, viewPlaneNormal, viewUp, renderingEngine, enabledElement) => {
12671
+ this._calculateCachedStats = (annotation, viewPlaneNormal, viewUp, renderingEngine, enabledElement, modalityUnitOptions) => {
12689
12672
  const { data } = annotation;
12690
12673
  const { viewportId, renderingEngineId } = enabledElement;
12691
12674
  const worldPos1 = data.handles.points[0];
@@ -12748,6 +12731,7 @@ class RectangleROITool extends base_AnnotationTool {
12748
12731
  }
12749
12732
  stdDev /= count;
12750
12733
  stdDev = Math.sqrt(stdDev);
12734
+ const modalityUnit = getModalityUnit(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
12751
12735
  cachedStats[targetId] = {
12752
12736
  Modality: metadata.Modality,
12753
12737
  area,
@@ -12755,6 +12739,7 @@ class RectangleROITool extends base_AnnotationTool {
12755
12739
  stdDev,
12756
12740
  max,
12757
12741
  areaUnit: hasPixelSpacing ? 'mm' : 'px',
12742
+ modalityUnit,
12758
12743
  };
12759
12744
  }
12760
12745
  else {
@@ -13245,6 +13230,10 @@ class EllipticalROITool extends base_AnnotationTool {
13245
13230
  canvasCorners = (getCanvasEllipseCorners(canvasCoordinates));
13246
13231
  }
13247
13232
  const { centerPointRadius } = this.configuration;
13233
+ const modalityUnitOptions = {
13234
+ isPreScaled: isViewportPreScaled(viewport, targetId),
13235
+ isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
13236
+ };
13248
13237
  if (!data.cachedStats[targetId] ||
13249
13238
  data.cachedStats[targetId].areaUnit === undefined) {
13250
13239
  data.cachedStats[targetId] = {
@@ -13255,10 +13244,10 @@ class EllipticalROITool extends base_AnnotationTool {
13255
13244
  stdDev: null,
13256
13245
  areaUnit: null,
13257
13246
  };
13258
- this._calculateCachedStats(annotation, viewport, renderingEngine, enabledElement);
13247
+ this._calculateCachedStats(annotation, viewport, renderingEngine, enabledElement, modalityUnitOptions);
13259
13248
  }
13260
13249
  else if (annotation.invalidated) {
13261
- this._throttledCalculateCachedStats(annotation, viewport, renderingEngine, enabledElement);
13250
+ this._throttledCalculateCachedStats(annotation, viewport, renderingEngine, enabledElement, modalityUnitOptions);
13262
13251
  if (viewport instanceof esm.VolumeViewport) {
13263
13252
  const { referencedImageId } = annotation.metadata;
13264
13253
  for (const targetId in data.cachedStats) {
@@ -13315,9 +13304,7 @@ class EllipticalROITool extends base_AnnotationTool {
13315
13304
  }
13316
13305
  }
13317
13306
  renderStatus = true;
13318
- const isPreScaled = isViewportPreScaled(viewport, targetId);
13319
- const isSuvScaled = this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId);
13320
- const textLines = this._getTextLines(data, targetId, isPreScaled, isSuvScaled);
13307
+ const textLines = this._getTextLines(data, targetId);
13321
13308
  if (!textLines || textLines.length === 0) {
13322
13309
  continue;
13323
13310
  }
@@ -13340,11 +13327,10 @@ class EllipticalROITool extends base_AnnotationTool {
13340
13327
  }
13341
13328
  return renderStatus;
13342
13329
  };
13343
- this._getTextLines = (data, targetId, isPreScaled, isSuvScaled) => {
13330
+ this._getTextLines = (data, targetId) => {
13344
13331
  const cachedVolumeStats = data.cachedStats[targetId];
13345
- const { area, mean, stdDev, max, isEmptyArea, Modality, areaUnit } = cachedVolumeStats;
13332
+ const { area, mean, stdDev, max, isEmptyArea, areaUnit, modalityUnit } = cachedVolumeStats;
13346
13333
  const textLines = [];
13347
- const unit = getModalityUnit(Modality, isPreScaled, isSuvScaled);
13348
13334
  if (area) {
13349
13335
  const areaLine = isEmptyArea
13350
13336
  ? `Area: Oblique not supported`
@@ -13352,17 +13338,17 @@ class EllipticalROITool extends base_AnnotationTool {
13352
13338
  textLines.push(areaLine);
13353
13339
  }
13354
13340
  if (mean) {
13355
- textLines.push(`Mean: ${mean.toFixed(2)} ${unit}`);
13341
+ textLines.push(`Mean: ${mean.toFixed(2)} ${modalityUnit}`);
13356
13342
  }
13357
13343
  if (max) {
13358
- textLines.push(`Max: ${max.toFixed(2)} ${unit}`);
13344
+ textLines.push(`Max: ${max.toFixed(2)} ${modalityUnit}`);
13359
13345
  }
13360
13346
  if (stdDev) {
13361
- textLines.push(`Std Dev: ${stdDev.toFixed(2)} ${unit}`);
13347
+ textLines.push(`Std Dev: ${stdDev.toFixed(2)} ${modalityUnit}`);
13362
13348
  }
13363
13349
  return textLines;
13364
13350
  };
13365
- this._calculateCachedStats = (annotation, viewport, renderingEngine, enabledElement) => {
13351
+ this._calculateCachedStats = (annotation, viewport, renderingEngine, enabledElement, modalityUnitOptions) => {
13366
13352
  const data = annotation.data;
13367
13353
  const { viewportId, renderingEngineId } = enabledElement;
13368
13354
  const { points } = data.handles;
@@ -13436,6 +13422,7 @@ class EllipticalROITool extends base_AnnotationTool {
13436
13422
  pointInShapeCallback(imageData, (pointLPS, pointIJK) => pointInEllipse(ellipseObj, pointLPS), stdCalculator, boundsIJK);
13437
13423
  stdDev /= count;
13438
13424
  stdDev = Math.sqrt(stdDev);
13425
+ const modalityUnit = getModalityUnit(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
13439
13426
  cachedStats[targetId] = {
13440
13427
  Modality: metadata.Modality,
13441
13428
  area,
@@ -13444,6 +13431,7 @@ class EllipticalROITool extends base_AnnotationTool {
13444
13431
  stdDev,
13445
13432
  isEmptyArea,
13446
13433
  areaUnit: hasPixelSpacing ? 'mm' : 'px',
13434
+ modalityUnit,
13447
13435
  };
13448
13436
  }
13449
13437
  else {
@@ -13883,6 +13871,10 @@ class CircleROITool extends base_AnnotationTool {
13883
13871
  const radius = getCanvasCircleRadius(canvasCoordinates);
13884
13872
  const canvasCorners = getCanvasCircleCorners(canvasCoordinates);
13885
13873
  const { centerPointRadius } = this.configuration;
13874
+ const modalityUnitOptions = {
13875
+ isPreScaled: isViewportPreScaled(viewport, targetId),
13876
+ isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
13877
+ };
13886
13878
  if (!data.cachedStats[targetId] ||
13887
13879
  data.cachedStats[targetId].areaUnit === undefined) {
13888
13880
  data.cachedStats[targetId] = {
@@ -13896,10 +13888,10 @@ class CircleROITool extends base_AnnotationTool {
13896
13888
  radiusUnit: null,
13897
13889
  perimeter: null,
13898
13890
  };
13899
- this._calculateCachedStats(annotation, viewport, renderingEngine, enabledElement);
13891
+ this._calculateCachedStats(annotation, viewport, renderingEngine, enabledElement, modalityUnitOptions);
13900
13892
  }
13901
13893
  else if (annotation.invalidated) {
13902
- this._throttledCalculateCachedStats(annotation, viewport, renderingEngine, enabledElement);
13894
+ this._throttledCalculateCachedStats(annotation, viewport, renderingEngine, enabledElement, modalityUnitOptions);
13903
13895
  if (viewport instanceof esm.VolumeViewport) {
13904
13896
  const { referencedImageId } = annotation.metadata;
13905
13897
  for (const targetId in data.cachedStats) {
@@ -13954,9 +13946,7 @@ class CircleROITool extends base_AnnotationTool {
13954
13946
  }
13955
13947
  }
13956
13948
  renderStatus = true;
13957
- const isPreScaled = isViewportPreScaled(viewport, targetId);
13958
- const isSuvScaled = this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId);
13959
- const textLines = this._getTextLines(data, targetId, isPreScaled, isSuvScaled);
13949
+ const textLines = this._getTextLines(data, targetId);
13960
13950
  if (!textLines || textLines.length === 0) {
13961
13951
  continue;
13962
13952
  }
@@ -13979,11 +13969,10 @@ class CircleROITool extends base_AnnotationTool {
13979
13969
  }
13980
13970
  return renderStatus;
13981
13971
  };
13982
- this._getTextLines = (data, targetId, isPreScaled, isSuvScaled) => {
13972
+ this._getTextLines = (data, targetId) => {
13983
13973
  const cachedVolumeStats = data.cachedStats[targetId];
13984
- const { radius, radiusUnit, area, mean, stdDev, max, isEmptyArea, Modality, areaUnit, } = cachedVolumeStats;
13974
+ const { radius, radiusUnit, area, mean, stdDev, max, isEmptyArea, Modality, areaUnit, modalityUnit, } = cachedVolumeStats;
13985
13975
  const textLines = [];
13986
- const unit = getModalityUnit(Modality, isPreScaled, isSuvScaled);
13987
13976
  if (radius) {
13988
13977
  const radiusLine = isEmptyArea
13989
13978
  ? `Radius: Oblique not supported`
@@ -13997,17 +13986,17 @@ class CircleROITool extends base_AnnotationTool {
13997
13986
  textLines.push(areaLine);
13998
13987
  }
13999
13988
  if (mean) {
14000
- textLines.push(`Mean: ${mean.toFixed(2)} ${unit}`);
13989
+ textLines.push(`Mean: ${mean.toFixed(2)} ${modalityUnit}`);
14001
13990
  }
14002
13991
  if (max) {
14003
- textLines.push(`Max: ${max.toFixed(2)} ${unit}`);
13992
+ textLines.push(`Max: ${max.toFixed(2)} ${modalityUnit}`);
14004
13993
  }
14005
13994
  if (stdDev) {
14006
- textLines.push(`Std Dev: ${stdDev.toFixed(2)} ${unit}`);
13995
+ textLines.push(`Std Dev: ${stdDev.toFixed(2)} ${modalityUnit}`);
14007
13996
  }
14008
13997
  return textLines;
14009
13998
  };
14010
- this._calculateCachedStats = (annotation, viewport, renderingEngine, enabledElement) => {
13999
+ this._calculateCachedStats = (annotation, viewport, renderingEngine, enabledElement, modalityUnitOptions) => {
14011
14000
  const data = annotation.data;
14012
14001
  const { viewportId, renderingEngineId } = enabledElement;
14013
14002
  const { points } = data.handles;
@@ -14081,6 +14070,7 @@ class CircleROITool extends base_AnnotationTool {
14081
14070
  pointInShapeCallback(imageData, (pointLPS, pointIJK) => pointInEllipse(ellipseObj, pointLPS), stdCalculator, boundsIJK);
14082
14071
  stdDev /= count;
14083
14072
  stdDev = Math.sqrt(stdDev);
14073
+ const modalityUnit = getModalityUnit(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
14084
14074
  cachedStats[targetId] = {
14085
14075
  Modality: metadata.Modality,
14086
14076
  area,
@@ -14092,6 +14082,7 @@ class CircleROITool extends base_AnnotationTool {
14092
14082
  radius: worldWidth / 2,
14093
14083
  radiusUnit: hasPixelSpacing ? 'mm' : 'px',
14094
14084
  perimeter: 2 * Math.PI * (worldWidth / 2),
14085
+ modalityUnit,
14095
14086
  };
14096
14087
  }
14097
14088
  else {
@@ -16061,6 +16052,10 @@ class PlanarFreehandROITool extends base_AnnotationTool {
16061
16052
  if (annotation.annotationUID === activeAnnotationUID &&
16062
16053
  !this.commonData?.movingTextBox)
16063
16054
  return;
16055
+ const modalityUnitOptions = {
16056
+ isPreScaled: isViewportPreScaled(viewport, targetId),
16057
+ isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
16058
+ };
16064
16059
  if (!this.commonData?.movingTextBox) {
16065
16060
  const { data } = annotation;
16066
16061
  if (!data.cachedStats[targetId] ||
@@ -16073,17 +16068,17 @@ class PlanarFreehandROITool extends base_AnnotationTool {
16073
16068
  stdDev: null,
16074
16069
  areaUnit: null,
16075
16070
  };
16076
- this._calculateCachedStats(annotation, viewport, renderingEngine, enabledElement);
16071
+ this._calculateCachedStats(annotation, viewport, renderingEngine, enabledElement, modalityUnitOptions);
16077
16072
  }
16078
16073
  else if (annotation.invalidated) {
16079
- this._throttledCalculateCachedStats(annotation, viewport, renderingEngine, enabledElement);
16074
+ this._throttledCalculateCachedStats(annotation, viewport, renderingEngine, enabledElement, modalityUnitOptions);
16080
16075
  }
16081
16076
  }
16082
16077
  this._renderStats(annotation, viewport, enabledElement, svgDrawingHelper);
16083
16078
  });
16084
16079
  return renderStatus;
16085
16080
  };
16086
- this._calculateCachedStats = (annotation, viewport, renderingEngine, enabledElement) => {
16081
+ this._calculateCachedStats = (annotation, viewport, renderingEngine, enabledElement, modalityUnitOptions) => {
16087
16082
  const data = annotation.data;
16088
16083
  const { cachedStats, polyline: points } = data;
16089
16084
  const targetIds = Object.keys(cachedStats);
@@ -16178,6 +16173,7 @@ class PlanarFreehandROITool extends base_AnnotationTool {
16178
16173
  const mean = sum / count;
16179
16174
  let stdDev = sumSquares / count - mean ** 2;
16180
16175
  stdDev = Math.sqrt(stdDev);
16176
+ const modalityUnit = getModalityUnit(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
16181
16177
  cachedStats[targetId] = {
16182
16178
  Modality: metadata.Modality,
16183
16179
  area,
@@ -16185,6 +16181,7 @@ class PlanarFreehandROITool extends base_AnnotationTool {
16185
16181
  max,
16186
16182
  stdDev,
16187
16183
  areaUnit: hasPixelSpacing ? 'mm' : 'px',
16184
+ modalityUnit,
16188
16185
  };
16189
16186
  }
16190
16187
  this.triggerAnnotationModified(annotation, enabledElement);
@@ -16194,9 +16191,7 @@ class PlanarFreehandROITool extends base_AnnotationTool {
16194
16191
  this._renderStats = (annotation, viewport, enabledElement, svgDrawingHelper) => {
16195
16192
  const data = annotation.data;
16196
16193
  const targetId = this.getTargetId(viewport);
16197
- const isPreScaled = isViewportPreScaled(viewport, targetId);
16198
- const isSuvScaled = this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId);
16199
- const textLines = this._getTextLines(data, targetId, isPreScaled, isSuvScaled);
16194
+ const textLines = this._getTextLines(data, targetId);
16200
16195
  if (!textLines || textLines.length === 0)
16201
16196
  return;
16202
16197
  const canvasCoordinates = data.polyline.map((p) => viewport.worldToCanvas(p));
@@ -16221,11 +16216,10 @@ class PlanarFreehandROITool extends base_AnnotationTool {
16221
16216
  bottomRight: viewport.canvasToWorld([left + width, top + height]),
16222
16217
  };
16223
16218
  };
16224
- this._getTextLines = (data, targetId, isPreScaled, isSuvScaled) => {
16219
+ this._getTextLines = (data, targetId) => {
16225
16220
  const cachedVolumeStats = data.cachedStats[targetId];
16226
- const { area, mean, stdDev, max, isEmptyArea, Modality, areaUnit } = cachedVolumeStats;
16221
+ const { area, mean, stdDev, max, isEmptyArea, areaUnit, modalityUnit } = cachedVolumeStats;
16227
16222
  const textLines = [];
16228
- const unit = getModalityUnit(Modality, isPreScaled, isSuvScaled);
16229
16223
  if (area) {
16230
16224
  const areaLine = isEmptyArea
16231
16225
  ? `Area: Oblique not supported`
@@ -16233,13 +16227,13 @@ class PlanarFreehandROITool extends base_AnnotationTool {
16233
16227
  textLines.push(areaLine);
16234
16228
  }
16235
16229
  if (mean) {
16236
- textLines.push(`Mean: ${mean.toFixed(2)} ${unit}`);
16230
+ textLines.push(`Mean: ${mean.toFixed(2)} ${modalityUnit}`);
16237
16231
  }
16238
16232
  if (max) {
16239
- textLines.push(`Max: ${max.toFixed(2)} ${unit}`);
16233
+ textLines.push(`Max: ${max.toFixed(2)} ${modalityUnit}`);
16240
16234
  }
16241
16235
  if (stdDev) {
16242
- textLines.push(`Std Dev: ${stdDev.toFixed(2)} ${unit}`);
16236
+ textLines.push(`Std Dev: ${stdDev.toFixed(2)} ${modalityUnit}`);
16243
16237
  }
16244
16238
  return textLines;
16245
16239
  };
@@ -22875,7 +22869,7 @@ function voiSyncCallback(synchronizerInstance, sourceViewport, targetViewport, v
22875
22869
  if (invertStateChanged) {
22876
22870
  tProperties.invert = invert;
22877
22871
  }
22878
- if (tViewport instanceof esm.VolumeViewport) {
22872
+ if (tViewport instanceof esm.BaseVolumeViewport) {
22879
22873
  tViewport.setProperties(tProperties, volumeId);
22880
22874
  }
22881
22875
  else if (tViewport instanceof esm.StackViewport) {
@@ -1524,8 +1524,8 @@ function getPanelModule(_ref) {
1524
1524
  /* harmony default export */ const src_getPanelModule = (getPanelModule);
1525
1525
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 321 modules
1526
1526
  var esm = __webpack_require__(57270);
1527
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 335 modules
1528
- var dist_esm = __webpack_require__(77331);
1527
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 336 modules
1528
+ var dist_esm = __webpack_require__(58389);
1529
1529
  ;// CONCATENATED MODULE: ../../../extensions/tmtv/src/utils/measurementServiceMappings/constants/supportedTools.js
1530
1530
  /* harmony default export */ const supportedTools = (['RectangleROIStartEndThreshold']);
1531
1531
  ;// CONCATENATED MODULE: ../../../extensions/tmtv/src/utils/measurementServiceMappings/utils/getSOPInstanceAttributes.js
@@ -21,8 +21,8 @@ var prop_types = __webpack_require__(60216);
21
21
  var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
22
22
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 321 modules
23
23
  var esm = __webpack_require__(57270);
24
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 335 modules
25
- var dist_esm = __webpack_require__(77331);
24
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 336 modules
25
+ var dist_esm = __webpack_require__(58389);
26
26
  // EXTERNAL MODULE: ../../core/src/index.ts + 102 modules
27
27
  var src = __webpack_require__(62771);
28
28
  // EXTERNAL MODULE: ../../ui/src/index.js + 452 modules
@@ -1297,12 +1297,8 @@ const OHIFCornerstoneViewport = /*#__PURE__*/react.memo(props => {
1297
1297
  return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
1298
1298
  className: "viewport-wrapper"
1299
1299
  }, /*#__PURE__*/react.createElement(index_esm/* default */.ZP, {
1300
- handleWidth: true,
1301
- handleHeight: true,
1302
- skipOnMount: true // Todo: make these configurable
1303
- ,
1304
- refreshMode: 'debounce',
1305
- refreshRate: 200 // transition amount in side panel
1300
+ refreshMode: "debounce",
1301
+ refreshRate: 50 // Wait 50 ms after last move to render
1306
1302
  ,
1307
1303
  onResize: onResize,
1308
1304
  targetRef: elementRef.current