@ohif/app 3.14.0-beta.97 → 3.14.0-beta.99

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 (62) hide show
  1. package/dist/{1645.bundle.a98b9ca6.js → 1645.bundle.1a466b16.js} +600 -600
  2. package/dist/{1788.bundle.3f1349d2.js → 1788.bundle.962951f9.js} +26 -26
  3. package/dist/{1793.bundle.27458a55.js → 1793.bundle.30f89e46.js} +5 -3
  4. package/dist/{1862.bundle.79bfe469.js → 1862.bundle.3ae388c3.js} +2 -2
  5. package/dist/204.bundle.bc44c201.js +101 -0
  6. package/dist/204.bundle.css +52 -0
  7. package/dist/{2748.bundle.eaa94e2e.js → 2103.bundle.1cf348e8.js} +1 -1771
  8. package/dist/{2478.bundle.fc6ab30b.js → 2478.bundle.68ff1b2d.js} +2 -2
  9. package/dist/{2717.bundle.d5f58443.js → 2717.bundle.4318f1ee.js} +45 -43
  10. package/dist/{5989.bundle.f484884a.js → 287.bundle.ee60c370.js} +4570 -832
  11. package/dist/{2894.bundle.d612efb2.js → 2894.bundle.30c0af5b.js} +20 -14
  12. package/dist/{2991.bundle.f94892fb.js → 2991.bundle.77642eee.js} +101 -97
  13. package/dist/{3004.bundle.51919fdc.js → 3004.bundle.5568149a.js} +39 -38
  14. package/dist/{3255.bundle.13e205ac.js → 3255.bundle.3272671f.js} +29 -27
  15. package/dist/{3366.bundle.62baeeec.js → 3366.bundle.d9e78e25.js} +57 -53
  16. package/dist/{3468.bundle.f5dc5e44.js → 3468.bundle.666f2441.js} +37 -27
  17. package/dist/{347.bundle.397bb252.js → 347.bundle.1323658e.js} +44 -44
  18. package/dist/{3622.bundle.f4cf2d16.js → 3622.bundle.edb42b96.js} +56 -54
  19. package/dist/{3723.bundle.eab70100.js → 3723.bundle.43ff1971.js} +1 -1
  20. package/dist/{3771.bundle.aba09bd7.js → 3771.bundle.a5754f97.js} +8 -8
  21. package/dist/{4449.bundle.aaa4ab92.js → 4487.bundle.fa0375a4.js} +853 -95
  22. package/dist/{4606.bundle.a3485206.js → 4606.bundle.6c297e2a.js} +9 -7
  23. package/dist/{4998.bundle.3aedb48d.js → 4998.bundle.25b8cbfe.js} +5 -3
  24. package/dist/{5076.bundle.95c07142.js → 5076.bundle.2a14756f.js} +66 -66
  25. package/dist/{5143.bundle.04f54c00.js → 5143.bundle.53156bb0.js} +358 -226
  26. package/dist/{5154.bundle.2f460017.js → 5154.bundle.ccd02dd7.js} +5 -3
  27. package/dist/{5320.bundle.9b05cebb.js → 5320.bundle.c17eb4a7.js} +678 -546
  28. package/dist/{6212.bundle.e505e123.js → 6212.bundle.c4856be7.js} +48 -46
  29. package/dist/{6253.bundle.9b473339.js → 6253.bundle.596ce463.js} +1225 -1145
  30. package/dist/{1153.bundle.51d39e80.js → 6314.bundle.5aadfe48.js} +199 -420
  31. package/dist/{641.bundle.4627a8e1.js → 641.bundle.8e45751e.js} +89 -89
  32. package/dist/{6481.bundle.d2fca485.js → 6481.bundle.85093e70.js} +29 -23
  33. package/dist/{6507.bundle.d52f5e81.js → 6507.bundle.bbcdd01e.js} +76 -76
  34. package/dist/{6722.bundle.d09a8aad.js → 6722.bundle.3e9a4ef6.js} +4 -4
  35. package/dist/{6956.bundle.c82fd790.js → 6956.bundle.dc0e8660.js} +33 -33
  36. package/dist/{7526.bundle.0685dfeb.js → 7526.bundle.3460c3ca.js} +55 -53
  37. package/dist/{7604.bundle.9eb317c8.js → 7604.bundle.f1eeded4.js} +2 -2
  38. package/dist/{8312.bundle.2cb75b58.js → 8312.bundle.d67b6f4e.js} +652 -687
  39. package/dist/{6847.bundle.b2adb444.js → 8729.bundle.e17fe9b2.js} +87 -845
  40. package/dist/{8788.bundle.4bb4c65b.js → 8788.bundle.83ddf642.js} +21 -20
  41. package/dist/{8868.bundle.4c357767.js → 8868.bundle.8f3653b3.js} +31 -31
  42. package/dist/{8923.bundle.9aca06c4.js → 8923.bundle.8b682e96.js} +148 -148
  43. package/dist/{899.bundle.9a033d16.js → 899.bundle.4e1aee7f.js} +73 -203
  44. package/dist/{9187.bundle.8f72b4fe.js → 9187.bundle.407afa07.js} +112 -110
  45. package/dist/9385.bundle.fb0bbf4a.js +1888 -0
  46. package/dist/{9481.bundle.ccb81f53.js → 9481.bundle.d045ae3a.js} +8 -6
  47. package/dist/{9517.bundle.1ae74db3.js → 9517.bundle.3e2896ef.js} +31 -17
  48. package/dist/{9620.bundle.d1dc0be1.js → 9620.bundle.b4cc392c.js} +63 -61
  49. package/dist/{9841.bundle.0f40f02b.js → 9841.bundle.4f2c401a.js} +93 -91
  50. package/dist/{9886.bundle.cabb4a24.js → 9886.bundle.b00d5d78.js} +4 -4
  51. package/dist/{8037.bundle.30a187f7.js → 9889.bundle.bf312047.js} +7743 -1098
  52. package/dist/{9948.bundle.1172ebca.js → 9948.bundle.fecf81f8.js} +5 -5
  53. package/dist/{app.bundle.12bfd0b7.js → app.bundle.bb359653.js} +1953 -1245
  54. package/dist/{compute.bundle.0ed1fe87.js → compute.bundle.9267d449.js} +13 -12
  55. package/dist/{histogram-worker.bundle.58e60d7c.js → histogram-worker.bundle.29bcdbf6.js} +6 -5
  56. package/dist/index.html +1 -1
  57. package/dist/{interpolation.bundle.5a53d112.js → interpolation.bundle.ee9998a4.js} +8 -7
  58. package/dist/{lib-router.bundle.a5ac870a.js → lib-router.bundle.2a887bc7.js} +334 -201
  59. package/dist/{polySeg.bundle.b4089601.js → polySeg.bundle.a55f8eee.js} +12 -12
  60. package/dist/sw.js +11 -1
  61. package/package.json +14 -19
  62. package/dist/1566.bundle.d58db206.js +0 -3610
@@ -1,61 +1,819 @@
1
1
  "use strict";
2
- (globalThis["rspackChunk_ohif_app"] ||= []).push([[4449], {
3
- 23172(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
2
+ (globalThis["rspackChunk_ohif_app"] ||= []).push([[4487], {
3
+ 45878(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
4
+ __webpack_require__.r(__webpack_exports__);
5
+ /* import */ var _common_js__rspack_import_0 = __webpack_require__(23172);
6
+
4
7
  /**
5
- * Common utilities
6
- * @module glMatrix
8
+ * 3x3 Matrix
9
+ * @module mat3
7
10
  */
8
- // Configuration Constants
9
- var EPSILON = 0.000001;
10
- var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;
11
- var RANDOM = (/* unused pure expression or super */ null && (Math.random));
11
+
12
12
  /**
13
- * Sets the type of array used when creating new vectors and matrices
13
+ * Creates a new identity mat3
14
14
  *
15
- * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array
15
+ * @returns {mat3} a new 3x3 matrix
16
16
  */
17
17
 
18
- function setMatrixArrayType(type) {
19
- ARRAY_TYPE = type;
18
+ function create() {
19
+ var out = new _common_js__rspack_import_0.ARRAY_TYPE(9);
20
+
21
+ if (_common_js__rspack_import_0.ARRAY_TYPE != Float32Array) {
22
+ out[1] = 0;
23
+ out[2] = 0;
24
+ out[3] = 0;
25
+ out[5] = 0;
26
+ out[6] = 0;
27
+ out[7] = 0;
28
+ }
29
+
30
+ out[0] = 1;
31
+ out[4] = 1;
32
+ out[8] = 1;
33
+ return out;
20
34
  }
21
- var degree = Math.PI / 180;
22
35
  /**
23
- * Convert Degree To Radian
36
+ * Copies the upper-left 3x3 values into the given mat3.
24
37
  *
25
- * @param {Number} a Angle in Degrees
38
+ * @param {mat3} out the receiving 3x3 matrix
39
+ * @param {ReadonlyMat4} a the source 4x4 matrix
40
+ * @returns {mat3} out
26
41
  */
27
42
 
28
- function toRadian(a) {
29
- return a * degree;
43
+ function fromMat4(out, a) {
44
+ out[0] = a[0];
45
+ out[1] = a[1];
46
+ out[2] = a[2];
47
+ out[3] = a[4];
48
+ out[4] = a[5];
49
+ out[5] = a[6];
50
+ out[6] = a[8];
51
+ out[7] = a[9];
52
+ out[8] = a[10];
53
+ return out;
30
54
  }
31
55
  /**
32
- * Tests whether or not the arguments have approximately the same value, within an absolute
33
- * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less
34
- * than or equal to 1.0, and a relative tolerance is used for larger values)
56
+ * Creates a new mat3 initialized with values from an existing matrix
35
57
  *
36
- * @param {Number} a The first number to test.
37
- * @param {Number} b The second number to test.
38
- * @returns {Boolean} True if the numbers are approximately equal, false otherwise.
58
+ * @param {ReadonlyMat3} a matrix to clone
59
+ * @returns {mat3} a new 3x3 matrix
39
60
  */
40
61
 
41
- function equals(a, b) {
42
- return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));
62
+ function clone(a) {
63
+ var out = new _common_js__rspack_import_0.ARRAY_TYPE(9);
64
+ out[0] = a[0];
65
+ out[1] = a[1];
66
+ out[2] = a[2];
67
+ out[3] = a[3];
68
+ out[4] = a[4];
69
+ out[5] = a[5];
70
+ out[6] = a[6];
71
+ out[7] = a[7];
72
+ out[8] = a[8];
73
+ return out;
74
+ }
75
+ /**
76
+ * Copy the values from one mat3 to another
77
+ *
78
+ * @param {mat3} out the receiving matrix
79
+ * @param {ReadonlyMat3} a the source matrix
80
+ * @returns {mat3} out
81
+ */
82
+
83
+ function copy(out, a) {
84
+ out[0] = a[0];
85
+ out[1] = a[1];
86
+ out[2] = a[2];
87
+ out[3] = a[3];
88
+ out[4] = a[4];
89
+ out[5] = a[5];
90
+ out[6] = a[6];
91
+ out[7] = a[7];
92
+ out[8] = a[8];
93
+ return out;
94
+ }
95
+ /**
96
+ * Create a new mat3 with the given values
97
+ *
98
+ * @param {Number} m00 Component in column 0, row 0 position (index 0)
99
+ * @param {Number} m01 Component in column 0, row 1 position (index 1)
100
+ * @param {Number} m02 Component in column 0, row 2 position (index 2)
101
+ * @param {Number} m10 Component in column 1, row 0 position (index 3)
102
+ * @param {Number} m11 Component in column 1, row 1 position (index 4)
103
+ * @param {Number} m12 Component in column 1, row 2 position (index 5)
104
+ * @param {Number} m20 Component in column 2, row 0 position (index 6)
105
+ * @param {Number} m21 Component in column 2, row 1 position (index 7)
106
+ * @param {Number} m22 Component in column 2, row 2 position (index 8)
107
+ * @returns {mat3} A new mat3
108
+ */
109
+
110
+ function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {
111
+ var out = new _common_js__rspack_import_0.ARRAY_TYPE(9);
112
+ out[0] = m00;
113
+ out[1] = m01;
114
+ out[2] = m02;
115
+ out[3] = m10;
116
+ out[4] = m11;
117
+ out[5] = m12;
118
+ out[6] = m20;
119
+ out[7] = m21;
120
+ out[8] = m22;
121
+ return out;
43
122
  }
44
- if (!Math.hypot) Math.hypot = function () {
45
- var y = 0,
46
- i = arguments.length;
123
+ /**
124
+ * Set the components of a mat3 to the given values
125
+ *
126
+ * @param {mat3} out the receiving matrix
127
+ * @param {Number} m00 Component in column 0, row 0 position (index 0)
128
+ * @param {Number} m01 Component in column 0, row 1 position (index 1)
129
+ * @param {Number} m02 Component in column 0, row 2 position (index 2)
130
+ * @param {Number} m10 Component in column 1, row 0 position (index 3)
131
+ * @param {Number} m11 Component in column 1, row 1 position (index 4)
132
+ * @param {Number} m12 Component in column 1, row 2 position (index 5)
133
+ * @param {Number} m20 Component in column 2, row 0 position (index 6)
134
+ * @param {Number} m21 Component in column 2, row 1 position (index 7)
135
+ * @param {Number} m22 Component in column 2, row 2 position (index 8)
136
+ * @returns {mat3} out
137
+ */
47
138
 
48
- while (i--) {
49
- y += arguments[i] * arguments[i];
139
+ function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {
140
+ out[0] = m00;
141
+ out[1] = m01;
142
+ out[2] = m02;
143
+ out[3] = m10;
144
+ out[4] = m11;
145
+ out[5] = m12;
146
+ out[6] = m20;
147
+ out[7] = m21;
148
+ out[8] = m22;
149
+ return out;
150
+ }
151
+ /**
152
+ * Set a mat3 to the identity matrix
153
+ *
154
+ * @param {mat3} out the receiving matrix
155
+ * @returns {mat3} out
156
+ */
157
+
158
+ function identity(out) {
159
+ out[0] = 1;
160
+ out[1] = 0;
161
+ out[2] = 0;
162
+ out[3] = 0;
163
+ out[4] = 1;
164
+ out[5] = 0;
165
+ out[6] = 0;
166
+ out[7] = 0;
167
+ out[8] = 1;
168
+ return out;
169
+ }
170
+ /**
171
+ * Transpose the values of a mat3
172
+ *
173
+ * @param {mat3} out the receiving matrix
174
+ * @param {ReadonlyMat3} a the source matrix
175
+ * @returns {mat3} out
176
+ */
177
+
178
+ function transpose(out, a) {
179
+ // If we are transposing ourselves we can skip a few steps but have to cache some values
180
+ if (out === a) {
181
+ var a01 = a[1],
182
+ a02 = a[2],
183
+ a12 = a[5];
184
+ out[1] = a[3];
185
+ out[2] = a[6];
186
+ out[3] = a01;
187
+ out[5] = a[7];
188
+ out[6] = a02;
189
+ out[7] = a12;
190
+ } else {
191
+ out[0] = a[0];
192
+ out[1] = a[3];
193
+ out[2] = a[6];
194
+ out[3] = a[1];
195
+ out[4] = a[4];
196
+ out[5] = a[7];
197
+ out[6] = a[2];
198
+ out[7] = a[5];
199
+ out[8] = a[8];
50
200
  }
51
201
 
52
- return Math.sqrt(y);
53
- };
202
+ return out;
203
+ }
204
+ /**
205
+ * Inverts a mat3
206
+ *
207
+ * @param {mat3} out the receiving matrix
208
+ * @param {ReadonlyMat3} a the source matrix
209
+ * @returns {mat3} out
210
+ */
211
+
212
+ function invert(out, a) {
213
+ var a00 = a[0],
214
+ a01 = a[1],
215
+ a02 = a[2];
216
+ var a10 = a[3],
217
+ a11 = a[4],
218
+ a12 = a[5];
219
+ var a20 = a[6],
220
+ a21 = a[7],
221
+ a22 = a[8];
222
+ var b01 = a22 * a11 - a12 * a21;
223
+ var b11 = -a22 * a10 + a12 * a20;
224
+ var b21 = a21 * a10 - a11 * a20; // Calculate the determinant
225
+
226
+ var det = a00 * b01 + a01 * b11 + a02 * b21;
227
+
228
+ if (!det) {
229
+ return null;
230
+ }
231
+
232
+ det = 1.0 / det;
233
+ out[0] = b01 * det;
234
+ out[1] = (-a22 * a01 + a02 * a21) * det;
235
+ out[2] = (a12 * a01 - a02 * a11) * det;
236
+ out[3] = b11 * det;
237
+ out[4] = (a22 * a00 - a02 * a20) * det;
238
+ out[5] = (-a12 * a00 + a02 * a10) * det;
239
+ out[6] = b21 * det;
240
+ out[7] = (-a21 * a00 + a01 * a20) * det;
241
+ out[8] = (a11 * a00 - a01 * a10) * det;
242
+ return out;
243
+ }
244
+ /**
245
+ * Calculates the adjugate of a mat3
246
+ *
247
+ * @param {mat3} out the receiving matrix
248
+ * @param {ReadonlyMat3} a the source matrix
249
+ * @returns {mat3} out
250
+ */
251
+
252
+ function adjoint(out, a) {
253
+ var a00 = a[0],
254
+ a01 = a[1],
255
+ a02 = a[2];
256
+ var a10 = a[3],
257
+ a11 = a[4],
258
+ a12 = a[5];
259
+ var a20 = a[6],
260
+ a21 = a[7],
261
+ a22 = a[8];
262
+ out[0] = a11 * a22 - a12 * a21;
263
+ out[1] = a02 * a21 - a01 * a22;
264
+ out[2] = a01 * a12 - a02 * a11;
265
+ out[3] = a12 * a20 - a10 * a22;
266
+ out[4] = a00 * a22 - a02 * a20;
267
+ out[5] = a02 * a10 - a00 * a12;
268
+ out[6] = a10 * a21 - a11 * a20;
269
+ out[7] = a01 * a20 - a00 * a21;
270
+ out[8] = a00 * a11 - a01 * a10;
271
+ return out;
272
+ }
273
+ /**
274
+ * Calculates the determinant of a mat3
275
+ *
276
+ * @param {ReadonlyMat3} a the source matrix
277
+ * @returns {Number} determinant of a
278
+ */
279
+
280
+ function determinant(a) {
281
+ var a00 = a[0],
282
+ a01 = a[1],
283
+ a02 = a[2];
284
+ var a10 = a[3],
285
+ a11 = a[4],
286
+ a12 = a[5];
287
+ var a20 = a[6],
288
+ a21 = a[7],
289
+ a22 = a[8];
290
+ return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);
291
+ }
292
+ /**
293
+ * Multiplies two mat3's
294
+ *
295
+ * @param {mat3} out the receiving matrix
296
+ * @param {ReadonlyMat3} a the first operand
297
+ * @param {ReadonlyMat3} b the second operand
298
+ * @returns {mat3} out
299
+ */
300
+
301
+ function multiply(out, a, b) {
302
+ var a00 = a[0],
303
+ a01 = a[1],
304
+ a02 = a[2];
305
+ var a10 = a[3],
306
+ a11 = a[4],
307
+ a12 = a[5];
308
+ var a20 = a[6],
309
+ a21 = a[7],
310
+ a22 = a[8];
311
+ var b00 = b[0],
312
+ b01 = b[1],
313
+ b02 = b[2];
314
+ var b10 = b[3],
315
+ b11 = b[4],
316
+ b12 = b[5];
317
+ var b20 = b[6],
318
+ b21 = b[7],
319
+ b22 = b[8];
320
+ out[0] = b00 * a00 + b01 * a10 + b02 * a20;
321
+ out[1] = b00 * a01 + b01 * a11 + b02 * a21;
322
+ out[2] = b00 * a02 + b01 * a12 + b02 * a22;
323
+ out[3] = b10 * a00 + b11 * a10 + b12 * a20;
324
+ out[4] = b10 * a01 + b11 * a11 + b12 * a21;
325
+ out[5] = b10 * a02 + b11 * a12 + b12 * a22;
326
+ out[6] = b20 * a00 + b21 * a10 + b22 * a20;
327
+ out[7] = b20 * a01 + b21 * a11 + b22 * a21;
328
+ out[8] = b20 * a02 + b21 * a12 + b22 * a22;
329
+ return out;
330
+ }
331
+ /**
332
+ * Translate a mat3 by the given vector
333
+ *
334
+ * @param {mat3} out the receiving matrix
335
+ * @param {ReadonlyMat3} a the matrix to translate
336
+ * @param {ReadonlyVec2} v vector to translate by
337
+ * @returns {mat3} out
338
+ */
339
+
340
+ function translate(out, a, v) {
341
+ var a00 = a[0],
342
+ a01 = a[1],
343
+ a02 = a[2],
344
+ a10 = a[3],
345
+ a11 = a[4],
346
+ a12 = a[5],
347
+ a20 = a[6],
348
+ a21 = a[7],
349
+ a22 = a[8],
350
+ x = v[0],
351
+ y = v[1];
352
+ out[0] = a00;
353
+ out[1] = a01;
354
+ out[2] = a02;
355
+ out[3] = a10;
356
+ out[4] = a11;
357
+ out[5] = a12;
358
+ out[6] = x * a00 + y * a10 + a20;
359
+ out[7] = x * a01 + y * a11 + a21;
360
+ out[8] = x * a02 + y * a12 + a22;
361
+ return out;
362
+ }
363
+ /**
364
+ * Rotates a mat3 by the given angle
365
+ *
366
+ * @param {mat3} out the receiving matrix
367
+ * @param {ReadonlyMat3} a the matrix to rotate
368
+ * @param {Number} rad the angle to rotate the matrix by
369
+ * @returns {mat3} out
370
+ */
371
+
372
+ function rotate(out, a, rad) {
373
+ var a00 = a[0],
374
+ a01 = a[1],
375
+ a02 = a[2],
376
+ a10 = a[3],
377
+ a11 = a[4],
378
+ a12 = a[5],
379
+ a20 = a[6],
380
+ a21 = a[7],
381
+ a22 = a[8],
382
+ s = Math.sin(rad),
383
+ c = Math.cos(rad);
384
+ out[0] = c * a00 + s * a10;
385
+ out[1] = c * a01 + s * a11;
386
+ out[2] = c * a02 + s * a12;
387
+ out[3] = c * a10 - s * a00;
388
+ out[4] = c * a11 - s * a01;
389
+ out[5] = c * a12 - s * a02;
390
+ out[6] = a20;
391
+ out[7] = a21;
392
+ out[8] = a22;
393
+ return out;
394
+ }
395
+ /**
396
+ * Scales the mat3 by the dimensions in the given vec2
397
+ *
398
+ * @param {mat3} out the receiving matrix
399
+ * @param {ReadonlyMat3} a the matrix to rotate
400
+ * @param {ReadonlyVec2} v the vec2 to scale the matrix by
401
+ * @returns {mat3} out
402
+ **/
403
+
404
+ function scale(out, a, v) {
405
+ var x = v[0],
406
+ y = v[1];
407
+ out[0] = x * a[0];
408
+ out[1] = x * a[1];
409
+ out[2] = x * a[2];
410
+ out[3] = y * a[3];
411
+ out[4] = y * a[4];
412
+ out[5] = y * a[5];
413
+ out[6] = a[6];
414
+ out[7] = a[7];
415
+ out[8] = a[8];
416
+ return out;
417
+ }
418
+ /**
419
+ * Creates a matrix from a vector translation
420
+ * This is equivalent to (but much faster than):
421
+ *
422
+ * mat3.identity(dest);
423
+ * mat3.translate(dest, dest, vec);
424
+ *
425
+ * @param {mat3} out mat3 receiving operation result
426
+ * @param {ReadonlyVec2} v Translation vector
427
+ * @returns {mat3} out
428
+ */
429
+
430
+ function fromTranslation(out, v) {
431
+ out[0] = 1;
432
+ out[1] = 0;
433
+ out[2] = 0;
434
+ out[3] = 0;
435
+ out[4] = 1;
436
+ out[5] = 0;
437
+ out[6] = v[0];
438
+ out[7] = v[1];
439
+ out[8] = 1;
440
+ return out;
441
+ }
442
+ /**
443
+ * Creates a matrix from a given angle
444
+ * This is equivalent to (but much faster than):
445
+ *
446
+ * mat3.identity(dest);
447
+ * mat3.rotate(dest, dest, rad);
448
+ *
449
+ * @param {mat3} out mat3 receiving operation result
450
+ * @param {Number} rad the angle to rotate the matrix by
451
+ * @returns {mat3} out
452
+ */
453
+
454
+ function fromRotation(out, rad) {
455
+ var s = Math.sin(rad),
456
+ c = Math.cos(rad);
457
+ out[0] = c;
458
+ out[1] = s;
459
+ out[2] = 0;
460
+ out[3] = -s;
461
+ out[4] = c;
462
+ out[5] = 0;
463
+ out[6] = 0;
464
+ out[7] = 0;
465
+ out[8] = 1;
466
+ return out;
467
+ }
468
+ /**
469
+ * Creates a matrix from a vector scaling
470
+ * This is equivalent to (but much faster than):
471
+ *
472
+ * mat3.identity(dest);
473
+ * mat3.scale(dest, dest, vec);
474
+ *
475
+ * @param {mat3} out mat3 receiving operation result
476
+ * @param {ReadonlyVec2} v Scaling vector
477
+ * @returns {mat3} out
478
+ */
479
+
480
+ function fromScaling(out, v) {
481
+ out[0] = v[0];
482
+ out[1] = 0;
483
+ out[2] = 0;
484
+ out[3] = 0;
485
+ out[4] = v[1];
486
+ out[5] = 0;
487
+ out[6] = 0;
488
+ out[7] = 0;
489
+ out[8] = 1;
490
+ return out;
491
+ }
492
+ /**
493
+ * Copies the values from a mat2d into a mat3
494
+ *
495
+ * @param {mat3} out the receiving matrix
496
+ * @param {ReadonlyMat2d} a the matrix to copy
497
+ * @returns {mat3} out
498
+ **/
499
+
500
+ function fromMat2d(out, a) {
501
+ out[0] = a[0];
502
+ out[1] = a[1];
503
+ out[2] = 0;
504
+ out[3] = a[2];
505
+ out[4] = a[3];
506
+ out[5] = 0;
507
+ out[6] = a[4];
508
+ out[7] = a[5];
509
+ out[8] = 1;
510
+ return out;
511
+ }
512
+ /**
513
+ * Calculates a 3x3 matrix from the given quaternion
514
+ *
515
+ * @param {mat3} out mat3 receiving operation result
516
+ * @param {ReadonlyQuat} q Quaternion to create matrix from
517
+ *
518
+ * @returns {mat3} out
519
+ */
520
+
521
+ function fromQuat(out, q) {
522
+ var x = q[0],
523
+ y = q[1],
524
+ z = q[2],
525
+ w = q[3];
526
+ var x2 = x + x;
527
+ var y2 = y + y;
528
+ var z2 = z + z;
529
+ var xx = x * x2;
530
+ var yx = y * x2;
531
+ var yy = y * y2;
532
+ var zx = z * x2;
533
+ var zy = z * y2;
534
+ var zz = z * z2;
535
+ var wx = w * x2;
536
+ var wy = w * y2;
537
+ var wz = w * z2;
538
+ out[0] = 1 - yy - zz;
539
+ out[3] = yx - wz;
540
+ out[6] = zx + wy;
541
+ out[1] = yx + wz;
542
+ out[4] = 1 - xx - zz;
543
+ out[7] = zy - wx;
544
+ out[2] = zx - wy;
545
+ out[5] = zy + wx;
546
+ out[8] = 1 - xx - yy;
547
+ return out;
548
+ }
549
+ /**
550
+ * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix
551
+ *
552
+ * @param {mat3} out mat3 receiving operation result
553
+ * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from
554
+ *
555
+ * @returns {mat3} out
556
+ */
557
+
558
+ function normalFromMat4(out, a) {
559
+ var a00 = a[0],
560
+ a01 = a[1],
561
+ a02 = a[2],
562
+ a03 = a[3];
563
+ var a10 = a[4],
564
+ a11 = a[5],
565
+ a12 = a[6],
566
+ a13 = a[7];
567
+ var a20 = a[8],
568
+ a21 = a[9],
569
+ a22 = a[10],
570
+ a23 = a[11];
571
+ var a30 = a[12],
572
+ a31 = a[13],
573
+ a32 = a[14],
574
+ a33 = a[15];
575
+ var b00 = a00 * a11 - a01 * a10;
576
+ var b01 = a00 * a12 - a02 * a10;
577
+ var b02 = a00 * a13 - a03 * a10;
578
+ var b03 = a01 * a12 - a02 * a11;
579
+ var b04 = a01 * a13 - a03 * a11;
580
+ var b05 = a02 * a13 - a03 * a12;
581
+ var b06 = a20 * a31 - a21 * a30;
582
+ var b07 = a20 * a32 - a22 * a30;
583
+ var b08 = a20 * a33 - a23 * a30;
584
+ var b09 = a21 * a32 - a22 * a31;
585
+ var b10 = a21 * a33 - a23 * a31;
586
+ var b11 = a22 * a33 - a23 * a32; // Calculate the determinant
587
+
588
+ var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
589
+
590
+ if (!det) {
591
+ return null;
592
+ }
593
+
594
+ det = 1.0 / det;
595
+ out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
596
+ out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
597
+ out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
598
+ out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
599
+ out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
600
+ out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
601
+ out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
602
+ out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
603
+ out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
604
+ return out;
605
+ }
606
+ /**
607
+ * Generates a 2D projection matrix with the given bounds
608
+ *
609
+ * @param {mat3} out mat3 frustum matrix will be written into
610
+ * @param {number} width Width of your gl context
611
+ * @param {number} height Height of gl context
612
+ * @returns {mat3} out
613
+ */
614
+
615
+ function projection(out, width, height) {
616
+ out[0] = 2 / width;
617
+ out[1] = 0;
618
+ out[2] = 0;
619
+ out[3] = 0;
620
+ out[4] = -2 / height;
621
+ out[5] = 0;
622
+ out[6] = -1;
623
+ out[7] = 1;
624
+ out[8] = 1;
625
+ return out;
626
+ }
627
+ /**
628
+ * Returns a string representation of a mat3
629
+ *
630
+ * @param {ReadonlyMat3} a matrix to represent as a string
631
+ * @returns {String} string representation of the matrix
632
+ */
633
+
634
+ function str(a) {
635
+ return "mat3(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ", " + a[8] + ")";
636
+ }
637
+ /**
638
+ * Returns Frobenius norm of a mat3
639
+ *
640
+ * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of
641
+ * @returns {Number} Frobenius norm
642
+ */
643
+
644
+ function frob(a) {
645
+ return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);
646
+ }
647
+ /**
648
+ * Adds two mat3's
649
+ *
650
+ * @param {mat3} out the receiving matrix
651
+ * @param {ReadonlyMat3} a the first operand
652
+ * @param {ReadonlyMat3} b the second operand
653
+ * @returns {mat3} out
654
+ */
655
+
656
+ function add(out, a, b) {
657
+ out[0] = a[0] + b[0];
658
+ out[1] = a[1] + b[1];
659
+ out[2] = a[2] + b[2];
660
+ out[3] = a[3] + b[3];
661
+ out[4] = a[4] + b[4];
662
+ out[5] = a[5] + b[5];
663
+ out[6] = a[6] + b[6];
664
+ out[7] = a[7] + b[7];
665
+ out[8] = a[8] + b[8];
666
+ return out;
667
+ }
668
+ /**
669
+ * Subtracts matrix b from matrix a
670
+ *
671
+ * @param {mat3} out the receiving matrix
672
+ * @param {ReadonlyMat3} a the first operand
673
+ * @param {ReadonlyMat3} b the second operand
674
+ * @returns {mat3} out
675
+ */
676
+
677
+ function subtract(out, a, b) {
678
+ out[0] = a[0] - b[0];
679
+ out[1] = a[1] - b[1];
680
+ out[2] = a[2] - b[2];
681
+ out[3] = a[3] - b[3];
682
+ out[4] = a[4] - b[4];
683
+ out[5] = a[5] - b[5];
684
+ out[6] = a[6] - b[6];
685
+ out[7] = a[7] - b[7];
686
+ out[8] = a[8] - b[8];
687
+ return out;
688
+ }
689
+ /**
690
+ * Multiply each element of the matrix by a scalar.
691
+ *
692
+ * @param {mat3} out the receiving matrix
693
+ * @param {ReadonlyMat3} a the matrix to scale
694
+ * @param {Number} b amount to scale the matrix's elements by
695
+ * @returns {mat3} out
696
+ */
697
+
698
+ function multiplyScalar(out, a, b) {
699
+ out[0] = a[0] * b;
700
+ out[1] = a[1] * b;
701
+ out[2] = a[2] * b;
702
+ out[3] = a[3] * b;
703
+ out[4] = a[4] * b;
704
+ out[5] = a[5] * b;
705
+ out[6] = a[6] * b;
706
+ out[7] = a[7] * b;
707
+ out[8] = a[8] * b;
708
+ return out;
709
+ }
710
+ /**
711
+ * Adds two mat3's after multiplying each element of the second operand by a scalar value.
712
+ *
713
+ * @param {mat3} out the receiving vector
714
+ * @param {ReadonlyMat3} a the first operand
715
+ * @param {ReadonlyMat3} b the second operand
716
+ * @param {Number} scale the amount to scale b's elements by before adding
717
+ * @returns {mat3} out
718
+ */
719
+
720
+ function multiplyScalarAndAdd(out, a, b, scale) {
721
+ out[0] = a[0] + b[0] * scale;
722
+ out[1] = a[1] + b[1] * scale;
723
+ out[2] = a[2] + b[2] * scale;
724
+ out[3] = a[3] + b[3] * scale;
725
+ out[4] = a[4] + b[4] * scale;
726
+ out[5] = a[5] + b[5] * scale;
727
+ out[6] = a[6] + b[6] * scale;
728
+ out[7] = a[7] + b[7] * scale;
729
+ out[8] = a[8] + b[8] * scale;
730
+ return out;
731
+ }
732
+ /**
733
+ * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
734
+ *
735
+ * @param {ReadonlyMat3} a The first matrix.
736
+ * @param {ReadonlyMat3} b The second matrix.
737
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
738
+ */
739
+
740
+ function exactEquals(a, b) {
741
+ 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];
742
+ }
743
+ /**
744
+ * Returns whether or not the matrices have approximately the same elements in the same position.
745
+ *
746
+ * @param {ReadonlyMat3} a The first matrix.
747
+ * @param {ReadonlyMat3} b The second matrix.
748
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
749
+ */
750
+
751
+ function equals(a, b) {
752
+ var a0 = a[0],
753
+ a1 = a[1],
754
+ a2 = a[2],
755
+ a3 = a[3],
756
+ a4 = a[4],
757
+ a5 = a[5],
758
+ a6 = a[6],
759
+ a7 = a[7],
760
+ a8 = a[8];
761
+ var b0 = b[0],
762
+ b1 = b[1],
763
+ b2 = b[2],
764
+ b3 = b[3],
765
+ b4 = b[4],
766
+ b5 = b[5],
767
+ b6 = b[6],
768
+ b7 = b[7],
769
+ b8 = b[8];
770
+ return Math.abs(a0 - b0) <= _common_js__rspack_import_0.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__rspack_import_0.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__rspack_import_0.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__rspack_import_0.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= _common_js__rspack_import_0.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= _common_js__rspack_import_0.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= _common_js__rspack_import_0.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= _common_js__rspack_import_0.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= _common_js__rspack_import_0.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));
771
+ }
772
+ /**
773
+ * Alias for {@link mat3.multiply}
774
+ * @function
775
+ */
776
+
777
+ var mul = multiply;
778
+ /**
779
+ * Alias for {@link mat3.subtract}
780
+ * @function
781
+ */
782
+
783
+ var sub = subtract;
54
784
  __webpack_require__.d(__webpack_exports__, {
55
- DF: () => (toRadian),
56
- aI: () => (equals),
57
- p8: () => (EPSILON),
58
- tb: () => (ARRAY_TYPE)
785
+ add: () => (add),
786
+ adjoint: () => (adjoint),
787
+ clone: () => (clone),
788
+ copy: () => (copy),
789
+ create: () => (create),
790
+ determinant: () => (determinant),
791
+ equals: () => (equals),
792
+ exactEquals: () => (exactEquals),
793
+ frob: () => (frob),
794
+ fromMat2d: () => (fromMat2d),
795
+ fromMat4: () => (fromMat4),
796
+ fromQuat: () => (fromQuat),
797
+ fromRotation: () => (fromRotation),
798
+ fromScaling: () => (fromScaling),
799
+ fromTranslation: () => (fromTranslation),
800
+ fromValues: () => (fromValues),
801
+ identity: () => (identity),
802
+ invert: () => (invert),
803
+ mul: () => (mul),
804
+ multiply: () => (multiply),
805
+ multiplyScalar: () => (multiplyScalar),
806
+ multiplyScalarAndAdd: () => (multiplyScalarAndAdd),
807
+ normalFromMat4: () => (normalFromMat4),
808
+ projection: () => (projection),
809
+ rotate: () => (rotate),
810
+ scale: () => (scale),
811
+ set: () => (set),
812
+ str: () => (str),
813
+ sub: () => (sub),
814
+ subtract: () => (subtract),
815
+ translate: () => (translate),
816
+ transpose: () => (transpose)
59
817
  });
60
818
 
61
819
 
@@ -1075,10 +1833,10 @@ function getVideoImageDataMetadata(imageId) {
1075
1833
  rowCosines = [1, 0, 0];
1076
1834
  columnCosines = [0, 1, 0];
1077
1835
  }
1078
- const rowCosineVec = gl_matrix__rspack_import_0/* .vec3.fromValues */.eR.fA(rowCosines[0], rowCosines[1], rowCosines[2]);
1079
- const colCosineVec = gl_matrix__rspack_import_0/* .vec3.fromValues */.eR.fA(columnCosines[0], columnCosines[1], columnCosines[2]);
1080
- const scanAxisNormal = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
1081
- gl_matrix__rspack_import_0/* .vec3.cross */.eR.$A(scanAxisNormal, rowCosineVec, colCosineVec);
1836
+ const rowCosineVec = gl_matrix__rspack_import_0.vec3.fromValues(rowCosines[0], rowCosines[1], rowCosines[2]);
1837
+ const colCosineVec = gl_matrix__rspack_import_0.vec3.fromValues(columnCosines[0], columnCosines[1], columnCosines[2]);
1838
+ const scanAxisNormal = gl_matrix__rspack_import_0.vec3.create();
1839
+ gl_matrix__rspack_import_0.vec3.cross(scanAxisNormal, rowCosineVec, colCosineVec);
1082
1840
  const rows = imagePlaneModule.rows;
1083
1841
  const columns = imagePlaneModule.columns;
1084
1842
  const origin = (imagePlaneModule.imagePositionPatient || [0, 0, 0]);
@@ -1594,7 +2352,7 @@ class VoxelManager {
1594
2352
  }
1595
2353
  const direction = volumeGeometry.direction;
1596
2354
  const spacing = volumeGeometry.spacing;
1597
- const transform = gl_matrix__rspack_import_2/* .mat3.fromValues */.w0.fromValues(direction[0] / spacing[0], direction[3] / spacing[1], direction[6] / spacing[2], direction[1] / spacing[0], direction[4] / spacing[1], direction[7] / spacing[2], direction[2] / spacing[0], direction[5] / spacing[1], direction[8] / spacing[2]);
2355
+ const transform = gl_matrix__rspack_import_2.mat3.fromValues(direction[0] / spacing[0], direction[3] / spacing[1], direction[6] / spacing[2], direction[1] / spacing[0], direction[4] / spacing[1], direction[7] / spacing[2], direction[2] / spacing[0], direction[5] / spacing[1], direction[8] / spacing[2]);
1598
2356
  worldToIndexTransformCache.set(volumeGeometry, transform);
1599
2357
  return transform;
1600
2358
  }
@@ -1603,7 +2361,7 @@ class VoxelManager {
1603
2361
  worldToIndexDeltaScratch[0] = worldPos[0] - origin[0];
1604
2362
  worldToIndexDeltaScratch[1] = worldPos[1] - origin[1];
1605
2363
  worldToIndexDeltaScratch[2] = worldPos[2] - origin[2];
1606
- const continuousIndex = gl_matrix__rspack_import_2/* .vec3.transformMat3 */.eR.ei(worldToIndexResultScratch, worldToIndexDeltaScratch, VoxelManager.getWorldToIndexTransform(volumeGeometry));
2364
+ const continuousIndex = gl_matrix__rspack_import_2.vec3.transformMat3(worldToIndexResultScratch, worldToIndexDeltaScratch, VoxelManager.getWorldToIndexTransform(volumeGeometry));
1607
2365
  return [continuousIndex[0], continuousIndex[1], continuousIndex[2]];
1608
2366
  }
1609
2367
  static sampleAtWorldCoordinates(volume, worldX, worldY, worldZ, interpolationType = _enums_index_js__rspack_import_1.InterpolationType.LINEAR) {
@@ -1614,7 +2372,7 @@ class VoxelManager {
1614
2372
  worldToIndexDeltaScratch[0] = worldX - origin[0];
1615
2373
  worldToIndexDeltaScratch[1] = worldY - origin[1];
1616
2374
  worldToIndexDeltaScratch[2] = worldZ - origin[2];
1617
- const continuousIndex = gl_matrix__rspack_import_2/* .vec3.transformMat3 */.eR.ei(worldToIndexResultScratch, worldToIndexDeltaScratch, VoxelManager.getWorldToIndexTransform(volume));
2375
+ const continuousIndex = gl_matrix__rspack_import_2.vec3.transformMat3(worldToIndexResultScratch, worldToIndexDeltaScratch, VoxelManager.getWorldToIndexTransform(volume));
1618
2376
  return VoxelManager.sampleAtContinuousCoordinates(volume.voxelManager, volume.dimensions, continuousIndex[0], continuousIndex[1], continuousIndex[2], interpolationType);
1619
2377
  }
1620
2378
  static sampleAtWorld(volume, worldPos, interpolationType = _enums_index_js__rspack_import_1.InterpolationType.LINEAR) {
@@ -2401,10 +3159,10 @@ function getWSIImageDataMetadata(args) {
2401
3159
  rowCosines = [1, 0, 0];
2402
3160
  columnCosines = [0, 1, 0];
2403
3161
  }
2404
- const rowCosineVec = gl_matrix__rspack_import_0/* .vec3.fromValues */.eR.fA(rowCosines[0], rowCosines[1], rowCosines[2]);
2405
- const colCosineVec = gl_matrix__rspack_import_0/* .vec3.fromValues */.eR.fA(columnCosines[0], columnCosines[1], columnCosines[2]);
2406
- const scanAxisNormal = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
2407
- gl_matrix__rspack_import_0/* .vec3.cross */.eR.$A(scanAxisNormal, rowCosineVec, colCosineVec);
3162
+ const rowCosineVec = gl_matrix__rspack_import_0.vec3.fromValues(rowCosines[0], rowCosines[1], rowCosines[2]);
3163
+ const colCosineVec = gl_matrix__rspack_import_0.vec3.fromValues(columnCosines[0], columnCosines[1], columnCosines[2]);
3164
+ const scanAxisNormal = gl_matrix__rspack_import_0.vec3.create();
3165
+ gl_matrix__rspack_import_0.vec3.cross(scanAxisNormal, rowCosineVec, colCosineVec);
2408
3166
  const { XOffsetInSlideCoordinateSystem = 0, YOffsetInSlideCoordinateSystem = 0, ZOffsetInSlideCoordinateSystem = 0, } = maxImage.TotalPixelMatrixOriginSequence?.[0] || {};
2409
3167
  const origin = [
2410
3168
  XOffsetInSlideCoordinateSystem,
@@ -2576,8 +3334,8 @@ function calculateViewportsSpatialRegistration(viewport1, viewport2) {
2576
3334
  }
2577
3335
  const imagePositionPatient1 = imagePlaneModule1.imagePositionPatient;
2578
3336
  const imagePositionPatient2 = imagePlaneModule2.imagePositionPatient;
2579
- const translation = gl_matrix__rspack_import_0/* .vec3.subtract */.eR.Re(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), imagePositionPatient1, imagePositionPatient2);
2580
- const mat = gl_matrix__rspack_import_0/* .mat4.fromTranslation */.pB.fromTranslation(gl_matrix__rspack_import_0/* .mat4.create */.pB.create(), translation);
3337
+ const translation = gl_matrix__rspack_import_0.vec3.subtract(gl_matrix__rspack_import_0.vec3.create(), imagePositionPatient1, imagePositionPatient2);
3338
+ const mat = gl_matrix__rspack_import_0.mat4.fromTranslation(gl_matrix__rspack_import_0.mat4.create(), translation);
2581
3339
  _spatialRegistrationMetadataProvider_js__rspack_import_1/* ["default"].add */.A.add([viewport1.id, viewport2.id], mat);
2582
3340
  }
2583
3341
  /* export default */ __webpack_exports__.A = (calculateViewportsSpatialRegistration);
@@ -3245,9 +4003,9 @@ function getPlaneMetadata(imageId) {
3245
4003
  return null;
3246
4004
  }
3247
4005
  const { rowCosines, columnCosines, imagePositionPatient, } = targetImagePlane;
3248
- const rowVec = gl_matrix__rspack_import_0/* .vec3.set */.eR.hZ(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), ...rowCosines);
3249
- const colVec = gl_matrix__rspack_import_0/* .vec3.set */.eR.hZ(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), ...columnCosines);
3250
- const planeNormal = gl_matrix__rspack_import_0/* .vec3.cross */.eR.$A(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), rowVec, colVec);
4006
+ const rowVec = gl_matrix__rspack_import_0.vec3.set(gl_matrix__rspack_import_0.vec3.create(), ...rowCosines);
4007
+ const colVec = gl_matrix__rspack_import_0.vec3.set(gl_matrix__rspack_import_0.vec3.create(), ...columnCosines);
4008
+ const planeNormal = gl_matrix__rspack_import_0.vec3.cross(gl_matrix__rspack_import_0.vec3.create(), rowVec, colVec);
3251
4009
  return { rowCosines, columnCosines, imagePositionPatient, planeNormal };
3252
4010
  }
3253
4011
 
@@ -3269,15 +4027,15 @@ function getCurrentVolumeViewportSlice(viewport) {
3269
4027
  const ijkOriginPoint = (0,_transformCanvasToIJK_js__rspack_import_1/* .transformCanvasToIJK */.e)(viewport, [0, 0]);
3270
4028
  const ijkRowPoint = (0,_transformCanvasToIJK_js__rspack_import_1/* .transformCanvasToIJK */.e)(viewport, [canvasWidth - 1, 0]);
3271
4029
  const ijkColPoint = (0,_transformCanvasToIJK_js__rspack_import_1/* .transformCanvasToIJK */.e)(viewport, [0, canvasHeight - 1]);
3272
- const ijkRowVec = gl_matrix__rspack_import_0/* .vec3.sub */.eR.jb(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), ijkRowPoint, ijkOriginPoint);
3273
- const ijkColVec = gl_matrix__rspack_import_0/* .vec3.sub */.eR.jb(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), ijkColPoint, ijkOriginPoint);
3274
- const ijkSliceVec = gl_matrix__rspack_import_0/* .vec3.cross */.eR.$A(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), ijkRowVec, ijkColVec);
3275
- gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(ijkRowVec, ijkRowVec);
3276
- gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(ijkColVec, ijkColVec);
3277
- gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(ijkSliceVec, ijkSliceVec);
4030
+ const ijkRowVec = gl_matrix__rspack_import_0.vec3.sub(gl_matrix__rspack_import_0.vec3.create(), ijkRowPoint, ijkOriginPoint);
4031
+ const ijkColVec = gl_matrix__rspack_import_0.vec3.sub(gl_matrix__rspack_import_0.vec3.create(), ijkColPoint, ijkOriginPoint);
4032
+ const ijkSliceVec = gl_matrix__rspack_import_0.vec3.cross(gl_matrix__rspack_import_0.vec3.create(), ijkRowVec, ijkColVec);
4033
+ gl_matrix__rspack_import_0.vec3.normalize(ijkRowVec, ijkRowVec);
4034
+ gl_matrix__rspack_import_0.vec3.normalize(ijkColVec, ijkColVec);
4035
+ gl_matrix__rspack_import_0.vec3.normalize(ijkSliceVec, ijkSliceVec);
3278
4036
  const maxIJKRowVec = Math.max(Math.abs(ijkRowVec[0]), Math.abs(ijkRowVec[1]), Math.abs(ijkRowVec[2]));
3279
4037
  const maxIJKColVec = Math.max(Math.abs(ijkColVec[0]), Math.abs(ijkColVec[1]), Math.abs(ijkColVec[2]));
3280
- if (!gl_matrix__rspack_import_0/* .glMatrix.equals */.Fd.aI(1, maxIJKRowVec) || !gl_matrix__rspack_import_0/* .glMatrix.equals */.Fd.aI(1, maxIJKColVec)) {
4038
+ if (!gl_matrix__rspack_import_0.glMatrix.equals(1, maxIJKRowVec) || !gl_matrix__rspack_import_0.glMatrix.equals(1, maxIJKColVec)) {
3281
4039
  throw new Error('getCurrentVolumeViewportSlice is not available for rotate/oblique viewports');
3282
4040
  }
3283
4041
  const { voxelManager } = viewport.getImageData();
@@ -3307,9 +4065,9 @@ function getEffectiveSpacingAlongDirection(volume, direction) {
3307
4065
  const iVector = volumeDirection.slice(0, 3);
3308
4066
  const jVector = volumeDirection.slice(3, 6);
3309
4067
  const kVector = volumeDirection.slice(6, 9);
3310
- const dotI = gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(iVector, direction) / spacing[0];
3311
- const dotJ = gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(jVector, direction) / spacing[1];
3312
- const dotK = gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(kVector, direction) / spacing[2];
4068
+ const dotI = gl_matrix__rspack_import_0.vec3.dot(iVector, direction) / spacing[0];
4069
+ const dotJ = gl_matrix__rspack_import_0.vec3.dot(jVector, direction) / spacing[1];
4070
+ const dotK = gl_matrix__rspack_import_0.vec3.dot(kVector, direction) / spacing[2];
3313
4071
  return 1 / Math.sqrt(dotI * dotI + dotJ * dotJ + dotK * dotK);
3314
4072
  }
3315
4073
 
@@ -3613,14 +4371,14 @@ __webpack_require__.d(__webpack_exports__, {
3613
4371
  function getVolumeDirectionVectors(imageData, camera) {
3614
4372
  const { viewUp, viewPlaneNormal } = camera;
3615
4373
  const ijkOrigin = (0,_transformWorldToIndex_js__rspack_import_1/* .transformWorldToIndexContinuous */.p)(imageData, [0, 0, 0]);
3616
- const worldVecColDir = gl_matrix__rspack_import_0/* .vec3.negate */.eR.ze(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), viewUp);
3617
- const worldVecSliceDir = gl_matrix__rspack_import_0/* .vec3.negate */.eR.ze(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), viewPlaneNormal);
3618
- const worldVecRowDir = gl_matrix__rspack_import_0/* .vec3.cross */.eR.$A(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), worldVecColDir, worldVecSliceDir);
3619
- const ijkVecColDir = gl_matrix__rspack_import_0/* .vec3.sub */.eR.jb(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), (0,_transformWorldToIndex_js__rspack_import_1/* .transformWorldToIndexContinuous */.p)(imageData, worldVecColDir), ijkOrigin);
3620
- const ijkVecSliceDir = gl_matrix__rspack_import_0/* .vec3.sub */.eR.jb(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), (0,_transformWorldToIndex_js__rspack_import_1/* .transformWorldToIndexContinuous */.p)(imageData, worldVecSliceDir), ijkOrigin);
3621
- gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(ijkVecColDir, ijkVecColDir);
3622
- gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(ijkVecSliceDir, ijkVecSliceDir);
3623
- const ijkVecRowDir = gl_matrix__rspack_import_0/* .vec3.cross */.eR.$A(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), ijkVecColDir, ijkVecSliceDir);
4374
+ const worldVecColDir = gl_matrix__rspack_import_0.vec3.negate(gl_matrix__rspack_import_0.vec3.create(), viewUp);
4375
+ const worldVecSliceDir = gl_matrix__rspack_import_0.vec3.negate(gl_matrix__rspack_import_0.vec3.create(), viewPlaneNormal);
4376
+ const worldVecRowDir = gl_matrix__rspack_import_0.vec3.cross(gl_matrix__rspack_import_0.vec3.create(), worldVecColDir, worldVecSliceDir);
4377
+ const ijkVecColDir = gl_matrix__rspack_import_0.vec3.sub(gl_matrix__rspack_import_0.vec3.create(), (0,_transformWorldToIndex_js__rspack_import_1/* .transformWorldToIndexContinuous */.p)(imageData, worldVecColDir), ijkOrigin);
4378
+ const ijkVecSliceDir = gl_matrix__rspack_import_0.vec3.sub(gl_matrix__rspack_import_0.vec3.create(), (0,_transformWorldToIndex_js__rspack_import_1/* .transformWorldToIndexContinuous */.p)(imageData, worldVecSliceDir), ijkOrigin);
4379
+ gl_matrix__rspack_import_0.vec3.normalize(ijkVecColDir, ijkVecColDir);
4380
+ gl_matrix__rspack_import_0.vec3.normalize(ijkVecSliceDir, ijkVecSliceDir);
4381
+ const ijkVecRowDir = gl_matrix__rspack_import_0.vec3.cross(gl_matrix__rspack_import_0.vec3.create(), ijkVecColDir, ijkVecSliceDir);
3624
4382
  return {
3625
4383
  worldVecRowDir,
3626
4384
  worldVecColDir,
@@ -3860,9 +4618,9 @@ function imageToWorldCoords(imageId, imageCoords) {
3860
4618
  let { columnPixelSpacing, rowPixelSpacing } = imagePlaneModule;
3861
4619
  columnPixelSpacing ||= 1;
3862
4620
  rowPixelSpacing ||= 1;
3863
- const imageCoordsInWorld = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
3864
- gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(imageCoordsInWorld, origin, rowCosines, rowPixelSpacing * (imageCoords[0] - 0.5));
3865
- gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(imageCoordsInWorld, imageCoordsInWorld, columnCosines, columnPixelSpacing * (imageCoords[1] - 0.5));
4621
+ const imageCoordsInWorld = gl_matrix__rspack_import_0.vec3.create();
4622
+ gl_matrix__rspack_import_0.vec3.scaleAndAdd(imageCoordsInWorld, origin, rowCosines, rowPixelSpacing * (imageCoords[0] - 0.5));
4623
+ gl_matrix__rspack_import_0.vec3.scaleAndAdd(imageCoordsInWorld, imageCoordsInWorld, columnCosines, columnPixelSpacing * (imageCoords[1] - 0.5));
3866
4624
  return Array.from(imageCoordsInWorld);
3867
4625
  }
3868
4626
 
@@ -4305,8 +5063,8 @@ function renderToCanvasGPU(canvas, imageOrVolume, modality = undefined, renderin
4305
5063
  0,
4306
5064
  temporaryCanvas.height / devicePixelRatio,
4307
5065
  ]);
4308
- const rightVector = gl_matrix__rspack_import_0/* .vec3.sub */.eR.jb([0, 0, 0], viewport.canvasToWorld([1 / devicePixelRatio, 0]), origin);
4309
- const downVector = gl_matrix__rspack_import_0/* .vec3.sub */.eR.jb([0, 0, 0], viewport.canvasToWorld([0, 1 / devicePixelRatio]), origin);
5066
+ const rightVector = gl_matrix__rspack_import_0.vec3.sub([0, 0, 0], viewport.canvasToWorld([1 / devicePixelRatio, 0]), origin);
5067
+ const downVector = gl_matrix__rspack_import_0.vec3.sub([0, 0, 0], viewport.canvasToWorld([0, 1 / devicePixelRatio]), origin);
4310
5068
  const thicknessMm = 1;
4311
5069
  elementRendered = true;
4312
5070
  element.removeEventListener(_enums_index_js__rspack_import_2.Events.IMAGE_RENDERED, onImageRendered);
@@ -4618,7 +5376,7 @@ const spatialRegistrationMetadataProvider = {
4618
5376
  }
4619
5377
  const entryIdReverse = `${viewportId2}_${viewportId1}`;
4620
5378
  if (state[entryIdReverse]) {
4621
- return gl_matrix__rspack_import_0/* .mat4.invert */.pB.invert(gl_matrix__rspack_import_0/* .mat4.create */.pB.create(), state[entryIdReverse]);
5379
+ return gl_matrix__rspack_import_0.mat4.invert(gl_matrix__rspack_import_0.mat4.create(), state[entryIdReverse]);
4622
5380
  }
4623
5381
  },
4624
5382
  };
@@ -5524,9 +6282,9 @@ function getIndexSpaceNormal(volume, normal) {
5524
6282
  const jVector = direction.slice(3, 6);
5525
6283
  const kVector = direction.slice(6, 9);
5526
6284
  return [
5527
- spacing[0] * gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(iVector, normal),
5528
- spacing[1] * gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(jVector, normal),
5529
- spacing[2] * gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(kVector, normal),
6285
+ spacing[0] * gl_matrix__rspack_import_0.vec3.dot(iVector, normal),
6286
+ spacing[1] * gl_matrix__rspack_import_0.vec3.dot(jVector, normal),
6287
+ spacing[2] * gl_matrix__rspack_import_0.vec3.dot(kVector, normal),
5530
6288
  ];
5531
6289
  }
5532
6290
  function pickOuterAxis(g) {
@@ -5830,15 +6588,15 @@ var esm = __webpack_require__(50341);
5830
6588
  ;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/utilities/voxelSlab/shapes/shapeGeometry.js
5831
6589
 
5832
6590
  function createPlaneBasis(normal, orientation) {
5833
- const n = esm/* .vec3.normalize */.eR.S8(esm/* .vec3.create */.eR.vt(), normal);
5834
- const along = esm/* .vec3.dot */.eR.Om(orientation, n);
5835
- const u = esm/* .vec3.sub */.eR.jb(esm/* .vec3.create */.eR.vt(), orientation, esm/* .vec3.scale */.eR.hs(esm/* .vec3.create */.eR.vt(), n, along));
5836
- const uLength = esm/* .vec3.length */.eR.Bw(u);
6591
+ const n = esm.vec3.normalize(esm.vec3.create(), normal);
6592
+ const along = esm.vec3.dot(orientation, n);
6593
+ const u = esm.vec3.sub(esm.vec3.create(), orientation, esm.vec3.scale(esm.vec3.create(), n, along));
6594
+ const uLength = esm.vec3.length(u);
5837
6595
  if (!(uLength > 1e-12)) {
5838
6596
  throw new Error('Shape orientation vector is parallel to the plane normal, so it defines no in-plane direction');
5839
6597
  }
5840
- esm/* .vec3.scale */.eR.hs(u, u, 1 / uLength);
5841
- const v = esm/* .vec3.cross */.eR.$A(esm/* .vec3.create */.eR.vt(), n, u);
6598
+ esm.vec3.scale(u, u, 1 / uLength);
6599
+ const v = esm.vec3.cross(esm.vec3.create(), n, u);
5842
6600
  return { u: u, v, n };
5843
6601
  }
5844
6602
  function getAxisSteps(volume) {
@@ -6011,7 +6769,7 @@ function createEllipseShape(options) {
6011
6769
  function createCircleShape(options) {
6012
6770
  const { viewPlaneNormal: normal } = options;
6013
6771
  const candidate = Math.abs(normal[0]) < 0.9 ? [1, 0, 0] : [0, 1, 0];
6014
- const majorAxis = esm/* .vec3.cross */.eR.$A(esm/* .vec3.create */.eR.vt(), normal, candidate);
6772
+ const majorAxis = esm.vec3.cross(esm.vec3.create(), normal, candidate);
6015
6773
  return createEllipseShape({
6016
6774
  volume: options.volume,
6017
6775
  planePoint: options.planePoint,
@@ -6112,7 +6870,7 @@ function createPolylineShape(options) {
6112
6870
  }
6113
6871
  const planePoint = options.planePoint ?? inputRings[0][0];
6114
6872
  const candidate = Math.abs(normal[0]) < 0.9 ? [1, 0, 0] : [0, 1, 0];
6115
- const basis = createPlaneBasis(normal, esm/* .vec3.cross */.eR.$A(esm/* .vec3.create */.eR.vt(), normal, candidate));
6873
+ const basis = createPlaneBasis(normal, esm.vec3.cross(esm.vec3.create(), normal, candidate));
6116
6874
  const toPlanePoint = (point) => [
6117
6875
  (point[0] - planePoint[0]) * basis.u[0] +
6118
6876
  (point[1] - planePoint[1]) * basis.u[1] +
@@ -6374,7 +7132,7 @@ function asUnitNormal(normal) {
6374
7132
  if (Math.abs(lengthSquared - 1) < Number.EPSILON * 8) {
6375
7133
  return normal;
6376
7134
  }
6377
- return gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), normal);
7135
+ return gl_matrix__rspack_import_0.vec3.normalize(gl_matrix__rspack_import_0.vec3.create(), normal);
6378
7136
  }
6379
7137
 
6380
7138
  __webpack_require__.d(__webpack_exports__, {
@@ -6471,13 +7229,13 @@ function worldToImageCoords(imageId, worldCoords) {
6471
7229
  let { columnPixelSpacing, rowPixelSpacing } = imagePlaneModule;
6472
7230
  columnPixelSpacing ||= 1;
6473
7231
  rowPixelSpacing ||= 1;
6474
- const newOrigin = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
6475
- gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(newOrigin, origin, columnCosines, -columnPixelSpacing / 2);
6476
- gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(newOrigin, newOrigin, rowCosines, -rowPixelSpacing / 2);
6477
- const sub = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
6478
- gl_matrix__rspack_import_0/* .vec3.sub */.eR.jb(sub, worldCoords, newOrigin);
6479
- const rowDistance = gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(sub, rowCosines);
6480
- const columnDistance = gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(sub, columnCosines);
7232
+ const newOrigin = gl_matrix__rspack_import_0.vec3.create();
7233
+ gl_matrix__rspack_import_0.vec3.scaleAndAdd(newOrigin, origin, columnCosines, -columnPixelSpacing / 2);
7234
+ gl_matrix__rspack_import_0.vec3.scaleAndAdd(newOrigin, newOrigin, rowCosines, -rowPixelSpacing / 2);
7235
+ const sub = gl_matrix__rspack_import_0.vec3.create();
7236
+ gl_matrix__rspack_import_0.vec3.sub(sub, worldCoords, newOrigin);
7237
+ const rowDistance = gl_matrix__rspack_import_0.vec3.dot(sub, rowCosines);
7238
+ const columnDistance = gl_matrix__rspack_import_0.vec3.dot(sub, columnCosines);
6481
7239
  const imageCoords = [
6482
7240
  rowDistance / rowPixelSpacing,
6483
7241
  columnDistance / columnPixelSpacing,