@ohif/app 3.7.0-beta.55 → 3.7.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 (24) hide show
  1. package/dist/{654.bundle.1faeb72b7f4c02dcceef.js → 654.bundle.3abba365264f4711f921.js} +2 -2
  2. package/dist/{754.bundle.8a16fc8ad21fe00c2e15.js → 754.bundle.841c82498902c4cd88ea.js} +34 -19
  3. package/dist/{925.bundle.22f021ff05c44ae74f24.js → 925.bundle.7b06521fc75e0d3f71c3.js} +155 -74
  4. package/dist/{app.bundle.98c9c0231de30d41e2ae.js → app.bundle.bb732a8cf9d95d21a216.js} +5 -5
  5. package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
  6. package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
  7. package/dist/index.html +1 -1
  8. package/dist/sw.js +1 -1
  9. package/package.json +19 -19
  10. /package/dist/{12.bundle.ca7a24d331b606d9ca10.js → 12.bundle.e741119101225945c835.js} +0 -0
  11. /package/dist/{128.bundle.b31521216b013d9b9796.js → 128.bundle.e80b735699971b005885.js} +0 -0
  12. /package/dist/{150.bundle.2f14b8168308c78da2da.js → 150.bundle.2c011e962c6d475c7442.js} +0 -0
  13. /package/dist/{236.bundle.b0539dc4a0c77ec85c45.js → 236.bundle.8693957190d3d9ddd59f.js} +0 -0
  14. /package/dist/{281.bundle.39ac590a6fe5ecc651b8.js → 281.bundle.8835b7977a51b7a63ec7.js} +0 -0
  15. /package/dist/{30.bundle.67698f353903b49324b2.js → 30.bundle.cc6cafe4383b9f37f7d0.js} +0 -0
  16. /package/dist/{348.bundle.5943d65f9eb1b2e0ebb0.js → 348.bundle.df47a849cc50e8abb2b3.js} +0 -0
  17. /package/dist/{359.bundle.4d9bd4a4662735d644ee.js → 359.bundle.f40abbe2c1fdacc50df7.js} +0 -0
  18. /package/dist/{378.bundle.6409ef71b62857d24425.js → 378.bundle.0dcf61707e3d9ae292fb.js} +0 -0
  19. /package/dist/{410.bundle.aa6155752bc25f014971.js → 410.bundle.ff2f94091752d8645d6c.js} +0 -0
  20. /package/dist/{506.bundle.e29274fc7c7eaf63870b.js → 506.bundle.bdbd314b70f53033c15c.js} +0 -0
  21. /package/dist/{663.bundle.1a6e44438e332f9e33a0.js → 663.bundle.14466b60234a60a88029.js} +0 -0
  22. /package/dist/{678.bundle.b85860f14e6863b98b36.js → 678.bundle.a3889d4fa6da4a4c7aee.js} +0 -0
  23. /package/dist/{782.bundle.7f8f484e071edf4c064e.js → 782.bundle.846576b4fee92f11989f.js} +0 -0
  24. /package/dist/{814.bundle.5274d0603448396e0bb0.js → 814.bundle.1669289280e84d929eff.js} +0 -0
@@ -2211,8 +2211,8 @@ function ViewerLayout(_ref) {
2211
2211
  hotkeyDefinitions,
2212
2212
  hotkeyDefaults
2213
2213
  } = hotkeysManager;
2214
- const versionNumber = "3.7.0-beta.55";
2215
- const commitHash = "0f9b36906f6f67580879d76cb12f2a320883d4a9";
2214
+ const versionNumber = "3.7.0-beta.56";
2215
+ const commitHash = "b117a54aa10ee09e72e7675c6fb83cd8f49c26f7";
2216
2216
  const menuOptions = [{
2217
2217
  title: t('Header:About'),
2218
2218
  icon: 'info',
@@ -2526,8 +2526,9 @@ function getNextRuntimeId(context, symbol, max) {
2526
2526
  }
2527
2527
  else {
2528
2528
  n = 0;
2529
- if (i + 1 === idComponents.length)
2529
+ if (i + 1 === idComponents.length) {
2530
2530
  idComponents.push(0);
2531
+ }
2531
2532
  }
2532
2533
  idComponents[i] = n;
2533
2534
  }
@@ -28192,7 +28193,9 @@ class Transform {
28192
28193
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getVOILut.js
28193
28194
  function generateLinearVOILUT(windowWidth, windowCenter) {
28194
28195
  return function (modalityLutValue) {
28195
- return ((modalityLutValue - windowCenter) / windowWidth + 0.5) * 255.0;
28196
+ const value = ((modalityLutValue - (windowCenter - 0.5)) / (windowWidth - 1) + 0.5) *
28197
+ 255.0;
28198
+ return Math.min(Math.max(value, 0), 255);
28196
28199
  };
28197
28200
  }
28198
28201
  function generateNonLinearVOILUT(voiLUT) {
@@ -28416,8 +28419,9 @@ function getRenderCanvas(enabledElement, image, invalidated) {
28416
28419
  document.createElement('canvas');
28417
28420
  }
28418
28421
  const renderCanvas = enabledElement.renderingTools.renderCanvas;
28419
- if (enabledElement.viewport.voi.windowWidth === 255 &&
28420
- enabledElement.viewport.voi.windowCenter === 127 &&
28422
+ const { windowWidth, windowCenter } = enabledElement.viewport.voi;
28423
+ if ((windowWidth === 256 || windowWidth === 255) &&
28424
+ (windowCenter === 128 || windowCenter === 127) &&
28421
28425
  enabledElement.viewport.invert === false &&
28422
28426
  image.getCanvas &&
28423
28427
  image.getCanvas()) {
@@ -29827,12 +29831,14 @@ function getClosestStackImageIndexForPoint(point, viewport) {
29827
29831
  function calculateMinimalDistanceForStackViewport(point, viewport) {
29828
29832
  const imageIds = viewport.getImageIds();
29829
29833
  const currentImageIdIndex = viewport.getCurrentImageIdIndex();
29830
- if (imageIds.length === 0)
29834
+ if (imageIds.length === 0) {
29831
29835
  return null;
29836
+ }
29832
29837
  const getDistance = (imageId) => {
29833
29838
  const planeMetadata = getPlaneMetadata(imageId);
29834
- if (!planeMetadata)
29839
+ if (!planeMetadata) {
29835
29840
  return null;
29841
+ }
29836
29842
  const plane = planeEquation(planeMetadata.planeNormal, planeMetadata.imagePositionPatient);
29837
29843
  const distance = planeDistanceToPoint(plane, point);
29838
29844
  return distance;
@@ -29845,27 +29851,31 @@ function calculateMinimalDistanceForStackViewport(point, viewport) {
29845
29851
  for (let i = 0; i < higherImageIds.length; i++) {
29846
29852
  const id = higherImageIds[i];
29847
29853
  const distance = getDistance(id);
29848
- if (distance === null)
29854
+ if (distance === null) {
29849
29855
  continue;
29856
+ }
29850
29857
  if (distance <= closestStack.distance) {
29851
29858
  closestStack.distance = distance;
29852
29859
  closestStack.index = i + currentImageIdIndex + 1;
29853
29860
  }
29854
- else
29861
+ else {
29855
29862
  break;
29863
+ }
29856
29864
  }
29857
29865
  const lowerImageIds = imageIds.slice(0, currentImageIdIndex);
29858
29866
  for (let i = lowerImageIds.length - 1; i >= 0; i--) {
29859
29867
  const id = lowerImageIds[i];
29860
29868
  const distance = getDistance(id);
29861
- if (distance === null || distance === closestStack.distance)
29869
+ if (distance === null || distance === closestStack.distance) {
29862
29870
  continue;
29871
+ }
29863
29872
  if (distance < closestStack.distance) {
29864
29873
  closestStack.distance = distance;
29865
29874
  closestStack.index = i;
29866
29875
  }
29867
- else
29876
+ else {
29868
29877
  break;
29878
+ }
29869
29879
  }
29870
29880
  return closestStack.distance === Infinity ? null : closestStack;
29871
29881
  }
@@ -30318,13 +30328,13 @@ function planeDistanceToPoint(plane, point, signed = false) {
30318
30328
 
30319
30329
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/windowLevel.js
30320
30330
  function toWindowLevel(low, high) {
30321
- const windowWidth = Math.abs(low - high);
30322
- const windowCenter = low + windowWidth / 2;
30331
+ const windowWidth = Math.abs(high - low) + 1;
30332
+ const windowCenter = (low + high + 1) / 2;
30323
30333
  return { windowWidth, windowCenter };
30324
30334
  }
30325
30335
  function toLowHighRange(windowWidth, windowCenter) {
30326
- const lower = windowCenter - windowWidth / 2.0;
30327
- const upper = windowCenter + windowWidth / 2.0;
30336
+ const lower = windowCenter - 0.5 - (windowWidth - 1) / 2;
30337
+ const upper = windowCenter - 0.5 + (windowWidth - 1) / 2;
30328
30338
  return { lower, upper };
30329
30339
  }
30330
30340
 
@@ -46390,8 +46400,9 @@ class BaseVolumeViewport extends RenderingEngine_Viewport {
46390
46400
  const volumeActor = actorEntry.actor;
46391
46401
  const volumeId = actorEntry.uid;
46392
46402
  const volume = esm_cache.getVolume(volumeId);
46393
- if (!volume)
46403
+ if (!volume) {
46394
46404
  return null;
46405
+ }
46395
46406
  const cfun = volumeActor.getProperty().getRGBTransferFunction(0);
46396
46407
  const [lower, upper] = this.VOILUTFunction === 'SIGMOID'
46397
46408
  ? getVoiFromSigmoidRGBTransferFunction(cfun)
@@ -49816,8 +49827,9 @@ class RenderingEngine {
49816
49827
  this._animationFrameSet = false;
49817
49828
  this._animationFrameHandle = null;
49818
49829
  eventDetailArray.forEach((eventDetail) => {
49819
- if (!eventDetail?.element)
49830
+ if (!eventDetail?.element) {
49820
49831
  return;
49832
+ }
49821
49833
  triggerEvent(eventDetail.element, enums_Events.IMAGE_RENDERED, eventDetail);
49822
49834
  });
49823
49835
  };
@@ -50015,8 +50027,9 @@ class RenderingEngine {
50015
50027
  }
50016
50028
  _resizeUsingCustomResizeHandler(customRenderingViewports, keepCamera = true, immediate = true) {
50017
50029
  customRenderingViewports.forEach((vp) => {
50018
- if (typeof vp.resize === 'function')
50030
+ if (typeof vp.resize === 'function') {
50019
50031
  vp.resize();
50032
+ }
50020
50033
  });
50021
50034
  customRenderingViewports.forEach((vp) => {
50022
50035
  const prevCamera = vp.getCamera();
@@ -50566,12 +50579,14 @@ function get(dictionary, key) {
50566
50579
  }
50567
50580
  function isValidKey(key) {
50568
50581
  let last, current, previous;
50569
- if (typeof key !== 'string' || (last = key.length - 1) < 0)
50582
+ if (typeof key !== 'string' || (last = key.length - 1) < 0) {
50570
50583
  return false;
50584
+ }
50571
50585
  previous = -1;
50572
50586
  while ((current = key.indexOf('.', previous + 1)) >= 0) {
50573
- if (current - previous < 2 || current === last)
50587
+ if (current - previous < 2 || current === last) {
50574
50588
  return false;
50589
+ }
50575
50590
  previous = current;
50576
50591
  }
50577
50592
  return true;