@ohif/app 3.13.0-beta.109 → 3.13.0-beta.110

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 (41) hide show
  1. package/dist/{3454.bundle.b0670a82c99931af.js → 3454.bundle.ab8c63c1e3d46eab.js} +220 -1609
  2. package/dist/{379.bundle.cacf70fcef530540.js → 379.bundle.75b0fb722268f037.js} +48 -43
  3. package/dist/{3856.bundle.285a42d08540a74a.js → 3856.bundle.cc247da8b523d738.js} +1 -0
  4. package/dist/{8274.bundle.a206a2e68e796155.js → 3867.bundle.0d44986c6b0bde7d.js} +663 -1814
  5. package/dist/{414.bundle.5faf580251ecccc5.js → 414.bundle.adb184d0525a2638.js} +19 -6
  6. package/dist/{5989.bundle.6a8c5b7de30385c8.js → 5989.bundle.f3905a4493574e09.js} +1106 -804
  7. package/dist/{6577.bundle.f614df8efd7562f4.js → 6577.bundle.a3e571d5f84837ea.js} +47 -41
  8. package/dist/{8568.bundle.73ae0a60200a13e0.js → 7579.bundle.9369c6c58a5d6df5.js} +252 -94
  9. package/dist/{9789.bundle.19323edfc98a32b6.js → 7760.bundle.2b8057d52a6bb394.js} +3399 -389
  10. package/dist/{4456.bundle.2c6f4bb6de866b88.js → 8565.bundle.a7532bbc39906b3c.js} +50 -7
  11. package/dist/{9358.bundle.f28c3008748433d0.js → 9358.bundle.6e3ad740c6167bce.js} +2 -2
  12. package/dist/{app.bundle.02d944bdfbe7f56f.js → app.bundle.2ff5b8155b4cffb1.js} +2256 -820
  13. package/dist/{compute.bundle.11dbfc2d25ce8e89.js → compute.bundle.4922bddc18cacdbd.js} +3 -3
  14. package/dist/index.html +1 -1
  15. package/dist/{polySeg.bundle.485090724c5da16c.js → polySeg.bundle.c549b9f4bad23335.js} +3 -3
  16. package/dist/sw.js +1 -1
  17. package/package.json +6 -6
  18. /package/dist/{100.bundle.b53f62d2c9e9d217.js → 100.bundle.4cf7bd363eb335b7.js} +0 -0
  19. /package/dist/{1180.bundle.91d7318b888f49d4.js → 1180.bundle.b2242ffb09ba5148.js} +0 -0
  20. /package/dist/{1602.bundle.82eb27054f87c46e.js → 1602.bundle.82c5d8be3ed58042.js} +0 -0
  21. /package/dist/{2666.bundle.ba07d670ce889a55.js → 2666.bundle.ee1d4d309ce2ca82.js} +0 -0
  22. /package/dist/{2779.bundle.2fc7fefe1c4baa18.js → 2779.bundle.357c1cb7a7c97a12.js} +0 -0
  23. /package/dist/{3500.bundle.1f08c43b36ccb8e8.js → 3500.bundle.d30a0fe9f2c01716.js} +0 -0
  24. /package/dist/{3760.bundle.2585498b240d6a6a.js → 3760.bundle.954d6b9d91e32698.js} +0 -0
  25. /package/dist/{4556.bundle.ab9eb35c4157e756.js → 4556.bundle.15bb2344dda86bc2.js} +0 -0
  26. /package/dist/{4683.bundle.a76560d5378ac6eb.js → 4683.bundle.e8c02628855b8f06.js} +0 -0
  27. /package/dist/{4834.bundle.16feedbb89a48139.js → 4834.bundle.90a643174dce8dec.js} +0 -0
  28. /package/dist/{5189.bundle.ef9d707c4c3f31aa.js → 5189.bundle.5ef0d5922ba029ba.js} +0 -0
  29. /package/dist/{5696.bundle.4c4a7c97de60e8e9.js → 5696.bundle.3c85e69c1cc52c7d.js} +0 -0
  30. /package/dist/{5708.bundle.6f993438bc9cd1cb.js → 5708.bundle.f4015201f2af7141.js} +0 -0
  31. /package/dist/{6001.bundle.ea20503d32089842.js → 6001.bundle.27b3105664e9300e.js} +0 -0
  32. /package/dist/{6650.bundle.29f772517a82ee09.js → 6650.bundle.defab1d01ae0dcba.js} +0 -0
  33. /package/dist/{7231.bundle.e80ae4c82e76f9aa.js → 7231.bundle.791409f68df0de05.js} +0 -0
  34. /package/dist/{7248.bundle.759cfc9d51cb3ce1.js → 7248.bundle.f59ba717c33fe7a9.js} +0 -0
  35. /package/dist/{7295.bundle.669ec6678960bc9b.js → 7295.bundle.ed75fcf8ee66b10a.js} +0 -0
  36. /package/dist/{8423.bundle.6e8a9d8368e6deb6.js → 8423.bundle.22a629778b9e5e5f.js} +0 -0
  37. /package/dist/{8832.bundle.5f4cceed2a78111b.js → 8832.bundle.c550b761182eb3f6.js} +0 -0
  38. /package/dist/{9116.bundle.1b4a60b74cf6e76f.js → 9116.bundle.c002e22cfadc9396.js} +0 -0
  39. /package/dist/{9290.bundle.8d5e18c97f597402.js → 9290.bundle.a77e843b58fe5013.js} +0 -0
  40. /package/dist/{9415.bundle.23cdd187e22f3555.js → 9415.bundle.e1cfbd843dd3d63b.js} +0 -0
  41. /package/dist/{9437.bundle.91da0017f6cf6613.js → 9437.bundle.10d4785589703e3d.js} +0 -0
@@ -73,104 +73,16 @@ function convertMapperToNotSharedMapper(sharedMapper) {
73
73
  }
74
74
 
75
75
 
76
- },
77
- 30135(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
78
- __webpack_require__.d(__webpack_exports__, {
79
- Ay: () => (__rspack_default_export),
80
- Nw: () => (createCanvas),
81
- oI: () => (getOrCreateCanvas),
82
- zV: () => (updateCanvasSizeAndAspectRatio)
83
- });
84
- const VIEWPORT_ELEMENT = 'viewport-element';
85
- const CANVAS_CSS_CLASS = 'cornerstone-canvas';
86
- const EPSILON = 1e-4;
87
- let canvasCreator;
88
- function createCanvas(element, width = 512, height = 512) {
89
- const canvas = canvasCreator
90
- ? canvasCreator(width, height)
91
- : document.createElement('canvas');
92
- if (!element) {
93
- return canvas;
94
- }
95
- canvas.style.position = 'absolute';
96
- canvas.style.width = '100%';
97
- canvas.style.height = '100%';
98
- canvas.style.imageRendering = 'pixelated';
99
- canvas.classList.add(CANVAS_CSS_CLASS);
100
- element.appendChild(canvas);
101
- return canvas;
102
- }
103
- function createViewportElement(element) {
104
- const div = document.createElement('div');
105
- div.style.position = 'relative';
106
- div.style.width = '100%';
107
- div.style.height = '100%';
108
- div.style.overflow = 'hidden';
109
- div.classList.add(VIEWPORT_ELEMENT);
110
- element.appendChild(div);
111
- return div;
112
- }
113
- function setCanvasCreator(canvasCreatorArg) {
114
- canvasCreator = canvasCreatorArg;
115
- }
116
- function updateCanvasSizeAndAspectRatio(canvas, extentOrOffscreen) {
117
- if (extentOrOffscreen === undefined) {
118
- const devicePixelRatio = window.devicePixelRatio || 1;
119
- const rect = canvas.getBoundingClientRect();
120
- const w = Math.round(rect.width * devicePixelRatio);
121
- const h = Math.round(rect.height * devicePixelRatio);
122
- if (w > 0 && h > 0) {
123
- canvas.width = w;
124
- canvas.height = h;
125
- canvas.style.aspectRatio = `${w} / ${h}`;
126
- }
127
- return undefined;
128
- }
129
- const { width: targetW, height: targetH } = extentOrOffscreen;
130
- if (targetW < 1 || targetH < 1) {
131
- return false;
132
- }
133
- const needsUpdate = canvas.width !== targetW || canvas.height !== targetH;
134
- if (needsUpdate) {
135
- canvas.width = targetW;
136
- canvas.height = targetH;
137
- canvas.style.aspectRatio = `${targetW} / ${targetH}`;
138
- return true;
139
- }
140
- return false;
141
- }
142
- function getOrCreateCanvas(element) {
143
- const canvasSelector = `canvas.${CANVAS_CSS_CLASS}`;
144
- const viewportElement = `div.${VIEWPORT_ELEMENT}`;
145
- const internalDiv = element.querySelector(viewportElement) || createViewportElement(element);
146
- const existingCanvas = internalDiv.querySelector(canvasSelector);
147
- if (existingCanvas) {
148
- return existingCanvas;
149
- }
150
- const canvas = createCanvas(internalDiv);
151
- const rect = internalDiv.getBoundingClientRect();
152
- const devicePixelRatio = window.devicePixelRatio || 1;
153
- const width = Math.ceil(rect.width * devicePixelRatio);
154
- const height = Math.ceil(rect.height * devicePixelRatio);
155
- if (width > 0 && height > 0) {
156
- canvas.width = width;
157
- canvas.height = height;
158
- canvas.style.aspectRatio = `${width} / ${height}`;
159
- }
160
- return canvas;
161
- }
162
- /* export default */ const __rspack_default_export = (getOrCreateCanvas);
163
-
164
-
165
76
  },
166
77
  48605(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
167
78
 
168
79
  // EXPORTS
169
80
  __webpack_require__.d(__webpack_exports__, {
170
- oI: () => (/* reexport */ getOrCreateCanvas/* .getOrCreateCanvas */.oI)
81
+ oI: () => (/* reexport */ getOrCreateCanvas/* .getOrCreateCanvas */.oI),
82
+ A7: () => (/* reexport */ setVolumesForViewports/* ["default"] */.A)
171
83
  });
172
84
 
173
- // UNUSED EXPORTS: EPSILON, addImageSlicesToViewports, addVolumesToViewports, createCanvas, createViewportElement, createVolumeActor, createVolumeMapper, getProjectionScaleMatrix, setCanvasCreator, setVolumesForViewports, updateCanvasSizeAndAspectRatio, volumeNewImageEventDispatcher
85
+ // UNUSED EXPORTS: EPSILON, addImageSlicesToViewports, addVolumesToViewports, createCanvas, createViewportElement, createVolumeActor, createVolumeMapper, getProjectionScaleMatrix, setCanvasCreator, updateCanvasSizeAndAspectRatio, volumeNewImageEventDispatcher
174
86
 
175
87
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/createVolumeActor.js + 2 modules
176
88
  var createVolumeActor = __webpack_require__(87584);
@@ -220,17 +132,6 @@ var getProjectionScaleMatrix = __webpack_require__(63392);
220
132
 
221
133
 
222
134
 
223
- },
224
- 67466() {
225
- function isVolumeCompatible(viewport) {
226
- return Boolean(viewport &&
227
- typeof viewport.setVolumes ===
228
- 'function' &&
229
- typeof viewport.addVolumes === 'function');
230
- }
231
- /* unused export default */ var __rspack_default_export = ((/* unused pure expression or super */ null && (isVolumeCompatible)));
232
-
233
-
234
135
  },
235
136
  50584(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
236
137
  /* import */ var _cache__rspack_import_0 = __webpack_require__(49038);
@@ -642,8 +543,8 @@ var ProgressiveRetrieveImages = __webpack_require__(35515);
642
543
  var decimatedVolumeLoader = __webpack_require__(34866);
643
544
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/types/index.js + 1 modules
644
545
  var types = __webpack_require__(52470);
645
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 14 modules
646
- var utilities = __webpack_require__(54565);
546
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 1 modules
547
+ var utilities = __webpack_require__(81180);
647
548
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/triggerEvent.js
648
549
  var triggerEvent = __webpack_require__(69372);
649
550
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/convertColorArrayToRgbString.js
@@ -745,6 +646,7 @@ const LegacyVolumeViewport3D = (/* unused pure expression or super */ null && (V
745
646
  80068(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
746
647
  __webpack_require__.d(__webpack_exports__, {
747
648
  createAndCacheDerivedImages: () => (createAndCacheDerivedImages),
649
+ createAndCacheLocalImage: () => (createAndCacheLocalImage),
748
650
  loadAndCacheImage: () => (loadAndCacheImage),
749
651
  loadImage: () => (loadImage)
750
652
  });
@@ -1151,6 +1053,8 @@ __webpack_require__.d(__webpack_exports__, {
1151
1053
  createAndCacheDerivedLabelmapVolume: () => (createAndCacheDerivedLabelmapVolume),
1152
1054
  createAndCacheVolume: () => (createAndCacheVolume),
1153
1055
  createAndCacheVolumeFromImagesSync: () => (createAndCacheVolumeFromImagesSync),
1056
+ createLocalVolume: () => (createLocalVolume),
1057
+ getUnknownVolumeLoaderSchema: () => (getUnknownVolumeLoaderSchema),
1154
1058
  getVolumeLoaderSchemes: () => (getVolumeLoaderSchemes),
1155
1059
  loadVolume: () => (loadVolume)
1156
1060
  });
@@ -1312,7 +1216,7 @@ function createAndCacheVolumeFromImagesSync(volumeId, imageIds) {
1312
1216
  }
1313
1217
  function createLocalVolume(volumeId, options = {}) {
1314
1218
  const { metadata, dimensions, spacing, origin, direction, scalarData, referencedImageIds, referencedVolumeId, targetBuffer, preventCache = false, } = options;
1315
- const cachedVolume = cache.getVolume(volumeId);
1219
+ const cachedVolume = _cache_cache__rspack_import_2/* ["default"].getVolume */.Ay.getVolume(volumeId);
1316
1220
  if (cachedVolume) {
1317
1221
  return cachedVolume;
1318
1222
  }
@@ -1335,7 +1239,7 @@ function createLocalVolume(volumeId, options = {}) {
1335
1239
  byteLength = totalNumberOfVoxels * 4;
1336
1240
  break;
1337
1241
  }
1338
- const isCacheable = cache.isCacheable(byteLength);
1242
+ const isCacheable = _cache_cache__rspack_import_2/* ["default"].isCacheable */.Ay.isCacheable(byteLength);
1339
1243
  if (!isCacheable) {
1340
1244
  throw new Error(`Cannot created derived volume: Volume with id ${volumeId} is not cacheable.`);
1341
1245
  }
@@ -1345,7 +1249,7 @@ function createLocalVolume(volumeId, options = {}) {
1345
1249
  const imageId = `${volumeId}_slice_${i}`;
1346
1250
  imageIds.push(imageId);
1347
1251
  const sliceData = scalarData.subarray(i * sliceLength, (i + 1) * sliceLength);
1348
- const derivedImage = createAndCacheLocalImage(imageId, {
1252
+ const derivedImage = (0,_imageLoader__rspack_import_9.createAndCacheLocalImage)(imageId, {
1349
1253
  scalarData: sliceData,
1350
1254
  dimensions: [dimensions[0], dimensions[1]],
1351
1255
  spacing: [spacing[0], spacing[1]],
@@ -1356,9 +1260,9 @@ function createLocalVolume(volumeId, options = {}) {
1356
1260
  });
1357
1261
  derivedImages.push(derivedImage);
1358
1262
  }
1359
- const imageVolume = new ImageVolume({
1263
+ const imageVolume = new _cache_classes_ImageVolume__rspack_import_1/* .ImageVolume */.Q({
1360
1264
  volumeId,
1361
- metadata: deepClone(metadata),
1265
+ metadata: (0,_utilities_deepClone__rspack_import_6/* .deepClone */.G)(metadata),
1362
1266
  dimensions: [dimensions[0], dimensions[1], dimensions[2]],
1363
1267
  spacing,
1364
1268
  origin,
@@ -1368,7 +1272,7 @@ function createLocalVolume(volumeId, options = {}) {
1368
1272
  referencedVolumeId,
1369
1273
  referencedImageIds,
1370
1274
  });
1371
- const voxelManager = VoxelManager.createImageVolumeVoxelManager({
1275
+ const voxelManager = _utilities_VoxelManager__rspack_import_8/* ["default"].createImageVolumeVoxelManager */.A.createImageVolumeVoxelManager({
1372
1276
  imageIds,
1373
1277
  dimensions,
1374
1278
  numberOfComponents: 1,
@@ -1376,7 +1280,7 @@ function createLocalVolume(volumeId, options = {}) {
1376
1280
  });
1377
1281
  imageVolume.voxelManager = voxelManager;
1378
1282
  if (!preventCache) {
1379
- cache.putVolumeSync(volumeId, imageVolume);
1283
+ _cache_cache__rspack_import_2/* ["default"].putVolumeSync */.Ay.putVolumeSync(volumeId, imageVolume);
1380
1284
  }
1381
1285
  return imageVolume;
1382
1286
  }
@@ -1412,233 +1316,160 @@ function createLocalLabelmapVolume(options, volumeId, preventCache = false) {
1412
1316
 
1413
1317
 
1414
1318
  },
1415
- 84061(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
1416
- __webpack_require__.d(__webpack_exports__, {
1417
- q: () => (clamp)
1418
- });
1419
- function clamp(value, min, max) {
1420
- return Math.max(min, Math.min(max, value));
1421
- }
1422
-
1423
-
1424
-
1425
- },
1426
- 25534() {
1427
- function clip(val, low, high) {
1428
- return Math.min(Math.max(low, val), high);
1429
- }
1430
- function clipToBox(point, box) {
1431
- point.x = clip(point.x, 0, box.width);
1432
- point.y = clip(point.y, 0, box.height);
1433
- }
1434
- /* unused export default */ var __rspack_default_export = ((/* unused pure expression or super */ null && (clip)));
1435
-
1436
-
1437
- },
1438
- 54565(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
1319
+ 81180(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
1320
+ // ESM COMPAT FLAG
1321
+ __webpack_require__.r(__webpack_exports__);
1439
1322
 
1440
1323
  // EXPORTS
1441
1324
  __webpack_require__.d(__webpack_exports__, {
1325
+ ECGUtilities: () => (/* reexport */ ECGUtilities),
1326
+ FrameRange: () => (/* reexport */ FrameRange/* ["default"] */.A),
1442
1327
  HistoryMemo: () => (/* reexport */ historyMemo),
1443
1328
  PointsManager: () => (/* reexport */ PointsManager/* ["default"] */.A),
1329
+ ProgressiveIterator: () => (/* reexport */ ProgressiveIterator/* ["default"] */.A),
1444
1330
  RLEVoxelMap: () => (/* reexport */ RLEVoxelMap/* ["default"] */.A),
1331
+ VideoUtilities: () => (/* reexport */ VideoUtilities),
1445
1332
  VoxelManager: () => (/* reexport */ VoxelManager/* ["default"] */.A),
1333
+ WSIUtilities: () => (/* reexport */ WSIUtilities),
1334
+ actorIsA: () => (/* reexport */ actorCheck/* .actorIsA */.N),
1335
+ applyPreset: () => (/* reexport */ applyPreset/* ["default"] */.A),
1336
+ asArray: () => (/* reexport */ asArray/* .asArray */._),
1337
+ autoLoad: () => (/* reexport */ autoLoad/* ["default"] */.A),
1338
+ buildMetadata: () => (/* reexport */ buildMetadata/* .buildMetadata */.KP),
1339
+ calculateNeighborhoodStats: () => (/* reexport */ calculateNeighborhoodStats/* .calculateNeighborhoodStats */.c),
1340
+ calculateRadiographicPixelSpacing: () => (/* reexport */ getPixelSpacingInformation/* .calculateRadiographicPixelSpacing */.VD),
1341
+ calculateSpacingBetweenImageIds: () => (/* reexport */ calculateSpacingBetweenImageIds/* ["default"] */.A),
1342
+ calculateViewportsSpatialRegistration: () => (/* reexport */ calculateViewportsSpatialRegistration/* ["default"] */.A),
1343
+ calibratedPixelSpacingMetadataProvider: () => (/* reexport */ calibratedPixelSpacingMetadataProvider/* ["default"] */.A),
1344
+ clamp: () => (/* reexport */ clamp/* ["default"] */.A),
1345
+ clip: () => (/* reexport */ clip/* ["default"] */.Ay),
1446
1346
  clonePoint3: () => (/* reexport */ clonePoint3/* ["default"] */.A),
1347
+ color: () => (/* reexport */ color),
1348
+ colormap: () => (/* reexport */ colormap),
1349
+ convertColorArrayToRgbString: () => (/* reexport */ convertColorArrayToRgbString/* .convertColorArrayToRgbString */.J),
1350
+ convertStackToVolumeViewport: () => (/* reexport */ convertStackToVolumeViewport/* .convertStackToVolumeViewport */.h),
1351
+ convertToGrayscale: () => (/* reexport */ convertToGrayscale/* ["default"] */.A),
1352
+ convertVolumeToStackViewport: () => (/* reexport */ convertVolumeToStackViewport/* .convertVolumeToStackViewport */.n),
1353
+ createLinearRGBTransferFunction: () => (/* reexport */ createLinearRGBTransferFunction/* ["default"] */.A),
1354
+ createSigmoidRGBTransferFunction: () => (/* reexport */ createSigmoidRGBTransferFunction/* ["default"] */.A),
1355
+ createSubVolume: () => (/* reexport */ createSubVolume/* ["default"] */.A),
1356
+ decimate: () => (/* reexport */ decimate/* ["default"] */.A),
1447
1357
  deepClone: () => (/* reexport */ deepClone/* .deepClone */.G),
1448
1358
  deepEqual: () => (/* reexport */ deepEqual/* .deepEqual */.b),
1449
1359
  deepMerge: () => (/* reexport */ deepMerge/* ["default"] */.A),
1360
+ eventListener: () => (/* reexport */ eventListener_namespaceObject),
1361
+ fnv1aHash: () => (/* reexport */ fnv1aHash/* ["default"] */.A),
1362
+ generateFrameImageId: () => (/* reexport */ splitImageIdsBy4DTags/* .generateFrameImageId */.Hf),
1363
+ generateVolumePropsFromImageIds: () => (/* reexport */ generateVolumePropsFromImageIds/* .generateVolumePropsFromImageIds */.D),
1364
+ genericMetadataProvider: () => (/* reexport */ genericMetadataProvider/* ["default"] */.A),
1365
+ genericViewportDisplaySetMetadataProvider: () => (/* reexport */ genericViewportDisplaySetMetadataProvider/* ["default"] */.A),
1366
+ getAcquisitionPlaneOrientation: () => (/* reexport */ getAcquisitionPlaneOrientation/* ["default"] */.A),
1367
+ getBufferConfiguration: () => (/* reexport */ getBufferConfiguration/* .getBufferConfiguration */.h),
1450
1368
  getClosestImageId: () => (/* reexport */ getClosestImageId/* ["default"] */.A),
1451
1369
  getClosestStackImageIndexForPoint: () => (/* reexport */ getClosestStackImageIndexForPoint/* ["default"] */.A),
1370
+ getCubeSizeInView: () => (/* reexport */ getPlaneCubeIntersectionDimensions/* .getCubeSizeInView */.H),
1371
+ getCurrentVolumeViewportSlice: () => (/* reexport */ getCurrentVolumeViewportSlice/* ["default"] */.A),
1372
+ getDynamicVolumeInfo: () => (/* reexport */ getDynamicVolumeInfo/* ["default"] */.A),
1373
+ getERMF: () => (/* reexport */ getPixelSpacingInformation/* .getERMF */.lJ),
1452
1374
  getImageDataMetadata: () => (/* reexport */ getImageDataMetadata/* .getImageDataMetadata */.T),
1375
+ getImageLegacy: () => (/* reexport */ getImageLegacy/* ["default"] */.A),
1376
+ getImageSliceDataForVolumeViewport: () => (/* reexport */ getImageSliceDataForVolumeViewport/* ["default"] */.A),
1377
+ getMinMax: () => (/* reexport */ getMinMax/* ["default"] */.A),
1453
1378
  getNormalizedAspectRatio: () => (/* reexport */ getNormalizedAspectRatio/* .getNormalizedAspectRatio */.x),
1379
+ getPixelSpacingInformation: () => (/* reexport */ getPixelSpacingInformation/* .getPixelSpacingInformation */.Cc),
1454
1380
  getRandomSampleFromArray: () => (/* reexport */ getRandomSampleFromArray/* .getRandomSampleFromArray */.p),
1455
1381
  getRuntimeId: () => (/* reexport */ getRuntimeId/* ["default"] */.A),
1382
+ getScalingDescriptor: () => (/* binding */ utilities_getScalingDescriptor),
1383
+ getScalingParameters: () => (/* reexport */ getScalingParameters/* ["default"] */.A),
1384
+ getSliceRange: () => (/* reexport */ getSliceRange/* ["default"] */.A),
1456
1385
  getSpacingInNormalDirection: () => (/* reexport */ getSpacingInNormalDirection/* ["default"] */.A),
1457
1386
  getTargetVolumeAndSpacingInNormalDir: () => (/* reexport */ getTargetVolumeAndSpacingInNormalDir/* ["default"] */.A),
1387
+ getVOIRangeFromWindowLevel: () => (/* reexport */ getVOIRangeFromWindowLevel/* ["default"] */.A),
1388
+ getViewportContentMode: () => (/* reexport */ viewportCapabilities/* .getViewportContentMode */.nH),
1389
+ getViewportImageCornersInWorld: () => (/* reexport */ getViewportImageCornersInWorld/* ["default"] */.A),
1390
+ getViewportImageIds: () => (/* reexport */ getViewportImageIds/* ["default"] */.A),
1391
+ getViewportModality: () => (/* binding */ utilities_getViewportModality),
1458
1392
  getViewportsWithImageURI: () => (/* reexport */ getViewportsWithImageURI/* ["default"] */.A),
1459
1393
  getViewportsWithVolumeId: () => (/* reexport */ getViewportsWithVolumeId/* ["default"] */.A),
1394
+ getVoiFromSigmoidRGBTransferFunction: () => (/* reexport */ getVoiFromSigmoidRGBTransferFunction/* ["default"] */.A),
1395
+ getVolumeActorCorners: () => (/* reexport */ getVolumeActorCorners/* ["default"] */.A),
1396
+ getVolumeDirectionVectors: () => (/* reexport */ getVolumeDirectionVectors/* ["default"] */.A),
1460
1397
  getVolumeId: () => (/* reexport */ getVolumeId/* .getVolumeId */.A),
1398
+ getVolumeSliceRangeInfo: () => (/* reexport */ getVolumeSliceRangeInfo/* ["default"] */.A),
1399
+ getVolumeViewReferenceId: () => (/* reexport */ getVolumeViewReferenceId/* ["default"] */.A),
1400
+ getVolumeViewportScrollInfo: () => (/* reexport */ getVolumeViewportScrollInfo/* ["default"] */.A),
1401
+ getVolumeViewportsContainingSameVolumes: () => (/* reexport */ getVolumeViewportsContainingSameVolumes/* ["default"] */.A),
1402
+ handleMultiframe4D: () => (/* reexport */ splitImageIdsBy4DTags/* .handleMultiframe4D */.FM),
1403
+ hasFloatScalingParameters: () => (/* reexport */ hasFloatScalingParameters/* .hasFloatScalingParameters */.a),
1404
+ hasNaNValues: () => (/* reexport */ hasNaNValues/* ["default"] */.A),
1405
+ hasOwn: () => (/* reexport */ hasOwn/* ["default"] */.A),
1461
1406
  imageIdToURI: () => (/* reexport */ imageIdToURI/* ["default"] */.A),
1407
+ imageRetrieveMetadataProvider: () => (/* reexport */ imageRetrieveMetadataProvider/* ["default"] */.A),
1408
+ imageToWorldCoords: () => (/* reexport */ imageToWorldCoords/* ["default"] */.A),
1462
1409
  indexWithinDimensions: () => (/* reexport */ indexWithinDimensions/* ["default"] */.A),
1410
+ invertRgbTransferFunction: () => (/* reexport */ invertRgbTransferFunction/* ["default"] */.A),
1463
1411
  isEqual: () => (/* reexport */ isEqual/* .isEqual */.n4),
1412
+ isEqualAbs: () => (/* reexport */ isEqual/* .isEqualAbs */.Ph),
1413
+ isEqualNegative: () => (/* reexport */ isEqual/* .isEqualNegative */.WC),
1414
+ isGenericViewport: () => (/* reexport */ viewportCapabilities/* .isGenericViewport */.oX),
1415
+ isImageActor: () => (/* reexport */ actorCheck/* .isImageActor */.e),
1464
1416
  isNumber: () => (/* reexport */ isEqual/* .isNumber */.Et),
1417
+ isOpposite: () => (/* reexport */ isOpposite/* ["default"] */.A),
1418
+ isPTPrescaledWithSUV: () => (/* reexport */ isPTPrescaledWithSUV/* ["default"] */.A),
1465
1419
  isValidVolume: () => (/* reexport */ isValidVolume/* .isValidVolume */.p),
1420
+ isVideoTransferSyntax: () => (/* reexport */ isVideoTransferSyntax/* ["default"] */.A),
1421
+ jumpToSlice: () => (/* reexport */ jumpToSlice/* .jumpToSlice */.e),
1422
+ loadImageToCanvas: () => (/* reexport */ loadImageToCanvas/* ["default"] */.A),
1423
+ logger: () => (/* reexport */ logger),
1424
+ makeVolumeMetadata: () => (/* reexport */ makeVolumeMetadata/* ["default"] */.A),
1425
+ planar: () => (/* reexport */ planar),
1466
1426
  pointInShapeCallback: () => (/* reexport */ pointInShapeCallback/* .pointInShapeCallback */.ii),
1427
+ renderToCanvasCPU: () => (/* reexport */ renderToCanvasCPU/* ["default"] */.A),
1428
+ renderToCanvasGPU: () => (/* reexport */ renderToCanvasGPU/* ["default"] */.A),
1429
+ resolveGenericViewportVolumeId: () => (/* reexport */ resolveGenericViewportVolumeId/* .resolveGenericViewportVolumeId */.d),
1430
+ rotateToViewCoordinates: () => (/* reexport */ rotateToViewCoordinates/* .rotateToViewCoordinates */.P),
1467
1431
  roundNumber: () => (/* reexport */ roundNumber/* ["default"] */.A),
1468
1432
  roundToPrecision: () => (/* reexport */ roundNumber/* .roundToPrecision */.C),
1469
- transformIndexToWorld: () => (/* reexport */ utilities_transformIndexToWorld/* ["default"] */.A),
1470
- transformWorldToIndex: () => (/* reexport */ utilities_transformWorldToIndex/* ["default"] */.A),
1433
+ scaleArray: () => (/* reexport */ scaleArray/* ["default"] */.A),
1434
+ scaleRgbTransferFunction: () => (/* reexport */ scaleRgbTransferFunction/* ["default"] */.A),
1435
+ scroll: () => (/* reexport */ utilities_scroll/* ["default"] */.A),
1436
+ snapFocalPointToSlice: () => (/* reexport */ snapFocalPointToSlice/* ["default"] */.A),
1437
+ sortImageIdsAndGetSpacing: () => (/* reexport */ sortImageIdsAndGetSpacing/* ["default"] */.A),
1438
+ spatialRegistrationMetadataProvider: () => (/* reexport */ spatialRegistrationMetadataProvider/* ["default"] */.A),
1439
+ splitImageIdsBy4DTags: () => (/* reexport */ splitImageIdsBy4DTags/* ["default"] */.Ay),
1440
+ transferFunctionUtils: () => (/* reexport */ transferFunctionUtils),
1441
+ transformIndexToWorld: () => (/* reexport */ transformIndexToWorld/* ["default"] */.A),
1442
+ transformWorldToIndex: () => (/* reexport */ transformWorldToIndex/* ["default"] */.A),
1443
+ transformWorldToIndexContinuous: () => (/* reexport */ transformWorldToIndex/* .transformWorldToIndexContinuous */.p),
1471
1444
  triggerEvent: () => (/* reexport */ triggerEvent/* ["default"] */.A),
1472
- uuidv4: () => (/* reexport */ utilities_uuidv4/* ["default"] */.A)
1445
+ updatePlaneRestriction: () => (/* reexport */ updatePlaneRestriction/* .updatePlaneRestriction */.O),
1446
+ updateVTKImageDataWithCornerstoneImage: () => (/* reexport */ updateVTKImageDataWithCornerstoneImage/* .updateVTKImageDataWithCornerstoneImage */.J),
1447
+ uuidv4: () => (/* reexport */ uuidv4/* ["default"] */.A),
1448
+ viewportIsInStackMode: () => (/* reexport */ viewportCapabilities/* .viewportIsInStackMode */.NL),
1449
+ viewportIsInVolumeMode: () => (/* reexport */ viewportCapabilities/* .viewportIsInVolumeMode */.zb),
1450
+ viewportSupportsDisplaySetPresentation: () => (/* reexport */ viewportCapabilities/* .viewportSupportsDisplaySetPresentation */.Tf),
1451
+ viewportSupportsImageSlices: () => (/* reexport */ viewportCapabilities/* .viewportSupportsImageSlices */.hz),
1452
+ viewportSupportsStackCalibration: () => (/* reexport */ viewportCapabilities/* .viewportSupportsStackCalibration */.Xu),
1453
+ viewportSupportsStackCompatibility: () => (/* reexport */ viewportCapabilities/* .viewportSupportsStackCompatibility */.T),
1454
+ viewportSupportsVolumeActors: () => (/* reexport */ viewportCapabilities/* .viewportSupportsVolumeActors */.$O),
1455
+ viewportSupportsVolumeCompatibility: () => (/* reexport */ viewportCapabilities/* .viewportSupportsVolumeCompatibility */.rw),
1456
+ viewportSupportsVolumeId: () => (/* reexport */ viewportCapabilities/* .viewportSupportsVolumeId */.Uv),
1457
+ viewportSupportsVolumeURI: () => (/* reexport */ viewportCapabilities/* .viewportSupportsVolumeURI */.vP),
1458
+ windowLevel: () => (/* reexport */ windowLevel),
1459
+ worldToImageCoords: () => (/* reexport */ worldToImageCoords/* ["default"] */.A)
1473
1460
  });
1474
-
1475
- // UNUSED EXPORTS: ECGUtilities, FrameRange, ProgressiveIterator, VideoUtilities, WSIUtilities, actorIsA, applyPreset, asArray, autoLoad, buildMetadata, calculateNeighborhoodStats, calculateRadiographicPixelSpacing, calculateSpacingBetweenImageIds, calculateViewportsSpatialRegistration, calibratedPixelSpacingMetadataProvider, clamp, clip, color, colormap, convertColorArrayToRgbString, convertStackToVolumeViewport, convertToGrayscale, convertVolumeToStackViewport, createLinearRGBTransferFunction, createSigmoidRGBTransferFunction, createSubVolume, decimate, eventListener, fnv1aHash, generateFrameImageId, generateVolumePropsFromImageIds, genericMetadataProvider, genericViewportDataSetMetadataProvider, getAcquisitionPlaneOrientation, getBufferConfiguration, getCubeSizeInView, getCurrentVolumeViewportSlice, getDynamicVolumeInfo, getERMF, getImageLegacy, getImageSliceDataForVolumeViewport, getMinMax, getPixelSpacingInformation, getScalingParameters, getSliceRange, getVOIRangeFromWindowLevel, getViewportImageCornersInWorld, getViewportImageIds, getViewportModality, getVoiFromSigmoidRGBTransferFunction, getVolumeActorCorners, getVolumeDirectionVectors, getVolumeSliceRangeInfo, getVolumeViewReferenceId, getVolumeViewportScrollInfo, getVolumeViewportsContainingSameVolumes, handleMultiframe4D, hasFloatScalingParameters, hasNaNValues, hasOwn, imageRetrieveMetadataProvider, imageToWorldCoords, invertRgbTransferFunction, isEqualAbs, isEqualNegative, isImageActor, isOpposite, isPTPrescaledWithSUV, isVideoTransferSyntax, jumpToSlice, loadImageToCanvas, logger, makeVolumeMetadata, planar, renderToCanvasCPU, renderToCanvasGPU, rotateToViewCoordinates, scaleArray, scaleRgbTransferFunction, scroll, snapFocalPointToSlice, sortImageIdsAndGetSpacing, spatialRegistrationMetadataProvider, splitImageIdsBy4DTags, transferFunctionUtils, transformWorldToIndexContinuous, updatePlaneRestriction, updateVTKImageDataWithCornerstoneImage, viewportSupportsImageSlices, viewportSupportsStackCalibration, viewportSupportsStackCompatibility, viewportSupportsVolumeActors, viewportSupportsVolumeCompatibility, viewportSupportsVolumeId, viewportSupportsVolumeURI, windowLevel, worldToImageCoords
1476
-
1477
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/eventListener/TargetEventListeners.js
1478
- var TargetEventListeners_EventListenerPhases;
1479
- (function (EventListenerPhases) {
1480
- EventListenerPhases[EventListenerPhases["None"] = 0] = "None";
1481
- EventListenerPhases[EventListenerPhases["Capture"] = 1] = "Capture";
1482
- EventListenerPhases[EventListenerPhases["Bubble"] = 2] = "Bubble";
1483
- })(TargetEventListeners_EventListenerPhases || (TargetEventListeners_EventListenerPhases = {}));
1484
- class TargetEventListeners_TargetEventListeners {
1485
- constructor(target) {
1486
- this._eventListeners = new Map();
1487
- this._children = new Map();
1488
- this._target = target;
1489
- }
1490
- get isEmpty() {
1491
- return this._eventListeners.size === 0 && this._children.size === 0;
1492
- }
1493
- addEventListener(type, callback, options) {
1494
- const dotIndex = type.indexOf('.');
1495
- const isNamespace = dotIndex !== -1;
1496
- if (isNamespace) {
1497
- const namespaceToken = type.substring(0, dotIndex);
1498
- let childElementEventListener = this._children.get(namespaceToken);
1499
- if (!childElementEventListener) {
1500
- childElementEventListener = new TargetEventListeners_TargetEventListeners(this._target);
1501
- this._children.set(namespaceToken, childElementEventListener);
1502
- }
1503
- type = type.substring(dotIndex + 1);
1504
- childElementEventListener.addEventListener(type, callback, options);
1505
- }
1506
- else {
1507
- this._addEventListener(type, callback, options);
1508
- }
1509
- }
1510
- removeEventListener(type, callback, options) {
1511
- const dotIndex = type.indexOf('.');
1512
- const isNamespace = dotIndex !== -1;
1513
- if (isNamespace) {
1514
- const namespaceToken = type.substring(0, dotIndex);
1515
- const childElementEventListener = this._children.get(namespaceToken);
1516
- if (!childElementEventListener) {
1517
- return;
1518
- }
1519
- type = type.substring(dotIndex + 1);
1520
- childElementEventListener.removeEventListener(type, callback, options);
1521
- if (childElementEventListener.isEmpty) {
1522
- this._children.delete(namespaceToken);
1523
- }
1524
- }
1525
- else {
1526
- this._removeEventListener(type, callback, options);
1527
- }
1528
- }
1529
- reset() {
1530
- Array.from(this._children.entries()).forEach(([namespace, child]) => {
1531
- child.reset();
1532
- if (child.isEmpty) {
1533
- this._children.delete(namespace);
1534
- }
1535
- else {
1536
- throw new Error('Child is not empty and cannot be removed');
1537
- }
1538
- });
1539
- this._unregisterAllEvents();
1540
- }
1541
- _addEventListener(type, callback, options) {
1542
- let listenersMap = this._eventListeners.get(type);
1543
- if (!listenersMap) {
1544
- listenersMap = new Map();
1545
- this._eventListeners.set(type, listenersMap);
1546
- }
1547
- const useCapture = options?.capture ?? false;
1548
- const listenerPhase = useCapture
1549
- ? TargetEventListeners_EventListenerPhases.Capture
1550
- : TargetEventListeners_EventListenerPhases.Bubble;
1551
- const registeredPhases = listenersMap.get(callback) ?? TargetEventListeners_EventListenerPhases.None;
1552
- if (registeredPhases & listenerPhase) {
1553
- console.warn('A listener is already registered for this phase');
1554
- return;
1555
- }
1556
- listenersMap.set(callback, registeredPhases | listenerPhase);
1557
- this._target.addEventListener(type, callback, options);
1558
- }
1559
- _removeEventListener(type, callback, options) {
1560
- const useCapture = options?.capture ?? false;
1561
- const listenerPhase = useCapture
1562
- ? TargetEventListeners_EventListenerPhases.Capture
1563
- : TargetEventListeners_EventListenerPhases.Bubble;
1564
- const listenersMap = this._eventListeners.get(type);
1565
- if (!listenersMap) {
1566
- return;
1567
- }
1568
- const callbacks = callback ? [callback] : Array.from(listenersMap.keys());
1569
- callbacks.forEach((callbackItem) => {
1570
- const registeredPhases = listenersMap.get(callbackItem) ?? TargetEventListeners_EventListenerPhases.None;
1571
- const phaseRegistered = !!(registeredPhases & listenerPhase);
1572
- if (!phaseRegistered) {
1573
- return;
1574
- }
1575
- this._target.removeEventListener(type, callbackItem, options);
1576
- const newListenerPhase = registeredPhases ^ listenerPhase;
1577
- if (newListenerPhase === TargetEventListeners_EventListenerPhases.None) {
1578
- listenersMap.delete(callbackItem);
1579
- }
1580
- else {
1581
- listenersMap.set(callbackItem, newListenerPhase);
1582
- }
1583
- });
1584
- if (!listenersMap.size) {
1585
- this._eventListeners.delete(type);
1586
- }
1587
- }
1588
- _unregisterAllListeners(type, listenersMap) {
1589
- Array.from(listenersMap.entries()).forEach(([listener, eventPhases]) => {
1590
- const startPhase = TargetEventListeners_EventListenerPhases.Capture;
1591
- for (let currentPhase = startPhase; eventPhases; currentPhase <<= 1) {
1592
- if (!(eventPhases & currentPhase)) {
1593
- continue;
1594
- }
1595
- const useCapture = currentPhase === TargetEventListeners_EventListenerPhases.Capture ? true : false;
1596
- this.removeEventListener(type, listener, { capture: useCapture });
1597
- eventPhases ^= currentPhase;
1598
- }
1599
- });
1600
- }
1601
- _unregisterAllEvents() {
1602
- Array.from(this._eventListeners.entries()).forEach(([type, listenersMap]) => {
1603
- this._unregisterAllListeners(type, listenersMap);
1604
- });
1605
- }
1606
- }
1607
-
1608
-
1609
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/eventListener/MultiTargetEventListenerManager.js
1610
-
1611
- class MultiTargetEventListenerManager {
1612
- constructor() {
1613
- this._targetsEventListeners = new Map();
1614
- }
1615
- addEventListener(target, type, callback, options) {
1616
- let eventListeners = this._targetsEventListeners.get(target);
1617
- if (!eventListeners) {
1618
- eventListeners = new TargetEventListeners(target);
1619
- this._targetsEventListeners.set(target, eventListeners);
1620
- }
1621
- eventListeners.addEventListener(type, callback, options);
1622
- }
1623
- removeEventListener(target, type, callback, options) {
1624
- const eventListeners = this._targetsEventListeners.get(target);
1625
- if (!eventListeners) {
1626
- return;
1627
- }
1628
- eventListeners.removeEventListener(type, callback, options);
1629
- if (eventListeners.isEmpty) {
1630
- this._targetsEventListeners.delete(target);
1631
- }
1632
- }
1633
- reset() {
1634
- Array.from(this._targetsEventListeners.entries()).forEach(([target, targetEventListeners]) => {
1635
- targetEventListeners.reset();
1636
- this._targetsEventListeners.delete(target);
1637
- });
1638
- }
1639
- }
1640
-
1641
-
1461
+ // NAMESPACE OBJECT: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/eventListener/index.js
1462
+ var eventListener_namespaceObject = {};
1463
+ __webpack_require__.r(eventListener_namespaceObject);
1464
+ __webpack_require__.d(eventListener_namespaceObject, {
1465
+ MultiTargetEventListenerManager: () => (MultiTargetEventListenerManager/* .MultiTargetEventListenerManager */.I),
1466
+ TargetEventListeners: () => (TargetEventListeners/* .TargetEventListeners */.f) });
1467
+
1468
+
1469
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/eventListener/TargetEventListeners.js
1470
+ var TargetEventListeners = __webpack_require__(22225);
1471
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/eventListener/MultiTargetEventListenerManager.js
1472
+ var MultiTargetEventListenerManager = __webpack_require__(89370);
1642
1473
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/eventListener/index.js
1643
1474
 
1644
1475
 
@@ -1656,7 +1487,7 @@ var scaleRgbTransferFunction = __webpack_require__(44134);
1656
1487
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/triggerEvent.js
1657
1488
  var triggerEvent = __webpack_require__(69372);
1658
1489
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/uuidv4.js
1659
- var utilities_uuidv4 = __webpack_require__(80221);
1490
+ var uuidv4 = __webpack_require__(80221);
1660
1491
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getMinMax.js
1661
1492
  var getMinMax = __webpack_require__(25308);
1662
1493
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/clonePoint3.js
@@ -1669,21 +1500,12 @@ var getRuntimeId = __webpack_require__(10145);
1669
1500
  var getVOIRangeFromWindowLevel = __webpack_require__(57323);
1670
1501
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/imageIdToURI.js
1671
1502
  var imageIdToURI = __webpack_require__(39537);
1672
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/metadata/dist/esm/index.js + 63 modules
1673
- var esm = __webpack_require__(64958);
1674
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/calibratedPixelSpacingMetadataProvider.js
1675
-
1676
- /* export default */ const calibratedPixelSpacingMetadataProvider = (esm/* .utilities.calibratedPixelSpacingMetadataProvider */.BF.calibratedPixelSpacingMetadataProvider);
1677
-
1503
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/calibratedPixelSpacingMetadataProvider.js
1504
+ var calibratedPixelSpacingMetadataProvider = __webpack_require__(73822);
1678
1505
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/clamp.js
1679
1506
  var clamp = __webpack_require__(84061);
1680
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/isOpposite.js
1681
- function isOpposite(v1, v2, tolerance = 1e-5) {
1682
- return (Math.abs(v1[0] + v2[0]) < tolerance &&
1683
- Math.abs(v1[1] + v2[1]) < tolerance &&
1684
- Math.abs(v1[2] + v2[2]) < tolerance);
1685
- }
1686
-
1507
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/isOpposite.js
1508
+ var isOpposite = __webpack_require__(37657);
1687
1509
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getClosestImageId.js
1688
1510
  var getClosestImageId = __webpack_require__(88619);
1689
1511
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getSpacingInNormalDirection.js
@@ -1699,9 +1521,9 @@ var getVolumeViewportsContainingSameVolumes = __webpack_require__(15388);
1699
1521
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getViewportsWithVolumeId.js
1700
1522
  var getViewportsWithVolumeId = __webpack_require__(24724);
1701
1523
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/transformWorldToIndex.js
1702
- var utilities_transformWorldToIndex = __webpack_require__(38669);
1524
+ var transformWorldToIndex = __webpack_require__(38669);
1703
1525
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/transformIndexToWorld.js
1704
- var utilities_transformIndexToWorld = __webpack_require__(94741);
1526
+ var transformIndexToWorld = __webpack_require__(94741);
1705
1527
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/loadImageToCanvas.js
1706
1528
  var loadImageToCanvas = __webpack_require__(24662);
1707
1529
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/historyMemo/index.js
@@ -1710,55 +1532,10 @@ var historyMemo = __webpack_require__(36527);
1710
1532
  var renderToCanvasCPU = __webpack_require__(38583);
1711
1533
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/renderToCanvasGPU.js
1712
1534
  var renderToCanvasGPU = __webpack_require__(3667);
1713
- // EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js
1714
- var gl_matrix_esm = __webpack_require__(40230);
1715
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/metaData.js
1716
- var metaData = __webpack_require__(74876);
1717
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/worldToImageCoords.js
1718
-
1719
-
1720
- function worldToImageCoords(imageId, worldCoords) {
1721
- const imagePlaneModule = get('imagePlaneModule', imageId);
1722
- if (!imagePlaneModule) {
1723
- throw new Error(`No imagePlaneModule found for imageId: ${imageId}`);
1724
- }
1725
- const { columnCosines, rowCosines, imagePositionPatient: origin, } = imagePlaneModule;
1726
- let { columnPixelSpacing, rowPixelSpacing } = imagePlaneModule;
1727
- columnPixelSpacing ||= 1;
1728
- rowPixelSpacing ||= 1;
1729
- const newOrigin = vec3.create();
1730
- vec3.scaleAndAdd(newOrigin, origin, columnCosines, -columnPixelSpacing / 2);
1731
- vec3.scaleAndAdd(newOrigin, newOrigin, rowCosines, -rowPixelSpacing / 2);
1732
- const sub = vec3.create();
1733
- vec3.sub(sub, worldCoords, newOrigin);
1734
- const rowDistance = vec3.dot(sub, rowCosines);
1735
- const columnDistance = vec3.dot(sub, columnCosines);
1736
- const imageCoords = [
1737
- rowDistance / rowPixelSpacing,
1738
- columnDistance / columnPixelSpacing,
1739
- ];
1740
- return imageCoords;
1741
- }
1742
- /* export default */ const utilities_worldToImageCoords = ((/* unused pure expression or super */ null && (worldToImageCoords)));
1743
-
1744
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/imageToWorldCoords.js
1745
-
1746
-
1747
- function imageToWorldCoords(imageId, imageCoords) {
1748
- const imagePlaneModule = get('imagePlaneModule', imageId);
1749
- if (!imagePlaneModule) {
1750
- throw new Error(`No imagePlaneModule found for imageId: ${imageId}`);
1751
- }
1752
- const { columnCosines, rowCosines, imagePositionPatient: origin, } = imagePlaneModule;
1753
- let { columnPixelSpacing, rowPixelSpacing } = imagePlaneModule;
1754
- columnPixelSpacing ||= 1;
1755
- rowPixelSpacing ||= 1;
1756
- const imageCoordsInWorld = vec3.create();
1757
- vec3.scaleAndAdd(imageCoordsInWorld, origin, rowCosines, rowPixelSpacing * (imageCoords[0] - 0.5));
1758
- vec3.scaleAndAdd(imageCoordsInWorld, imageCoordsInWorld, columnCosines, columnPixelSpacing * (imageCoords[1] - 0.5));
1759
- return Array.from(imageCoordsInWorld);
1760
- }
1761
-
1535
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/worldToImageCoords.js
1536
+ var worldToImageCoords = __webpack_require__(79988);
1537
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/imageToWorldCoords.js
1538
+ var imageToWorldCoords = __webpack_require__(79518);
1762
1539
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getVolumeSliceRangeInfo.js
1763
1540
  var getVolumeSliceRangeInfo = __webpack_require__(4031);
1764
1541
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getVolumeViewportScrollInfo.js
@@ -1775,114 +1552,14 @@ var actorCheck = __webpack_require__(98039);
1775
1552
  var getViewportsWithImageURI = __webpack_require__(13382);
1776
1553
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getClosestStackImageIndexForPoint.js
1777
1554
  var getClosestStackImageIndexForPoint = __webpack_require__(27699);
1778
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/transformCanvasToIJK.js
1779
- var utilities_transformCanvasToIJK = __webpack_require__(51919);
1780
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getCurrentVolumeViewportSlice.js
1781
-
1782
-
1783
- function getCurrentVolumeViewportSlice(viewport) {
1784
- const { width: canvasWidth, height: canvasHeight } = viewport.getCanvas();
1785
- const { sliceToIndexMatrix, indexToSliceMatrix } = viewport.getSliceViewInfo();
1786
- const ijkOriginPoint = transformCanvasToIJK(viewport, [0, 0]);
1787
- const ijkRowPoint = transformCanvasToIJK(viewport, [canvasWidth - 1, 0]);
1788
- const ijkColPoint = transformCanvasToIJK(viewport, [0, canvasHeight - 1]);
1789
- const ijkRowVec = vec3.sub(vec3.create(), ijkRowPoint, ijkOriginPoint);
1790
- const ijkColVec = vec3.sub(vec3.create(), ijkColPoint, ijkOriginPoint);
1791
- const ijkSliceVec = vec3.cross(vec3.create(), ijkRowVec, ijkColVec);
1792
- vec3.normalize(ijkRowVec, ijkRowVec);
1793
- vec3.normalize(ijkColVec, ijkColVec);
1794
- vec3.normalize(ijkSliceVec, ijkSliceVec);
1795
- const maxIJKRowVec = Math.max(Math.abs(ijkRowVec[0]), Math.abs(ijkRowVec[1]), Math.abs(ijkRowVec[2]));
1796
- const maxIJKColVec = Math.max(Math.abs(ijkColVec[0]), Math.abs(ijkColVec[1]), Math.abs(ijkColVec[2]));
1797
- if (!glMatrix.equals(1, maxIJKRowVec) || !glMatrix.equals(1, maxIJKColVec)) {
1798
- throw new Error('Livewire is not available for rotate/oblique viewports');
1799
- }
1800
- const { voxelManager } = viewport.getImageData();
1801
- const sliceViewInfo = viewport.getSliceViewInfo();
1802
- const scalarData = voxelManager.getSliceData(sliceViewInfo);
1803
- return {
1804
- width: sliceViewInfo.width,
1805
- height: sliceViewInfo.height,
1806
- scalarData,
1807
- sliceToIndexMatrix,
1808
- indexToSliceMatrix,
1809
- };
1810
- }
1811
-
1812
-
1555
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getCurrentVolumeViewportSlice.js
1556
+ var getCurrentVolumeViewportSlice = __webpack_require__(70683);
1813
1557
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/calculateViewportsSpatialRegistration.js
1814
1558
  var calculateViewportsSpatialRegistration = __webpack_require__(82918);
1815
1559
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/spatialRegistrationMetadataProvider.js
1816
1560
  var spatialRegistrationMetadataProvider = __webpack_require__(40239);
1817
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getViewportImageCornersInWorld.js
1818
- function getViewportImageCornersInWorld(viewport) {
1819
- const { imageData, dimensions } = viewport.getImageData() || {};
1820
- if (!imageData || !dimensions) {
1821
- return [];
1822
- }
1823
- const { canvas } = viewport;
1824
- const ratio = window.devicePixelRatio;
1825
- const topLeftCanvas = [0, 0];
1826
- const topRightCanvas = [canvas.width / ratio, 0];
1827
- const bottomRightCanvas = [
1828
- canvas.width / ratio,
1829
- canvas.height / ratio,
1830
- ];
1831
- const bottomLeftCanvas = [0, canvas.height / ratio];
1832
- const topLeftWorld = viewport.canvasToWorld(topLeftCanvas);
1833
- const topRightWorld = viewport.canvasToWorld(topRightCanvas);
1834
- const bottomRightWorld = viewport.canvasToWorld(bottomRightCanvas);
1835
- const bottomLeftWorld = viewport.canvasToWorld(bottomLeftCanvas);
1836
- const topLeftImage = imageData.worldToIndex(topLeftWorld);
1837
- const topRightImage = imageData.worldToIndex(topRightWorld);
1838
- const bottomRightImage = imageData.worldToIndex(bottomRightWorld);
1839
- const bottomLeftImage = imageData.worldToIndex(bottomLeftWorld);
1840
- return _getStackViewportImageCorners({
1841
- dimensions,
1842
- imageData,
1843
- topLeftImage,
1844
- topRightImage,
1845
- bottomRightImage,
1846
- bottomLeftImage,
1847
- topLeftWorld,
1848
- topRightWorld,
1849
- bottomRightWorld,
1850
- bottomLeftWorld,
1851
- });
1852
- }
1853
- function _getStackViewportImageCorners({ dimensions, imageData, topLeftImage, topRightImage, bottomRightImage, bottomLeftImage, topLeftWorld, topRightWorld, bottomRightWorld, bottomLeftWorld, }) {
1854
- const topLeftImageWorld = _isInBounds(topLeftImage, dimensions)
1855
- ? topLeftWorld
1856
- : imageData.indexToWorld([0, 0, 0]);
1857
- const topRightImageWorld = _isInBounds(topRightImage, dimensions)
1858
- ? topRightWorld
1859
- : imageData.indexToWorld([dimensions[0] - 1, 0, 0]);
1860
- const bottomRightImageWorld = _isInBounds(bottomRightImage, dimensions)
1861
- ? bottomRightWorld
1862
- : imageData.indexToWorld([
1863
- dimensions[0] - 1,
1864
- dimensions[1] - 1,
1865
- 0,
1866
- ]);
1867
- const bottomLeftImageWorld = _isInBounds(bottomLeftImage, dimensions)
1868
- ? bottomLeftWorld
1869
- : imageData.indexToWorld([0, dimensions[1] - 1, 0]);
1870
- return [
1871
- topLeftImageWorld,
1872
- topRightImageWorld,
1873
- bottomLeftImageWorld,
1874
- bottomRightImageWorld,
1875
- ];
1876
- }
1877
- function _isInBounds(imageCoord, dimensions) {
1878
- return (imageCoord[0] > 0 ||
1879
- imageCoord[0] < dimensions[0] - 1 ||
1880
- imageCoord[1] > 0 ||
1881
- imageCoord[1] < dimensions[1] - 1 ||
1882
- imageCoord[2] > 0 ||
1883
- imageCoord[2] < dimensions[2] - 1);
1884
- }
1885
-
1561
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getViewportImageCornersInWorld.js
1562
+ var getViewportImageCornersInWorld = __webpack_require__(64448);
1886
1563
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/hasNaNValues.js
1887
1564
  var hasNaNValues = __webpack_require__(38883);
1888
1565
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/applyPreset.js
@@ -1913,8 +1590,8 @@ var ProgressiveIterator = __webpack_require__(22191);
1913
1590
  var decimate = __webpack_require__(63470);
1914
1591
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/imageRetrieveMetadataProvider.js
1915
1592
  var imageRetrieveMetadataProvider = __webpack_require__(17791);
1916
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/genericViewportDataSetMetadataProvider.js
1917
- var genericViewportDataSetMetadataProvider = __webpack_require__(18861);
1593
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/genericViewportDisplaySetMetadataProvider.js
1594
+ var genericViewportDisplaySetMetadataProvider = __webpack_require__(83159);
1918
1595
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/isVideoTransferSyntax.js
1919
1596
  var isVideoTransferSyntax = __webpack_require__(79697);
1920
1597
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getBufferConfiguration.js
@@ -1931,32 +1608,8 @@ var VoxelManager = __webpack_require__(24623);
1931
1608
  var RLEVoxelMap = __webpack_require__(67645);
1932
1609
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/roundNumber.js
1933
1610
  var roundNumber = __webpack_require__(1587);
1934
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/convertToGrayscale.js
1935
- function convertToGrayscale(scalarData, width, height) {
1936
- const isRGBA = scalarData.length === width * height * 4;
1937
- const isRGB = scalarData.length === width * height * 3;
1938
- if (isRGBA || isRGB) {
1939
- const newScalarData = new Float32Array(width * height);
1940
- let offset = 0;
1941
- let destOffset = 0;
1942
- const increment = isRGBA ? 4 : 3;
1943
- for (let x = 0; x < width; x++) {
1944
- for (let y = 0; y < height; y++) {
1945
- const r = scalarData[offset];
1946
- const g = scalarData[offset + 1];
1947
- const b = scalarData[offset + 2];
1948
- newScalarData[destOffset] = (r + g + b) / 3;
1949
- offset += increment;
1950
- destOffset++;
1951
- }
1952
- }
1953
- return newScalarData;
1954
- }
1955
- else {
1956
- return scalarData;
1957
- }
1958
- }
1959
-
1611
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/convertToGrayscale.js
1612
+ var convertToGrayscale = __webpack_require__(2397);
1960
1613
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/convertColorArrayToRgbString.js
1961
1614
  var convertColorArrayToRgbString = __webpack_require__(57652);
1962
1615
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getViewportImageIds.js
@@ -1995,28 +1648,14 @@ var fnv1aHash = __webpack_require__(20286);
1995
1648
  var getImageDataMetadata = __webpack_require__(53932);
1996
1649
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/buildMetadata.js
1997
1650
  var buildMetadata = __webpack_require__(89131);
1998
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getViewportModality.js
1999
- function getViewportModality_getViewportModality(viewport, volumeId, getVolume) {
2000
- if (!getVolume) {
2001
- throw new Error('getVolume is required, use the utilities export instead ');
2002
- }
2003
- if (viewport.modality) {
2004
- return viewport.modality;
2005
- }
2006
- if (viewport.setVolumes) {
2007
- volumeId = volumeId ?? viewport.getVolumeId();
2008
- if (!volumeId || !getVolume) {
2009
- return;
2010
- }
2011
- const volume = getVolume(volumeId);
2012
- return volume.metadata.Modality;
2013
- }
2014
- throw new Error('Invalid viewport type');
2015
- }
2016
-
2017
-
1651
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getViewportModality.js
1652
+ var getViewportModality = __webpack_require__(30439);
1653
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getScalingDescriptor.js
1654
+ var getScalingDescriptor = __webpack_require__(96492);
1655
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/resolveGenericViewportVolumeId.js
1656
+ var resolveGenericViewportVolumeId = __webpack_require__(3928);
2018
1657
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/cache/cache.js
2019
- var cache_cache = __webpack_require__(49038);
1658
+ var cache = __webpack_require__(49038);
2020
1659
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getDynamicVolumeInfo.js
2021
1660
  var getDynamicVolumeInfo = __webpack_require__(75283);
2022
1661
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/autoLoad.js
@@ -2033,147 +1672,20 @@ var jumpToSlice = __webpack_require__(86391);
2033
1672
  var utilities_scroll = __webpack_require__(36277);
2034
1673
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/clip.js
2035
1674
  var clip = __webpack_require__(25534);
2036
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/loaders/volumeLoader.js
2037
- var volumeLoader = __webpack_require__(39561);
2038
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/createSubVolume.js
2039
-
2040
-
2041
-
2042
-
2043
-
2044
- function createSubVolume(referencedVolumeId, boundsIJK, options = {}) {
2045
- const referencedVolume = cache.getVolume(referencedVolumeId);
2046
- if (!referencedVolume) {
2047
- throw new Error(`Referenced volume with id ${referencedVolumeId} does not exist.`);
2048
- }
2049
- const { metadata, spacing, direction, dimensions: refVolumeDim, } = referencedVolume;
2050
- const { minX, maxX, minY, maxY, minZ, maxZ } = boundsIJK;
2051
- const ijkTopLeft = [
2052
- Math.min(minX, maxX),
2053
- Math.min(minY, maxY),
2054
- Math.min(minZ, maxZ),
2055
- ];
2056
- const boundingBoxOriginWorld = transformIndexToWorld(referencedVolume.imageData, ijkTopLeft);
2057
- const dimensions = [
2058
- Math.abs(maxX - minX) + 1,
2059
- Math.abs(maxY - minY) + 1,
2060
- Math.abs(maxZ - minZ) + 1,
2061
- ];
2062
- const { targetBuffer } = options;
2063
- const subVolumeOptions = {
2064
- metadata,
2065
- dimensions,
2066
- spacing,
2067
- origin: boundingBoxOriginWorld,
2068
- direction,
2069
- targetBuffer,
2070
- scalarData: targetBuffer?.type === 'Float32Array'
2071
- ? new Float32Array(dimensions[0] * dimensions[1] * dimensions[2])
2072
- : undefined,
2073
- };
2074
- const subVolume = createLocalVolume(uuidv4(), subVolumeOptions);
2075
- const subVolumeData = subVolume.voxelManager.getCompleteScalarDataArray();
2076
- const subVolumeSliceSize = dimensions[0] * dimensions[1];
2077
- const refVolumeSliceSize = refVolumeDim[0] * refVolumeDim[1];
2078
- const refVolumeData = referencedVolume.voxelManager.getCompleteScalarDataArray();
2079
- for (let z = 0; z < dimensions[2]; z++) {
2080
- for (let y = 0; y < dimensions[1]; y++) {
2081
- const rowStartWorld = transformIndexToWorld(subVolume.imageData, [
2082
- 0,
2083
- y,
2084
- z,
2085
- ]);
2086
- const refVolumeRowStartIJK = transformWorldToIndex(referencedVolume.imageData, rowStartWorld);
2087
- const refVolumeRowStartOffset = refVolumeRowStartIJK[2] * refVolumeSliceSize +
2088
- refVolumeRowStartIJK[1] * refVolumeDim[0] +
2089
- refVolumeRowStartIJK[0];
2090
- const rowData = refVolumeData.slice(refVolumeRowStartOffset, refVolumeRowStartOffset + dimensions[0]);
2091
- const subVolumeLineStartOffset = z * subVolumeSliceSize + y * dimensions[0];
2092
- subVolumeData.set(rowData, subVolumeLineStartOffset);
2093
- }
2094
- }
2095
- subVolume.voxelManager.setCompleteScalarDataArray(subVolumeData);
2096
- return subVolume;
2097
- }
2098
-
2099
-
1675
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/createSubVolume.js
1676
+ var createSubVolume = __webpack_require__(23586);
2100
1677
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getAcquisitionPlaneOrientation.js
2101
1678
  var getAcquisitionPlaneOrientation = __webpack_require__(24583);
2102
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getVolumeDirectionVectors.js
2103
-
2104
-
2105
- function getVolumeDirectionVectors(imageData, camera) {
2106
- const { viewUp, viewPlaneNormal } = camera;
2107
- const ijkOrigin = transformWorldToIndexContinuous(imageData, [0, 0, 0]);
2108
- const worldVecColDir = vec3.negate(vec3.create(), viewUp);
2109
- const worldVecSliceDir = vec3.negate(vec3.create(), viewPlaneNormal);
2110
- const worldVecRowDir = vec3.cross(vec3.create(), worldVecColDir, worldVecSliceDir);
2111
- const ijkVecColDir = vec3.sub(vec3.create(), transformWorldToIndexContinuous(imageData, worldVecColDir), ijkOrigin);
2112
- const ijkVecSliceDir = vec3.sub(vec3.create(), transformWorldToIndexContinuous(imageData, worldVecSliceDir), ijkOrigin);
2113
- vec3.normalize(ijkVecColDir, ijkVecColDir);
2114
- vec3.normalize(ijkVecSliceDir, ijkVecSliceDir);
2115
- const ijkVecRowDir = vec3.cross(vec3.create(), ijkVecColDir, ijkVecSliceDir);
2116
- return {
2117
- worldVecRowDir,
2118
- worldVecColDir,
2119
- worldVecSliceDir,
2120
- ijkVecRowDir,
2121
- ijkVecColDir,
2122
- ijkVecSliceDir,
2123
- };
2124
- }
2125
-
2126
-
1679
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getVolumeDirectionVectors.js
1680
+ var getVolumeDirectionVectors = __webpack_require__(93475);
2127
1681
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getVolumeViewReferenceId.js
2128
1682
  var getVolumeViewReferenceId = __webpack_require__(74693);
2129
1683
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/calculateSpacingBetweenImageIds.js
2130
1684
  var calculateSpacingBetweenImageIds = __webpack_require__(42384);
2131
1685
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/logger.js
2132
1686
  var logger = __webpack_require__(7608);
2133
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/calculateNeighborhoodStats.js
2134
- function calculateNeighborhoodStats(scalarData, dimensions, centerIjk, radius) {
2135
- const [width, height, numSlices] = dimensions;
2136
- const numPixelsPerSlice = width * height;
2137
- let sum = 0;
2138
- let sumSq = 0;
2139
- let count = 0;
2140
- const [cx, cy, cz] = centerIjk.map(Math.round);
2141
- for (let z = cz - radius; z <= cz + radius; z++) {
2142
- if (z < 0 || z >= numSlices) {
2143
- continue;
2144
- }
2145
- for (let y = cy - radius; y <= cy + radius; y++) {
2146
- if (y < 0 || y >= height) {
2147
- continue;
2148
- }
2149
- for (let x = cx - radius; x <= cx + radius; x++) {
2150
- if (x < 0 || x >= width) {
2151
- continue;
2152
- }
2153
- const index = z * numPixelsPerSlice + y * width + x;
2154
- const value = scalarData[index];
2155
- sum += value;
2156
- sumSq += value * value;
2157
- count++;
2158
- }
2159
- }
2160
- }
2161
- if (count === 0) {
2162
- const centerIndex = cz * numPixelsPerSlice + cy * width + cx;
2163
- if (centerIndex >= 0 && centerIndex < scalarData.length) {
2164
- const centerValue = scalarData[centerIndex];
2165
- return { mean: centerValue, stdDev: 0, count: 1 };
2166
- }
2167
- else {
2168
- return { mean: 0, stdDev: 0, count: 0 };
2169
- }
2170
- }
2171
- const mean = sum / count;
2172
- const variance = sumSq / count - mean * mean;
2173
- const stdDev = Math.sqrt(Math.max(0, variance));
2174
- return { mean, stdDev, count };
2175
- }
2176
-
1687
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/calculateNeighborhoodStats.js
1688
+ var calculateNeighborhoodStats = __webpack_require__(31107);
2177
1689
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getPixelSpacingInformation.js
2178
1690
  var getPixelSpacingInformation = __webpack_require__(62573);
2179
1691
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getPlaneCubeIntersectionDimensions.js
@@ -2303,17 +1815,23 @@ var isEqual = __webpack_require__(74638);
2303
1815
 
2304
1816
 
2305
1817
 
2306
- const getViewportModality = (viewport, volumeId) => _getViewportModality(viewport, volumeId, cache.getVolume);
1818
+
1819
+
1820
+ const utilities_getViewportModality = (viewport, volumeId) => (0,getViewportModality/* ._getViewportModality */.p)(viewport, volumeId, cache/* ["default"].getVolume */.Ay.getVolume);
1821
+ const utilities_getScalingDescriptor = (viewport, targetId) => (0,getScalingDescriptor/* ._getScalingDescriptor */.c)(viewport, targetId, cache/* ["default"].getVolume */.Ay.getVolume);
2307
1822
 
2308
1823
 
2309
1824
 
2310
1825
 
2311
1826
  },
2312
1827
  52268(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
1828
+ __webpack_require__.r(__webpack_exports__);
2313
1829
  __webpack_require__.d(__webpack_exports__, {
1830
+ isPointOnPlane: () => (isPointOnPlane),
2314
1831
  linePlaneIntersection: () => (linePlaneIntersection),
2315
1832
  planeDistanceToPoint: () => (planeDistanceToPoint),
2316
- planeEquation: () => (planeEquation)
1833
+ planeEquation: () => (planeEquation),
1834
+ threePlaneIntersection: () => (threePlaneIntersection)
2317
1835
  });
2318
1836
  /* import */ var gl_matrix__rspack_import_0 = __webpack_require__(40230);
2319
1837
  /* import */ var _constants__rspack_import_1 = __webpack_require__(5783);
@@ -2345,13 +1863,13 @@ function threePlaneIntersection(firstPlane, secondPlane, thirdPlane) {
2345
1863
  const [A1, B1, C1, D1] = firstPlane;
2346
1864
  const [A2, B2, C2, D2] = secondPlane;
2347
1865
  const [A3, B3, C3, D3] = thirdPlane;
2348
- const m0 = mat3.fromValues(A1, A2, A3, B1, B2, B3, C1, C2, C3);
2349
- const m1 = mat3.fromValues(D1, D2, D3, B1, B2, B3, C1, C2, C3);
2350
- const m2 = mat3.fromValues(A1, A2, A3, D1, D2, D3, C1, C2, C3);
2351
- const m3 = mat3.fromValues(A1, A2, A3, B1, B2, B3, D1, D2, D3);
2352
- const x = mat3.determinant(m1) / mat3.determinant(m0);
2353
- const y = mat3.determinant(m2) / mat3.determinant(m0);
2354
- const z = mat3.determinant(m3) / mat3.determinant(m0);
1866
+ const m0 = gl_matrix__rspack_import_0/* .mat3.fromValues */.w0.fromValues(A1, A2, A3, B1, B2, B3, C1, C2, C3);
1867
+ const m1 = gl_matrix__rspack_import_0/* .mat3.fromValues */.w0.fromValues(D1, D2, D3, B1, B2, B3, C1, C2, C3);
1868
+ const m2 = gl_matrix__rspack_import_0/* .mat3.fromValues */.w0.fromValues(A1, A2, A3, D1, D2, D3, C1, C2, C3);
1869
+ const m3 = gl_matrix__rspack_import_0/* .mat3.fromValues */.w0.fromValues(A1, A2, A3, B1, B2, B3, D1, D2, D3);
1870
+ const x = gl_matrix__rspack_import_0/* .mat3.determinant */.w0.determinant(m1) / gl_matrix__rspack_import_0/* .mat3.determinant */.w0.determinant(m0);
1871
+ const y = gl_matrix__rspack_import_0/* .mat3.determinant */.w0.determinant(m2) / gl_matrix__rspack_import_0/* .mat3.determinant */.w0.determinant(m0);
1872
+ const z = gl_matrix__rspack_import_0/* .mat3.determinant */.w0.determinant(m3) / gl_matrix__rspack_import_0/* .mat3.determinant */.w0.determinant(m0);
2355
1873
  return [x, y, z];
2356
1874
  }
2357
1875
  function planeDistanceToPoint(plane, point, signed = false) {
@@ -2362,108 +1880,12 @@ function planeDistanceToPoint(plane, point, signed = false) {
2362
1880
  const sign = signed ? Math.sign(numerator) : 1;
2363
1881
  return sign * distance;
2364
1882
  }
2365
- function isPointOnPlane(point, plane, tolerance = EPSILON) {
1883
+ function isPointOnPlane(point, plane, tolerance = _constants__rspack_import_1.EPSILON) {
2366
1884
  return planeDistanceToPoint(plane, point) < tolerance;
2367
1885
  }
2368
1886
 
2369
1887
 
2370
1888
 
2371
- },
2372
- 36277(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
2373
- /* import */ var _enums__rspack_import_0 = __webpack_require__(17067);
2374
- /* import */ var _RenderingEngine_StackViewport__rspack_import_1 = __webpack_require__(74674);
2375
- /* import */ var _RenderingEngine_VolumeViewport__rspack_import_2 = __webpack_require__(77602);
2376
- /* import */ var _getVolumeViewportScrollInfo__rspack_import_3 = __webpack_require__(61375);
2377
- /* import */ var _snapFocalPointToSlice__rspack_import_4 = __webpack_require__(80500);
2378
- /* import */ var _getEnabledElement__rspack_import_5 = __webpack_require__(86846);
2379
- /* import */ var _triggerEvent__rspack_import_6 = __webpack_require__(69372);
2380
- /* import */ var _eventTarget__rspack_import_7 = __webpack_require__(10364);
2381
-
2382
-
2383
-
2384
-
2385
-
2386
-
2387
-
2388
-
2389
- function scroll(viewport, options) {
2390
- const enabledElement = getEnabledElement(viewport.element);
2391
- if (!enabledElement) {
2392
- throw new Error('Scroll::Viewport is not enabled (it might be disabled)');
2393
- }
2394
- if (viewport instanceof StackViewport &&
2395
- viewport.getImageIds().length === 0) {
2396
- throw new Error('Scroll::Stack Viewport has no images');
2397
- }
2398
- const { volumeId, delta, scrollSlabs } = options;
2399
- if (viewport instanceof VolumeViewport) {
2400
- scrollVolume(viewport, volumeId, delta, scrollSlabs);
2401
- }
2402
- else {
2403
- const imageIdIndex = viewport.getCurrentImageIdIndex();
2404
- if (imageIdIndex + delta >
2405
- viewport.getImageIds().length - 1 ||
2406
- imageIdIndex + delta < 0) {
2407
- const eventData = {
2408
- imageIdIndex,
2409
- direction: delta,
2410
- };
2411
- triggerEvent(eventTarget, Events.STACK_SCROLL_OUT_OF_BOUNDS, eventData);
2412
- }
2413
- viewport.scroll(delta, options.debounceLoading, options.loop);
2414
- }
2415
- }
2416
- function scrollVolume(viewport, volumeId, delta, scrollSlabs = false) {
2417
- const useSlabThickness = scrollSlabs;
2418
- const { numScrollSteps, currentStepIndex, sliceRangeInfo } = getVolumeViewportScrollInfo(viewport, volumeId, useSlabThickness);
2419
- if (numScrollSteps === 0)
2420
- return;
2421
- if (!sliceRangeInfo) {
2422
- return;
2423
- }
2424
- const { sliceRange, spacingInNormalDirection, camera } = sliceRangeInfo;
2425
- const { focalPoint, viewPlaneNormal, position } = camera;
2426
- const { newFocalPoint, newPosition } = snapFocalPointToSlice(focalPoint, position, sliceRange, viewPlaneNormal, spacingInNormalDirection, delta);
2427
- viewport.setCamera({
2428
- focalPoint: newFocalPoint,
2429
- position: newPosition,
2430
- });
2431
- viewport.render();
2432
- const desiredStepIndex = currentStepIndex + delta;
2433
- const VolumeScrollEventDetail = {
2434
- volumeId,
2435
- viewport,
2436
- delta,
2437
- desiredStepIndex,
2438
- currentStepIndex,
2439
- numScrollSteps,
2440
- currentImageId: viewport.getCurrentImageId(),
2441
- };
2442
- if ((desiredStepIndex > numScrollSteps || desiredStepIndex < 0) &&
2443
- viewport.getCurrentImageId()) {
2444
- triggerEvent(eventTarget, Events.VOLUME_VIEWPORT_SCROLL_OUT_OF_BOUNDS, VolumeScrollEventDetail);
2445
- }
2446
- else {
2447
- triggerEvent(eventTarget, Events.VOLUME_VIEWPORT_SCROLL, VolumeScrollEventDetail);
2448
- }
2449
- }
2450
-
2451
-
2452
- },
2453
- 38669(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
2454
- __webpack_require__.d(__webpack_exports__, {
2455
- A: () => (transformWorldToIndex)
2456
- });
2457
- function transformWorldToIndex(imageData, worldPos) {
2458
- const continuousIndex = imageData.worldToIndex(worldPos);
2459
- const index = continuousIndex.map(Math.round);
2460
- return index;
2461
- }
2462
- function transformWorldToIndexContinuous(imageData, worldPos) {
2463
- return imageData.worldToIndex(worldPos);
2464
- }
2465
-
2466
-
2467
1889
  },
2468
1890
  36625(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
2469
1891
  __webpack_require__.d(__webpack_exports__, {
@@ -3719,7 +3141,7 @@ function shouldUseSliceRendering(segmentation, options) {
3719
3141
  return false;
3720
3142
  }
3721
3143
  const layers = getLabelmaps(segmentation);
3722
- return layers.length > 1 && layers.some((layer) => layer.type === 'stack');
3144
+ return (layers.length > 1 && layers.some((layer) => layer.storageKind === 'stack'));
3723
3145
  }
3724
3146
  function canRenderVolumeViewportLabelmapAsImage(viewport) {
3725
3147
  const isLegacyVolumeViewport = viewport instanceof _cornerstonejs_core__rspack_import_0.VolumeViewport;
@@ -5738,9 +5160,11 @@ function fillOutsideCircle() {
5738
5160
  /* import */ var gl_matrix__rspack_import_0 = __webpack_require__(40230);
5739
5161
  /* import */ var _cornerstonejs_core__rspack_import_1 = __webpack_require__(70594);
5740
5162
  /* import */ var _utilities_boundingBox__rspack_import_2 = __webpack_require__(72282);
5741
- /* import */ var _BrushStrategy__rspack_import_3 = __webpack_require__(69864);
5742
- /* import */ var _enums__rspack_import_4 = __webpack_require__(87937);
5743
- /* import */ var _compositions__rspack_import_5 = __webpack_require__(9330);
5163
+ /* import */ var _utilities_getViewportICamera__rspack_import_3 = __webpack_require__(29604);
5164
+ /* import */ var _BrushStrategy__rspack_import_4 = __webpack_require__(69864);
5165
+ /* import */ var _enums__rspack_import_5 = __webpack_require__(87937);
5166
+ /* import */ var _compositions__rspack_import_6 = __webpack_require__(9330);
5167
+
5744
5168
 
5745
5169
 
5746
5170
 
@@ -5749,7 +5173,7 @@ function fillOutsideCircle() {
5749
5173
 
5750
5174
  const { transformWorldToIndex } = _cornerstonejs_core__rspack_import_1.utilities;
5751
5175
  const initializeRectangle = {
5752
- [_enums__rspack_import_4.StrategyCallbacks.Initialize]: (operationData) => {
5176
+ [_enums__rspack_import_5.StrategyCallbacks.Initialize]: (operationData) => {
5753
5177
  const { points, viewport, segmentationImageData, } = operationData;
5754
5178
  if (!points) {
5755
5179
  return;
@@ -5790,7 +5214,7 @@ function createPointInRectangle(viewport, points, segmentationImageData) {
5790
5214
  gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(normal, normal);
5791
5215
  const direction = segmentationImageData.getDirection();
5792
5216
  const spacing = segmentationImageData.getSpacing();
5793
- const { viewPlaneNormal } = viewport.getCamera();
5217
+ const { viewPlaneNormal } = (0,_utilities_getViewportICamera__rspack_import_3/* ["default"] */.A)(viewport);
5794
5218
  const EPS = _cornerstonejs_core__rspack_import_1.utilities.getSpacingInNormalDirection({
5795
5219
  direction,
5796
5220
  spacing,
@@ -5809,8 +5233,8 @@ function createPointInRectangle(viewport, points, segmentationImageData) {
5809
5233
  };
5810
5234
  return { boundsIJK, pointInShapeFn };
5811
5235
  }
5812
- const RECTANGLE_STRATEGY = new _BrushStrategy__rspack_import_3/* ["default"] */.A('Rectangle', _compositions__rspack_import_5/* ["default"].regionFill */.A.regionFill, _compositions__rspack_import_5/* ["default"].setValue */.A.setValue, initializeRectangle, _compositions__rspack_import_5/* ["default"].determineSegmentIndex */.A.determineSegmentIndex, _compositions__rspack_import_5/* ["default"].preview */.A.preview, _compositions__rspack_import_5/* ["default"].labelmapStatistics */.A.labelmapStatistics);
5813
- const RECTANGLE_THRESHOLD_STRATEGY = new _BrushStrategy__rspack_import_3/* ["default"] */.A('RectangleThreshold', _compositions__rspack_import_5/* ["default"].regionFill */.A.regionFill, _compositions__rspack_import_5/* ["default"].setValue */.A.setValue, initializeRectangle, _compositions__rspack_import_5/* ["default"].determineSegmentIndex */.A.determineSegmentIndex, _compositions__rspack_import_5/* ["default"].dynamicThreshold */.A.dynamicThreshold, _compositions__rspack_import_5/* ["default"].threshold */.A.threshold, _compositions__rspack_import_5/* ["default"].preview */.A.preview, _compositions__rspack_import_5/* ["default"].islandRemoval */.A.islandRemoval, _compositions__rspack_import_5/* ["default"].labelmapStatistics */.A.labelmapStatistics);
5236
+ const RECTANGLE_STRATEGY = new _BrushStrategy__rspack_import_4/* ["default"] */.A('Rectangle', _compositions__rspack_import_6/* ["default"].regionFill */.A.regionFill, _compositions__rspack_import_6/* ["default"].setValue */.A.setValue, initializeRectangle, _compositions__rspack_import_6/* ["default"].determineSegmentIndex */.A.determineSegmentIndex, _compositions__rspack_import_6/* ["default"].preview */.A.preview, _compositions__rspack_import_6/* ["default"].labelmapStatistics */.A.labelmapStatistics);
5237
+ const RECTANGLE_THRESHOLD_STRATEGY = new _BrushStrategy__rspack_import_4/* ["default"] */.A('RectangleThreshold', _compositions__rspack_import_6/* ["default"].regionFill */.A.regionFill, _compositions__rspack_import_6/* ["default"].setValue */.A.setValue, initializeRectangle, _compositions__rspack_import_6/* ["default"].determineSegmentIndex */.A.determineSegmentIndex, _compositions__rspack_import_6/* ["default"].dynamicThreshold */.A.dynamicThreshold, _compositions__rspack_import_6/* ["default"].threshold */.A.threshold, _compositions__rspack_import_6/* ["default"].preview */.A.preview, _compositions__rspack_import_6/* ["default"].islandRemoval */.A.islandRemoval, _compositions__rspack_import_6/* ["default"].labelmapStatistics */.A.labelmapStatistics);
5814
5238
  const fillInsideRectangle = RECTANGLE_STRATEGY.strategyFunction;
5815
5239
  const thresholdInsideRectangle = RECTANGLE_THRESHOLD_STRATEGY.strategyFunction;
5816
5240
 
@@ -7884,6 +7308,8 @@ var segmentationState = __webpack_require__(19806);
7884
7308
  var stateManagement = __webpack_require__(6802);
7885
7309
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/index.js + 1 modules
7886
7310
  var math_polyline = __webpack_require__(3549);
7311
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/planar/filterAnnotationsForDisplay.js
7312
+ var planar_filterAnnotationsForDisplay = __webpack_require__(94418);
7887
7313
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/helpers/getSegmentationActor.js
7888
7314
  var getSegmentationActor = __webpack_require__(59452);
7889
7315
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/helpers/getViewportLabelmapRenderMode.js
@@ -7899,6 +7325,7 @@ var labelmapSegmentationState = __webpack_require__(90660);
7899
7325
 
7900
7326
 
7901
7327
 
7328
+
7902
7329
  function getSegmentIndexAtWorldPoint(segmentationId, worldPoint, options = {}) {
7903
7330
  const segmentation = getSegmentation(segmentationId);
7904
7331
  const representationData = segmentation.representationData;
@@ -7926,7 +7353,9 @@ function getSegmentIndexAtWorldForLabelmap(segmentation, worldPoint, { viewport
7926
7353
  if (!segmentationVolume) {
7927
7354
  continue;
7928
7355
  }
7929
- const labelValue = segmentationVolume.imageData.getScalarValueFromWorld(worldPoint);
7356
+ const voxelManager = segmentationVolume.voxelManager;
7357
+ const indexIJK = utilities.transformWorldToIndex(segmentationVolume.imageData, worldPoint);
7358
+ const labelValue = voxelManager.getAtIJKPoint(indexIJK);
7930
7359
  if (!labelValue) {
7931
7360
  continue;
7932
7361
  }
@@ -7965,27 +7394,23 @@ function getSegmentIndexAtWorldForLabelmap(segmentation, worldPoint, { viewport
7965
7394
  }
7966
7395
  function getSegmentIndexAtWorldForContour(segmentation, worldPoint, { viewport }) {
7967
7396
  const contourData = segmentation.representationData.Contour;
7968
- const segmentIndices = Array.from(contourData.annotationUIDsMap.keys());
7969
- const { viewPlaneNormal } = viewport.getCamera();
7970
- for (const segmentIndex of segmentIndices) {
7971
- const annotationsSet = contourData.annotationUIDsMap.get(segmentIndex);
7972
- if (!annotationsSet) {
7973
- continue;
7974
- }
7975
- for (const annotationUID of annotationsSet) {
7397
+ const segmentIndexByAnnotation = new Map();
7398
+ for (const [segmentIndex, annotationUIDs] of contourData.annotationUIDsMap) {
7399
+ for (const annotationUID of annotationUIDs) {
7976
7400
  const annotation = getAnnotation(annotationUID);
7977
- if (!annotation) {
7978
- continue;
7979
- }
7980
- const { polyline } = annotation.data.contour;
7981
- if (!utilities.isEqual(viewPlaneNormal, annotation.metadata.viewPlaneNormal)) {
7982
- continue;
7983
- }
7984
- if (isPointInsidePolyline3D(worldPoint, polyline)) {
7985
- return Number(segmentIndex);
7401
+ if (annotation) {
7402
+ segmentIndexByAnnotation.set(annotation, Number(segmentIndex));
7986
7403
  }
7987
7404
  }
7988
7405
  }
7406
+ const displayableAnnotations = filterAnnotationsForDisplay(viewport, Array.from(segmentIndexByAnnotation.keys()));
7407
+ for (const annotation of displayableAnnotations) {
7408
+ const { polyline } = annotation.data
7409
+ .contour;
7410
+ if (isPointInsidePolyline3D(worldPoint, polyline)) {
7411
+ return segmentIndexByAnnotation.get(annotation);
7412
+ }
7413
+ }
7989
7414
  }
7990
7415
 
7991
7416
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/helpers/index.js + 1 modules
@@ -8573,6 +7998,8 @@ async function runGrowCut(referenceVolumeId, labelmapVolumeId, options = DEFAULT
8573
7998
 
8574
7999
  // EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js
8575
8000
  var gl_matrix_esm = __webpack_require__(40230);
8001
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/getViewportICamera.js
8002
+ var utilities_getViewportICamera = __webpack_require__(29604);
8576
8003
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/getSphereBoundsInfo.js
8577
8004
  var utilities_getSphereBoundsInfo = __webpack_require__(4296);
8578
8005
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/growCut/runGrowCutForSphere.js
@@ -8580,6 +8007,7 @@ var utilities_getSphereBoundsInfo = __webpack_require__(4296);
8580
8007
 
8581
8008
 
8582
8009
 
8010
+
8583
8011
  const { transformWorldToIndex } = esm.utilities;
8584
8012
  const POSITIVE_SEED_VALUE = 254;
8585
8013
  const NEGATIVE_SEED_VALUE = 255;
@@ -8607,7 +8035,7 @@ function _getSphereBoundsInfo(referencedVolume, sphereInfo) {
8607
8035
  }
8608
8036
  function _createSubVolumeFromSphere(referencedVolume, sphereInfo, viewport) {
8609
8037
  const refVolImageData = referencedVolume.imageData;
8610
- const camera = viewport.getCamera();
8038
+ const camera = getViewportICamera(viewport);
8611
8039
  const { ijkVecRowDir, ijkVecColDir } = csUtils.getVolumeDirectionVectors(refVolImageData, camera);
8612
8040
  const obliqueView = [ijkVecRowDir, ijkVecColDir].some((vec) => !csUtils.isEqual(Math.abs(vec[0]), 1) &&
8613
8041
  !csUtils.isEqual(Math.abs(vec[1]), 1) &&
@@ -8691,7 +8119,7 @@ function _setNegativeSeedValues(subVolume, labelmap, sphereInfo, viewport, optio
8691
8119
  const subVolPixelData = subVolume.voxelManager.getCompleteScalarDataArray();
8692
8120
  const [columns, rows, numSlices] = labelmap.dimensions;
8693
8121
  const numPixelsPerSlice = columns * rows;
8694
- const { worldVecRowDir, worldVecSliceDir } = csUtils.getVolumeDirectionVectors(labelmap.imageData, viewport.getCamera());
8122
+ const { worldVecRowDir, worldVecSliceDir } = csUtils.getVolumeDirectionVectors(labelmap.imageData, getViewportICamera(viewport));
8695
8123
  const ijkSphereCenter = transformWorldToIndex(subVolume.imageData, sphereInfo.center);
8696
8124
  const referencePixelValue = subVolPixelData[ijkSphereCenter[2] * columns * rows +
8697
8125
  ijkSphereCenter[1] * columns +
@@ -9073,7 +8501,7 @@ async function runOneClickGrowCut({ referencedVolumeId, worldPosition, options,
9073
8501
 
9074
8502
 
9075
8503
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/createLabelmapMemo.js
9076
- var createLabelmapMemo = __webpack_require__(2397);
8504
+ var createLabelmapMemo = __webpack_require__(24778);
9077
8505
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/islandRemoval.js
9078
8506
  var islandRemoval = __webpack_require__(67912);
9079
8507
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/getOrCreateSegmentationVolume.js
@@ -9894,823 +9322,6 @@ const computeWorker = {
9894
9322
  (0,comlink/* .expose */.p)(computeWorker);
9895
9323
 
9896
9324
 
9897
- },
9898
- 32591(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
9899
- __webpack_require__.r(__webpack_exports__);
9900
- __webpack_require__.d(__webpack_exports__, {
9901
- add: () => (add),
9902
- adjoint: () => (adjoint),
9903
- clone: () => (clone),
9904
- copy: () => (copy),
9905
- create: () => (create),
9906
- determinant: () => (determinant),
9907
- equals: () => (equals),
9908
- exactEquals: () => (exactEquals),
9909
- frob: () => (frob),
9910
- fromMat2d: () => (fromMat2d),
9911
- fromMat4: () => (fromMat4),
9912
- fromQuat: () => (fromQuat),
9913
- fromRotation: () => (fromRotation),
9914
- fromScaling: () => (fromScaling),
9915
- fromTranslation: () => (fromTranslation),
9916
- fromValues: () => (fromValues),
9917
- identity: () => (identity),
9918
- invert: () => (invert),
9919
- mul: () => (mul),
9920
- multiply: () => (multiply),
9921
- multiplyScalar: () => (multiplyScalar),
9922
- multiplyScalarAndAdd: () => (multiplyScalarAndAdd),
9923
- normalFromMat4: () => (normalFromMat4),
9924
- projection: () => (projection),
9925
- rotate: () => (rotate),
9926
- scale: () => (scale),
9927
- set: () => (set),
9928
- str: () => (str),
9929
- sub: () => (sub),
9930
- subtract: () => (subtract),
9931
- translate: () => (translate),
9932
- transpose: () => (transpose)
9933
- });
9934
- /* import */ var _common_js__rspack_import_0 = __webpack_require__(24457);
9935
-
9936
- /**
9937
- * 3x3 Matrix
9938
- * @module mat3
9939
- */
9940
-
9941
- /**
9942
- * Creates a new identity mat3
9943
- *
9944
- * @returns {mat3} a new 3x3 matrix
9945
- */
9946
-
9947
- function create() {
9948
- var out = new _common_js__rspack_import_0/* .ARRAY_TYPE */.tb(9);
9949
-
9950
- if (_common_js__rspack_import_0/* .ARRAY_TYPE */.tb != Float32Array) {
9951
- out[1] = 0;
9952
- out[2] = 0;
9953
- out[3] = 0;
9954
- out[5] = 0;
9955
- out[6] = 0;
9956
- out[7] = 0;
9957
- }
9958
-
9959
- out[0] = 1;
9960
- out[4] = 1;
9961
- out[8] = 1;
9962
- return out;
9963
- }
9964
- /**
9965
- * Copies the upper-left 3x3 values into the given mat3.
9966
- *
9967
- * @param {mat3} out the receiving 3x3 matrix
9968
- * @param {ReadonlyMat4} a the source 4x4 matrix
9969
- * @returns {mat3} out
9970
- */
9971
-
9972
- function fromMat4(out, a) {
9973
- out[0] = a[0];
9974
- out[1] = a[1];
9975
- out[2] = a[2];
9976
- out[3] = a[4];
9977
- out[4] = a[5];
9978
- out[5] = a[6];
9979
- out[6] = a[8];
9980
- out[7] = a[9];
9981
- out[8] = a[10];
9982
- return out;
9983
- }
9984
- /**
9985
- * Creates a new mat3 initialized with values from an existing matrix
9986
- *
9987
- * @param {ReadonlyMat3} a matrix to clone
9988
- * @returns {mat3} a new 3x3 matrix
9989
- */
9990
-
9991
- function clone(a) {
9992
- var out = new _common_js__rspack_import_0/* .ARRAY_TYPE */.tb(9);
9993
- out[0] = a[0];
9994
- out[1] = a[1];
9995
- out[2] = a[2];
9996
- out[3] = a[3];
9997
- out[4] = a[4];
9998
- out[5] = a[5];
9999
- out[6] = a[6];
10000
- out[7] = a[7];
10001
- out[8] = a[8];
10002
- return out;
10003
- }
10004
- /**
10005
- * Copy the values from one mat3 to another
10006
- *
10007
- * @param {mat3} out the receiving matrix
10008
- * @param {ReadonlyMat3} a the source matrix
10009
- * @returns {mat3} out
10010
- */
10011
-
10012
- function copy(out, a) {
10013
- out[0] = a[0];
10014
- out[1] = a[1];
10015
- out[2] = a[2];
10016
- out[3] = a[3];
10017
- out[4] = a[4];
10018
- out[5] = a[5];
10019
- out[6] = a[6];
10020
- out[7] = a[7];
10021
- out[8] = a[8];
10022
- return out;
10023
- }
10024
- /**
10025
- * Create a new mat3 with the given values
10026
- *
10027
- * @param {Number} m00 Component in column 0, row 0 position (index 0)
10028
- * @param {Number} m01 Component in column 0, row 1 position (index 1)
10029
- * @param {Number} m02 Component in column 0, row 2 position (index 2)
10030
- * @param {Number} m10 Component in column 1, row 0 position (index 3)
10031
- * @param {Number} m11 Component in column 1, row 1 position (index 4)
10032
- * @param {Number} m12 Component in column 1, row 2 position (index 5)
10033
- * @param {Number} m20 Component in column 2, row 0 position (index 6)
10034
- * @param {Number} m21 Component in column 2, row 1 position (index 7)
10035
- * @param {Number} m22 Component in column 2, row 2 position (index 8)
10036
- * @returns {mat3} A new mat3
10037
- */
10038
-
10039
- function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {
10040
- var out = new _common_js__rspack_import_0/* .ARRAY_TYPE */.tb(9);
10041
- out[0] = m00;
10042
- out[1] = m01;
10043
- out[2] = m02;
10044
- out[3] = m10;
10045
- out[4] = m11;
10046
- out[5] = m12;
10047
- out[6] = m20;
10048
- out[7] = m21;
10049
- out[8] = m22;
10050
- return out;
10051
- }
10052
- /**
10053
- * Set the components of a mat3 to the given values
10054
- *
10055
- * @param {mat3} out the receiving matrix
10056
- * @param {Number} m00 Component in column 0, row 0 position (index 0)
10057
- * @param {Number} m01 Component in column 0, row 1 position (index 1)
10058
- * @param {Number} m02 Component in column 0, row 2 position (index 2)
10059
- * @param {Number} m10 Component in column 1, row 0 position (index 3)
10060
- * @param {Number} m11 Component in column 1, row 1 position (index 4)
10061
- * @param {Number} m12 Component in column 1, row 2 position (index 5)
10062
- * @param {Number} m20 Component in column 2, row 0 position (index 6)
10063
- * @param {Number} m21 Component in column 2, row 1 position (index 7)
10064
- * @param {Number} m22 Component in column 2, row 2 position (index 8)
10065
- * @returns {mat3} out
10066
- */
10067
-
10068
- function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {
10069
- out[0] = m00;
10070
- out[1] = m01;
10071
- out[2] = m02;
10072
- out[3] = m10;
10073
- out[4] = m11;
10074
- out[5] = m12;
10075
- out[6] = m20;
10076
- out[7] = m21;
10077
- out[8] = m22;
10078
- return out;
10079
- }
10080
- /**
10081
- * Set a mat3 to the identity matrix
10082
- *
10083
- * @param {mat3} out the receiving matrix
10084
- * @returns {mat3} out
10085
- */
10086
-
10087
- function identity(out) {
10088
- out[0] = 1;
10089
- out[1] = 0;
10090
- out[2] = 0;
10091
- out[3] = 0;
10092
- out[4] = 1;
10093
- out[5] = 0;
10094
- out[6] = 0;
10095
- out[7] = 0;
10096
- out[8] = 1;
10097
- return out;
10098
- }
10099
- /**
10100
- * Transpose the values of a mat3
10101
- *
10102
- * @param {mat3} out the receiving matrix
10103
- * @param {ReadonlyMat3} a the source matrix
10104
- * @returns {mat3} out
10105
- */
10106
-
10107
- function transpose(out, a) {
10108
- // If we are transposing ourselves we can skip a few steps but have to cache some values
10109
- if (out === a) {
10110
- var a01 = a[1],
10111
- a02 = a[2],
10112
- a12 = a[5];
10113
- out[1] = a[3];
10114
- out[2] = a[6];
10115
- out[3] = a01;
10116
- out[5] = a[7];
10117
- out[6] = a02;
10118
- out[7] = a12;
10119
- } else {
10120
- out[0] = a[0];
10121
- out[1] = a[3];
10122
- out[2] = a[6];
10123
- out[3] = a[1];
10124
- out[4] = a[4];
10125
- out[5] = a[7];
10126
- out[6] = a[2];
10127
- out[7] = a[5];
10128
- out[8] = a[8];
10129
- }
10130
-
10131
- return out;
10132
- }
10133
- /**
10134
- * Inverts a mat3
10135
- *
10136
- * @param {mat3} out the receiving matrix
10137
- * @param {ReadonlyMat3} a the source matrix
10138
- * @returns {mat3} out
10139
- */
10140
-
10141
- function invert(out, a) {
10142
- var a00 = a[0],
10143
- a01 = a[1],
10144
- a02 = a[2];
10145
- var a10 = a[3],
10146
- a11 = a[4],
10147
- a12 = a[5];
10148
- var a20 = a[6],
10149
- a21 = a[7],
10150
- a22 = a[8];
10151
- var b01 = a22 * a11 - a12 * a21;
10152
- var b11 = -a22 * a10 + a12 * a20;
10153
- var b21 = a21 * a10 - a11 * a20; // Calculate the determinant
10154
-
10155
- var det = a00 * b01 + a01 * b11 + a02 * b21;
10156
-
10157
- if (!det) {
10158
- return null;
10159
- }
10160
-
10161
- det = 1.0 / det;
10162
- out[0] = b01 * det;
10163
- out[1] = (-a22 * a01 + a02 * a21) * det;
10164
- out[2] = (a12 * a01 - a02 * a11) * det;
10165
- out[3] = b11 * det;
10166
- out[4] = (a22 * a00 - a02 * a20) * det;
10167
- out[5] = (-a12 * a00 + a02 * a10) * det;
10168
- out[6] = b21 * det;
10169
- out[7] = (-a21 * a00 + a01 * a20) * det;
10170
- out[8] = (a11 * a00 - a01 * a10) * det;
10171
- return out;
10172
- }
10173
- /**
10174
- * Calculates the adjugate of a mat3
10175
- *
10176
- * @param {mat3} out the receiving matrix
10177
- * @param {ReadonlyMat3} a the source matrix
10178
- * @returns {mat3} out
10179
- */
10180
-
10181
- function adjoint(out, a) {
10182
- var a00 = a[0],
10183
- a01 = a[1],
10184
- a02 = a[2];
10185
- var a10 = a[3],
10186
- a11 = a[4],
10187
- a12 = a[5];
10188
- var a20 = a[6],
10189
- a21 = a[7],
10190
- a22 = a[8];
10191
- out[0] = a11 * a22 - a12 * a21;
10192
- out[1] = a02 * a21 - a01 * a22;
10193
- out[2] = a01 * a12 - a02 * a11;
10194
- out[3] = a12 * a20 - a10 * a22;
10195
- out[4] = a00 * a22 - a02 * a20;
10196
- out[5] = a02 * a10 - a00 * a12;
10197
- out[6] = a10 * a21 - a11 * a20;
10198
- out[7] = a01 * a20 - a00 * a21;
10199
- out[8] = a00 * a11 - a01 * a10;
10200
- return out;
10201
- }
10202
- /**
10203
- * Calculates the determinant of a mat3
10204
- *
10205
- * @param {ReadonlyMat3} a the source matrix
10206
- * @returns {Number} determinant of a
10207
- */
10208
-
10209
- function determinant(a) {
10210
- var a00 = a[0],
10211
- a01 = a[1],
10212
- a02 = a[2];
10213
- var a10 = a[3],
10214
- a11 = a[4],
10215
- a12 = a[5];
10216
- var a20 = a[6],
10217
- a21 = a[7],
10218
- a22 = a[8];
10219
- return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);
10220
- }
10221
- /**
10222
- * Multiplies two mat3's
10223
- *
10224
- * @param {mat3} out the receiving matrix
10225
- * @param {ReadonlyMat3} a the first operand
10226
- * @param {ReadonlyMat3} b the second operand
10227
- * @returns {mat3} out
10228
- */
10229
-
10230
- function multiply(out, a, b) {
10231
- var a00 = a[0],
10232
- a01 = a[1],
10233
- a02 = a[2];
10234
- var a10 = a[3],
10235
- a11 = a[4],
10236
- a12 = a[5];
10237
- var a20 = a[6],
10238
- a21 = a[7],
10239
- a22 = a[8];
10240
- var b00 = b[0],
10241
- b01 = b[1],
10242
- b02 = b[2];
10243
- var b10 = b[3],
10244
- b11 = b[4],
10245
- b12 = b[5];
10246
- var b20 = b[6],
10247
- b21 = b[7],
10248
- b22 = b[8];
10249
- out[0] = b00 * a00 + b01 * a10 + b02 * a20;
10250
- out[1] = b00 * a01 + b01 * a11 + b02 * a21;
10251
- out[2] = b00 * a02 + b01 * a12 + b02 * a22;
10252
- out[3] = b10 * a00 + b11 * a10 + b12 * a20;
10253
- out[4] = b10 * a01 + b11 * a11 + b12 * a21;
10254
- out[5] = b10 * a02 + b11 * a12 + b12 * a22;
10255
- out[6] = b20 * a00 + b21 * a10 + b22 * a20;
10256
- out[7] = b20 * a01 + b21 * a11 + b22 * a21;
10257
- out[8] = b20 * a02 + b21 * a12 + b22 * a22;
10258
- return out;
10259
- }
10260
- /**
10261
- * Translate a mat3 by the given vector
10262
- *
10263
- * @param {mat3} out the receiving matrix
10264
- * @param {ReadonlyMat3} a the matrix to translate
10265
- * @param {ReadonlyVec2} v vector to translate by
10266
- * @returns {mat3} out
10267
- */
10268
-
10269
- function translate(out, a, v) {
10270
- var a00 = a[0],
10271
- a01 = a[1],
10272
- a02 = a[2],
10273
- a10 = a[3],
10274
- a11 = a[4],
10275
- a12 = a[5],
10276
- a20 = a[6],
10277
- a21 = a[7],
10278
- a22 = a[8],
10279
- x = v[0],
10280
- y = v[1];
10281
- out[0] = a00;
10282
- out[1] = a01;
10283
- out[2] = a02;
10284
- out[3] = a10;
10285
- out[4] = a11;
10286
- out[5] = a12;
10287
- out[6] = x * a00 + y * a10 + a20;
10288
- out[7] = x * a01 + y * a11 + a21;
10289
- out[8] = x * a02 + y * a12 + a22;
10290
- return out;
10291
- }
10292
- /**
10293
- * Rotates a mat3 by the given angle
10294
- *
10295
- * @param {mat3} out the receiving matrix
10296
- * @param {ReadonlyMat3} a the matrix to rotate
10297
- * @param {Number} rad the angle to rotate the matrix by
10298
- * @returns {mat3} out
10299
- */
10300
-
10301
- function rotate(out, a, rad) {
10302
- var a00 = a[0],
10303
- a01 = a[1],
10304
- a02 = a[2],
10305
- a10 = a[3],
10306
- a11 = a[4],
10307
- a12 = a[5],
10308
- a20 = a[6],
10309
- a21 = a[7],
10310
- a22 = a[8],
10311
- s = Math.sin(rad),
10312
- c = Math.cos(rad);
10313
- out[0] = c * a00 + s * a10;
10314
- out[1] = c * a01 + s * a11;
10315
- out[2] = c * a02 + s * a12;
10316
- out[3] = c * a10 - s * a00;
10317
- out[4] = c * a11 - s * a01;
10318
- out[5] = c * a12 - s * a02;
10319
- out[6] = a20;
10320
- out[7] = a21;
10321
- out[8] = a22;
10322
- return out;
10323
- }
10324
- /**
10325
- * Scales the mat3 by the dimensions in the given vec2
10326
- *
10327
- * @param {mat3} out the receiving matrix
10328
- * @param {ReadonlyMat3} a the matrix to rotate
10329
- * @param {ReadonlyVec2} v the vec2 to scale the matrix by
10330
- * @returns {mat3} out
10331
- **/
10332
-
10333
- function scale(out, a, v) {
10334
- var x = v[0],
10335
- y = v[1];
10336
- out[0] = x * a[0];
10337
- out[1] = x * a[1];
10338
- out[2] = x * a[2];
10339
- out[3] = y * a[3];
10340
- out[4] = y * a[4];
10341
- out[5] = y * a[5];
10342
- out[6] = a[6];
10343
- out[7] = a[7];
10344
- out[8] = a[8];
10345
- return out;
10346
- }
10347
- /**
10348
- * Creates a matrix from a vector translation
10349
- * This is equivalent to (but much faster than):
10350
- *
10351
- * mat3.identity(dest);
10352
- * mat3.translate(dest, dest, vec);
10353
- *
10354
- * @param {mat3} out mat3 receiving operation result
10355
- * @param {ReadonlyVec2} v Translation vector
10356
- * @returns {mat3} out
10357
- */
10358
-
10359
- function fromTranslation(out, v) {
10360
- out[0] = 1;
10361
- out[1] = 0;
10362
- out[2] = 0;
10363
- out[3] = 0;
10364
- out[4] = 1;
10365
- out[5] = 0;
10366
- out[6] = v[0];
10367
- out[7] = v[1];
10368
- out[8] = 1;
10369
- return out;
10370
- }
10371
- /**
10372
- * Creates a matrix from a given angle
10373
- * This is equivalent to (but much faster than):
10374
- *
10375
- * mat3.identity(dest);
10376
- * mat3.rotate(dest, dest, rad);
10377
- *
10378
- * @param {mat3} out mat3 receiving operation result
10379
- * @param {Number} rad the angle to rotate the matrix by
10380
- * @returns {mat3} out
10381
- */
10382
-
10383
- function fromRotation(out, rad) {
10384
- var s = Math.sin(rad),
10385
- c = Math.cos(rad);
10386
- out[0] = c;
10387
- out[1] = s;
10388
- out[2] = 0;
10389
- out[3] = -s;
10390
- out[4] = c;
10391
- out[5] = 0;
10392
- out[6] = 0;
10393
- out[7] = 0;
10394
- out[8] = 1;
10395
- return out;
10396
- }
10397
- /**
10398
- * Creates a matrix from a vector scaling
10399
- * This is equivalent to (but much faster than):
10400
- *
10401
- * mat3.identity(dest);
10402
- * mat3.scale(dest, dest, vec);
10403
- *
10404
- * @param {mat3} out mat3 receiving operation result
10405
- * @param {ReadonlyVec2} v Scaling vector
10406
- * @returns {mat3} out
10407
- */
10408
-
10409
- function fromScaling(out, v) {
10410
- out[0] = v[0];
10411
- out[1] = 0;
10412
- out[2] = 0;
10413
- out[3] = 0;
10414
- out[4] = v[1];
10415
- out[5] = 0;
10416
- out[6] = 0;
10417
- out[7] = 0;
10418
- out[8] = 1;
10419
- return out;
10420
- }
10421
- /**
10422
- * Copies the values from a mat2d into a mat3
10423
- *
10424
- * @param {mat3} out the receiving matrix
10425
- * @param {ReadonlyMat2d} a the matrix to copy
10426
- * @returns {mat3} out
10427
- **/
10428
-
10429
- function fromMat2d(out, a) {
10430
- out[0] = a[0];
10431
- out[1] = a[1];
10432
- out[2] = 0;
10433
- out[3] = a[2];
10434
- out[4] = a[3];
10435
- out[5] = 0;
10436
- out[6] = a[4];
10437
- out[7] = a[5];
10438
- out[8] = 1;
10439
- return out;
10440
- }
10441
- /**
10442
- * Calculates a 3x3 matrix from the given quaternion
10443
- *
10444
- * @param {mat3} out mat3 receiving operation result
10445
- * @param {ReadonlyQuat} q Quaternion to create matrix from
10446
- *
10447
- * @returns {mat3} out
10448
- */
10449
-
10450
- function fromQuat(out, q) {
10451
- var x = q[0],
10452
- y = q[1],
10453
- z = q[2],
10454
- w = q[3];
10455
- var x2 = x + x;
10456
- var y2 = y + y;
10457
- var z2 = z + z;
10458
- var xx = x * x2;
10459
- var yx = y * x2;
10460
- var yy = y * y2;
10461
- var zx = z * x2;
10462
- var zy = z * y2;
10463
- var zz = z * z2;
10464
- var wx = w * x2;
10465
- var wy = w * y2;
10466
- var wz = w * z2;
10467
- out[0] = 1 - yy - zz;
10468
- out[3] = yx - wz;
10469
- out[6] = zx + wy;
10470
- out[1] = yx + wz;
10471
- out[4] = 1 - xx - zz;
10472
- out[7] = zy - wx;
10473
- out[2] = zx - wy;
10474
- out[5] = zy + wx;
10475
- out[8] = 1 - xx - yy;
10476
- return out;
10477
- }
10478
- /**
10479
- * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix
10480
- *
10481
- * @param {mat3} out mat3 receiving operation result
10482
- * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from
10483
- *
10484
- * @returns {mat3} out
10485
- */
10486
-
10487
- function normalFromMat4(out, a) {
10488
- var a00 = a[0],
10489
- a01 = a[1],
10490
- a02 = a[2],
10491
- a03 = a[3];
10492
- var a10 = a[4],
10493
- a11 = a[5],
10494
- a12 = a[6],
10495
- a13 = a[7];
10496
- var a20 = a[8],
10497
- a21 = a[9],
10498
- a22 = a[10],
10499
- a23 = a[11];
10500
- var a30 = a[12],
10501
- a31 = a[13],
10502
- a32 = a[14],
10503
- a33 = a[15];
10504
- var b00 = a00 * a11 - a01 * a10;
10505
- var b01 = a00 * a12 - a02 * a10;
10506
- var b02 = a00 * a13 - a03 * a10;
10507
- var b03 = a01 * a12 - a02 * a11;
10508
- var b04 = a01 * a13 - a03 * a11;
10509
- var b05 = a02 * a13 - a03 * a12;
10510
- var b06 = a20 * a31 - a21 * a30;
10511
- var b07 = a20 * a32 - a22 * a30;
10512
- var b08 = a20 * a33 - a23 * a30;
10513
- var b09 = a21 * a32 - a22 * a31;
10514
- var b10 = a21 * a33 - a23 * a31;
10515
- var b11 = a22 * a33 - a23 * a32; // Calculate the determinant
10516
-
10517
- var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
10518
-
10519
- if (!det) {
10520
- return null;
10521
- }
10522
-
10523
- det = 1.0 / det;
10524
- out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
10525
- out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
10526
- out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
10527
- out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
10528
- out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
10529
- out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
10530
- out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
10531
- out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
10532
- out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
10533
- return out;
10534
- }
10535
- /**
10536
- * Generates a 2D projection matrix with the given bounds
10537
- *
10538
- * @param {mat3} out mat3 frustum matrix will be written into
10539
- * @param {number} width Width of your gl context
10540
- * @param {number} height Height of gl context
10541
- * @returns {mat3} out
10542
- */
10543
-
10544
- function projection(out, width, height) {
10545
- out[0] = 2 / width;
10546
- out[1] = 0;
10547
- out[2] = 0;
10548
- out[3] = 0;
10549
- out[4] = -2 / height;
10550
- out[5] = 0;
10551
- out[6] = -1;
10552
- out[7] = 1;
10553
- out[8] = 1;
10554
- return out;
10555
- }
10556
- /**
10557
- * Returns a string representation of a mat3
10558
- *
10559
- * @param {ReadonlyMat3} a matrix to represent as a string
10560
- * @returns {String} string representation of the matrix
10561
- */
10562
-
10563
- function str(a) {
10564
- return "mat3(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ", " + a[8] + ")";
10565
- }
10566
- /**
10567
- * Returns Frobenius norm of a mat3
10568
- *
10569
- * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of
10570
- * @returns {Number} Frobenius norm
10571
- */
10572
-
10573
- function frob(a) {
10574
- return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);
10575
- }
10576
- /**
10577
- * Adds two mat3's
10578
- *
10579
- * @param {mat3} out the receiving matrix
10580
- * @param {ReadonlyMat3} a the first operand
10581
- * @param {ReadonlyMat3} b the second operand
10582
- * @returns {mat3} out
10583
- */
10584
-
10585
- function add(out, a, b) {
10586
- out[0] = a[0] + b[0];
10587
- out[1] = a[1] + b[1];
10588
- out[2] = a[2] + b[2];
10589
- out[3] = a[3] + b[3];
10590
- out[4] = a[4] + b[4];
10591
- out[5] = a[5] + b[5];
10592
- out[6] = a[6] + b[6];
10593
- out[7] = a[7] + b[7];
10594
- out[8] = a[8] + b[8];
10595
- return out;
10596
- }
10597
- /**
10598
- * Subtracts matrix b from matrix a
10599
- *
10600
- * @param {mat3} out the receiving matrix
10601
- * @param {ReadonlyMat3} a the first operand
10602
- * @param {ReadonlyMat3} b the second operand
10603
- * @returns {mat3} out
10604
- */
10605
-
10606
- function subtract(out, a, b) {
10607
- out[0] = a[0] - b[0];
10608
- out[1] = a[1] - b[1];
10609
- out[2] = a[2] - b[2];
10610
- out[3] = a[3] - b[3];
10611
- out[4] = a[4] - b[4];
10612
- out[5] = a[5] - b[5];
10613
- out[6] = a[6] - b[6];
10614
- out[7] = a[7] - b[7];
10615
- out[8] = a[8] - b[8];
10616
- return out;
10617
- }
10618
- /**
10619
- * Multiply each element of the matrix by a scalar.
10620
- *
10621
- * @param {mat3} out the receiving matrix
10622
- * @param {ReadonlyMat3} a the matrix to scale
10623
- * @param {Number} b amount to scale the matrix's elements by
10624
- * @returns {mat3} out
10625
- */
10626
-
10627
- function multiplyScalar(out, a, b) {
10628
- out[0] = a[0] * b;
10629
- out[1] = a[1] * b;
10630
- out[2] = a[2] * b;
10631
- out[3] = a[3] * b;
10632
- out[4] = a[4] * b;
10633
- out[5] = a[5] * b;
10634
- out[6] = a[6] * b;
10635
- out[7] = a[7] * b;
10636
- out[8] = a[8] * b;
10637
- return out;
10638
- }
10639
- /**
10640
- * Adds two mat3's after multiplying each element of the second operand by a scalar value.
10641
- *
10642
- * @param {mat3} out the receiving vector
10643
- * @param {ReadonlyMat3} a the first operand
10644
- * @param {ReadonlyMat3} b the second operand
10645
- * @param {Number} scale the amount to scale b's elements by before adding
10646
- * @returns {mat3} out
10647
- */
10648
-
10649
- function multiplyScalarAndAdd(out, a, b, scale) {
10650
- out[0] = a[0] + b[0] * scale;
10651
- out[1] = a[1] + b[1] * scale;
10652
- out[2] = a[2] + b[2] * scale;
10653
- out[3] = a[3] + b[3] * scale;
10654
- out[4] = a[4] + b[4] * scale;
10655
- out[5] = a[5] + b[5] * scale;
10656
- out[6] = a[6] + b[6] * scale;
10657
- out[7] = a[7] + b[7] * scale;
10658
- out[8] = a[8] + b[8] * scale;
10659
- return out;
10660
- }
10661
- /**
10662
- * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
10663
- *
10664
- * @param {ReadonlyMat3} a The first matrix.
10665
- * @param {ReadonlyMat3} b The second matrix.
10666
- * @returns {Boolean} True if the matrices are equal, false otherwise.
10667
- */
10668
-
10669
- function exactEquals(a, b) {
10670
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];
10671
- }
10672
- /**
10673
- * Returns whether or not the matrices have approximately the same elements in the same position.
10674
- *
10675
- * @param {ReadonlyMat3} a The first matrix.
10676
- * @param {ReadonlyMat3} b The second matrix.
10677
- * @returns {Boolean} True if the matrices are equal, false otherwise.
10678
- */
10679
-
10680
- function equals(a, b) {
10681
- var a0 = a[0],
10682
- a1 = a[1],
10683
- a2 = a[2],
10684
- a3 = a[3],
10685
- a4 = a[4],
10686
- a5 = a[5],
10687
- a6 = a[6],
10688
- a7 = a[7],
10689
- a8 = a[8];
10690
- var b0 = b[0],
10691
- b1 = b[1],
10692
- b2 = b[2],
10693
- b3 = b[3],
10694
- b4 = b[4],
10695
- b5 = b[5],
10696
- b6 = b[6],
10697
- b7 = b[7],
10698
- b8 = b[8];
10699
- return Math.abs(a0 - b0) <= _common_js__rspack_import_0/* .EPSILON */.p8 * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__rspack_import_0/* .EPSILON */.p8 * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__rspack_import_0/* .EPSILON */.p8 * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__rspack_import_0/* .EPSILON */.p8 * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= _common_js__rspack_import_0/* .EPSILON */.p8 * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= _common_js__rspack_import_0/* .EPSILON */.p8 * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= _common_js__rspack_import_0/* .EPSILON */.p8 * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= _common_js__rspack_import_0/* .EPSILON */.p8 * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= _common_js__rspack_import_0/* .EPSILON */.p8 * Math.max(1.0, Math.abs(a8), Math.abs(b8));
10700
- }
10701
- /**
10702
- * Alias for {@link mat3.multiply}
10703
- * @function
10704
- */
10705
-
10706
- var mul = multiply;
10707
- /**
10708
- * Alias for {@link mat3.subtract}
10709
- * @function
10710
- */
10711
-
10712
- var sub = subtract;
10713
-
10714
9325
  },
10715
9326
  28910(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
10716
9327
  __webpack_require__.r(__webpack_exports__);