@ohif/app 3.14.0-beta.98 → 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.
- package/dist/{1645.bundle.a98b9ca6.js → 1645.bundle.1a466b16.js} +600 -600
- package/dist/{1788.bundle.3f1349d2.js → 1788.bundle.962951f9.js} +26 -26
- package/dist/{1793.bundle.27458a55.js → 1793.bundle.30f89e46.js} +5 -3
- package/dist/{1862.bundle.79bfe469.js → 1862.bundle.3ae388c3.js} +2 -2
- package/dist/204.bundle.bc44c201.js +101 -0
- package/dist/204.bundle.css +52 -0
- package/dist/{2748.bundle.eaa94e2e.js → 2103.bundle.1cf348e8.js} +1 -1771
- package/dist/{2478.bundle.fc6ab30b.js → 2478.bundle.68ff1b2d.js} +2 -2
- package/dist/{2717.bundle.d5f58443.js → 2717.bundle.4318f1ee.js} +45 -43
- package/dist/{5989.bundle.f484884a.js → 287.bundle.ee60c370.js} +4570 -832
- package/dist/{2894.bundle.d612efb2.js → 2894.bundle.30c0af5b.js} +20 -14
- package/dist/{2991.bundle.f94892fb.js → 2991.bundle.77642eee.js} +101 -97
- package/dist/{3004.bundle.51919fdc.js → 3004.bundle.5568149a.js} +39 -38
- package/dist/{3255.bundle.13e205ac.js → 3255.bundle.3272671f.js} +29 -27
- package/dist/{3366.bundle.62baeeec.js → 3366.bundle.d9e78e25.js} +57 -53
- package/dist/{3468.bundle.f5dc5e44.js → 3468.bundle.666f2441.js} +37 -27
- package/dist/{347.bundle.397bb252.js → 347.bundle.1323658e.js} +44 -44
- package/dist/{3622.bundle.f4cf2d16.js → 3622.bundle.edb42b96.js} +56 -54
- package/dist/{3723.bundle.eab70100.js → 3723.bundle.43ff1971.js} +1 -1
- package/dist/{3771.bundle.aba09bd7.js → 3771.bundle.a5754f97.js} +8 -8
- package/dist/{4449.bundle.aaa4ab92.js → 4487.bundle.fa0375a4.js} +853 -95
- package/dist/{4606.bundle.a3485206.js → 4606.bundle.6c297e2a.js} +9 -7
- package/dist/{4998.bundle.3aedb48d.js → 4998.bundle.25b8cbfe.js} +5 -3
- package/dist/{5076.bundle.95c07142.js → 5076.bundle.2a14756f.js} +66 -66
- package/dist/{5143.bundle.04f54c00.js → 5143.bundle.53156bb0.js} +358 -226
- package/dist/{5154.bundle.2f460017.js → 5154.bundle.ccd02dd7.js} +5 -3
- package/dist/{5320.bundle.9b05cebb.js → 5320.bundle.c17eb4a7.js} +678 -546
- package/dist/{6212.bundle.e505e123.js → 6212.bundle.c4856be7.js} +48 -46
- package/dist/{6253.bundle.f74ac5c2.js → 6253.bundle.596ce463.js} +1225 -1145
- package/dist/{1153.bundle.51d39e80.js → 6314.bundle.5aadfe48.js} +199 -420
- package/dist/{641.bundle.4627a8e1.js → 641.bundle.8e45751e.js} +89 -89
- package/dist/{6481.bundle.d2fca485.js → 6481.bundle.85093e70.js} +29 -23
- package/dist/{6507.bundle.d52f5e81.js → 6507.bundle.bbcdd01e.js} +76 -76
- package/dist/{6722.bundle.d09a8aad.js → 6722.bundle.3e9a4ef6.js} +4 -4
- package/dist/{6956.bundle.c82fd790.js → 6956.bundle.dc0e8660.js} +33 -33
- package/dist/{7526.bundle.0685dfeb.js → 7526.bundle.3460c3ca.js} +55 -53
- package/dist/{7604.bundle.9eb317c8.js → 7604.bundle.f1eeded4.js} +2 -2
- package/dist/{8312.bundle.2cb75b58.js → 8312.bundle.d67b6f4e.js} +652 -687
- package/dist/{6847.bundle.b2adb444.js → 8729.bundle.e17fe9b2.js} +87 -845
- package/dist/{8788.bundle.4bb4c65b.js → 8788.bundle.83ddf642.js} +21 -20
- package/dist/{8868.bundle.4c357767.js → 8868.bundle.8f3653b3.js} +31 -31
- package/dist/{8923.bundle.9aca06c4.js → 8923.bundle.8b682e96.js} +148 -148
- package/dist/{899.bundle.9a033d16.js → 899.bundle.4e1aee7f.js} +73 -203
- package/dist/{9187.bundle.8f72b4fe.js → 9187.bundle.407afa07.js} +112 -110
- package/dist/9385.bundle.fb0bbf4a.js +1888 -0
- package/dist/{9481.bundle.ccb81f53.js → 9481.bundle.d045ae3a.js} +8 -6
- package/dist/{9517.bundle.1ae74db3.js → 9517.bundle.3e2896ef.js} +31 -17
- package/dist/{9620.bundle.d1dc0be1.js → 9620.bundle.b4cc392c.js} +63 -61
- package/dist/{9841.bundle.0f40f02b.js → 9841.bundle.4f2c401a.js} +93 -91
- package/dist/{9886.bundle.cabb4a24.js → 9886.bundle.b00d5d78.js} +4 -4
- package/dist/{8037.bundle.30a187f7.js → 9889.bundle.bf312047.js} +7743 -1098
- package/dist/{9948.bundle.1172ebca.js → 9948.bundle.fecf81f8.js} +5 -5
- package/dist/{app.bundle.51f0a437.js → app.bundle.bb359653.js} +1926 -1223
- package/dist/{compute.bundle.0ed1fe87.js → compute.bundle.9267d449.js} +13 -12
- package/dist/{histogram-worker.bundle.58e60d7c.js → histogram-worker.bundle.29bcdbf6.js} +6 -5
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.5a53d112.js → interpolation.bundle.ee9998a4.js} +8 -7
- package/dist/{lib-router.bundle.a5ac870a.js → lib-router.bundle.2a887bc7.js} +334 -201
- package/dist/{polySeg.bundle.b4089601.js → polySeg.bundle.a55f8eee.js} +12 -12
- package/dist/sw.js +11 -1
- package/package.json +14 -19
- package/dist/1566.bundle.d58db206.js +0 -3610
|
@@ -1,819 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(globalThis["rspackChunk_ohif_app"] ||= []).push([[
|
|
3
|
-
|
|
4
|
-
__webpack_require__.r(__webpack_exports__);
|
|
5
|
-
/* import */ var _common_js__rspack_import_0 = __webpack_require__(23172);
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* 3x3 Matrix
|
|
9
|
-
* @module mat3
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Creates a new identity mat3
|
|
14
|
-
*
|
|
15
|
-
* @returns {mat3} a new 3x3 matrix
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
function create() {
|
|
19
|
-
var out = new _common_js__rspack_import_0/* .ARRAY_TYPE */.tb(9);
|
|
20
|
-
|
|
21
|
-
if (_common_js__rspack_import_0/* .ARRAY_TYPE */.tb != 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;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Copies the upper-left 3x3 values into the given mat3.
|
|
37
|
-
*
|
|
38
|
-
* @param {mat3} out the receiving 3x3 matrix
|
|
39
|
-
* @param {ReadonlyMat4} a the source 4x4 matrix
|
|
40
|
-
* @returns {mat3} out
|
|
41
|
-
*/
|
|
42
|
-
|
|
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;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Creates a new mat3 initialized with values from an existing matrix
|
|
57
|
-
*
|
|
58
|
-
* @param {ReadonlyMat3} a matrix to clone
|
|
59
|
-
* @returns {mat3} a new 3x3 matrix
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
|
-
function clone(a) {
|
|
63
|
-
var out = new _common_js__rspack_import_0/* .ARRAY_TYPE */.tb(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 */.tb(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;
|
|
122
|
-
}
|
|
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
|
-
*/
|
|
138
|
-
|
|
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];
|
|
200
|
-
}
|
|
201
|
-
|
|
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
|
-
}
|
|
2
|
+
(globalThis["rspackChunk_ohif_app"] ||= []).push([[8729], {
|
|
3
|
+
23172(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
363
4
|
/**
|
|
364
|
-
*
|
|
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
|
|
5
|
+
* Common utilities
|
|
6
|
+
* @module glMatrix
|
|
642
7
|
*/
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
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));
|
|
647
12
|
/**
|
|
648
|
-
*
|
|
13
|
+
* Sets the type of array used when creating new vectors and matrices
|
|
649
14
|
*
|
|
650
|
-
* @param {
|
|
651
|
-
* @param {ReadonlyMat3} a the first operand
|
|
652
|
-
* @param {ReadonlyMat3} b the second operand
|
|
653
|
-
* @returns {mat3} out
|
|
15
|
+
* @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array
|
|
654
16
|
*/
|
|
655
17
|
|
|
656
|
-
function
|
|
657
|
-
|
|
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;
|
|
18
|
+
function setMatrixArrayType(type) {
|
|
19
|
+
ARRAY_TYPE = type;
|
|
667
20
|
}
|
|
21
|
+
var degree = Math.PI / 180;
|
|
668
22
|
/**
|
|
669
|
-
*
|
|
23
|
+
* Convert Degree To Radian
|
|
670
24
|
*
|
|
671
|
-
* @param {
|
|
672
|
-
* @param {ReadonlyMat3} a the first operand
|
|
673
|
-
* @param {ReadonlyMat3} b the second operand
|
|
674
|
-
* @returns {mat3} out
|
|
25
|
+
* @param {Number} a Angle in Degrees
|
|
675
26
|
*/
|
|
676
27
|
|
|
677
|
-
function
|
|
678
|
-
|
|
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;
|
|
28
|
+
function toRadian(a) {
|
|
29
|
+
return a * degree;
|
|
688
30
|
}
|
|
689
31
|
/**
|
|
690
|
-
*
|
|
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)
|
|
691
35
|
*
|
|
692
|
-
* @param {
|
|
693
|
-
* @param {
|
|
694
|
-
* @
|
|
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.
|
|
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.
|
|
749
39
|
*/
|
|
750
40
|
|
|
751
41
|
function equals(a, b) {
|
|
752
|
-
|
|
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 */.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));
|
|
42
|
+
return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));
|
|
771
43
|
}
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
*/
|
|
44
|
+
if (!Math.hypot) Math.hypot = function () {
|
|
45
|
+
var y = 0,
|
|
46
|
+
i = arguments.length;
|
|
776
47
|
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
* @function
|
|
781
|
-
*/
|
|
48
|
+
while (i--) {
|
|
49
|
+
y += arguments[i] * arguments[i];
|
|
50
|
+
}
|
|
782
51
|
|
|
783
|
-
|
|
52
|
+
return Math.sqrt(y);
|
|
53
|
+
};
|
|
784
54
|
__webpack_require__.d(__webpack_exports__, {
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
clone: () => (clone),
|
|
788
|
-
copy: () => (copy),
|
|
789
|
-
create: () => (create),
|
|
790
|
-
determinant: () => (determinant),
|
|
55
|
+
ARRAY_TYPE: () => (ARRAY_TYPE),
|
|
56
|
+
EPSILON: () => (EPSILON),
|
|
791
57
|
equals: () => (equals),
|
|
792
|
-
|
|
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)
|
|
58
|
+
toRadian: () => (toRadian)
|
|
817
59
|
});
|
|
818
60
|
|
|
819
61
|
|
|
@@ -7186,9 +6428,9 @@ class RectangleROIStartEndThresholdTool extends _annotation_RectangleROITool_js_
|
|
|
7186
6428
|
const { points } = data.handles;
|
|
7187
6429
|
const startIJK = transformWorldToIndex(imageData, points[0]);
|
|
7188
6430
|
const endIJK = transformWorldToIndex(imageData, points[0]);
|
|
7189
|
-
const startWorld = gl_matrix__rspack_import_2
|
|
6431
|
+
const startWorld = gl_matrix__rspack_import_2.vec3.create();
|
|
7190
6432
|
imageData.indexToWorldVec3(startIJK, startWorld);
|
|
7191
|
-
const endWorld = gl_matrix__rspack_import_2
|
|
6433
|
+
const endWorld = gl_matrix__rspack_import_2.vec3.create();
|
|
7192
6434
|
imageData.indexToWorldVec3(endIJK, endWorld);
|
|
7193
6435
|
const projectionAxisIndex = this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal);
|
|
7194
6436
|
if (projectionAxisIndex == 2) {
|
|
@@ -7203,15 +6445,15 @@ class RectangleROIStartEndThresholdTool extends _annotation_RectangleROITool_js_
|
|
|
7203
6445
|
startWorld[1] = startCoordinate;
|
|
7204
6446
|
endWorld[1] = endCoordinate;
|
|
7205
6447
|
}
|
|
7206
|
-
const direction = gl_matrix__rspack_import_2
|
|
7207
|
-
gl_matrix__rspack_import_2
|
|
7208
|
-
const distance = gl_matrix__rspack_import_2
|
|
7209
|
-
gl_matrix__rspack_import_2
|
|
6448
|
+
const direction = gl_matrix__rspack_import_2.vec3.create();
|
|
6449
|
+
gl_matrix__rspack_import_2.vec3.subtract(direction, endWorld, startWorld);
|
|
6450
|
+
const distance = gl_matrix__rspack_import_2.vec3.length(direction);
|
|
6451
|
+
gl_matrix__rspack_import_2.vec3.normalize(direction, direction);
|
|
7210
6452
|
const newProjectionPoints = [];
|
|
7211
6453
|
for (let dist = 0; dist < distance; dist += spacingInNormal) {
|
|
7212
6454
|
newProjectionPoints.push(points.map((point) => {
|
|
7213
|
-
const newPoint = gl_matrix__rspack_import_2
|
|
7214
|
-
gl_matrix__rspack_import_2
|
|
6455
|
+
const newPoint = gl_matrix__rspack_import_2.vec3.create();
|
|
6456
|
+
gl_matrix__rspack_import_2.vec3.scaleAndAdd(newPoint, point, direction, dist);
|
|
7215
6457
|
return Array.from(newPoint);
|
|
7216
6458
|
}));
|
|
7217
6459
|
}
|
|
@@ -7314,8 +6556,8 @@ class RectangleROIStartEndThresholdTool extends _annotation_RectangleROITool_js_
|
|
|
7314
6556
|
}
|
|
7315
6557
|
_getEndCoordinate(worldPos, spacingInNormal, viewPlaneNormal) {
|
|
7316
6558
|
const numSlicesToPropagate = this.configuration.numSlicesToPropagate;
|
|
7317
|
-
const endPos = gl_matrix__rspack_import_2
|
|
7318
|
-
gl_matrix__rspack_import_2
|
|
6559
|
+
const endPos = gl_matrix__rspack_import_2.vec3.create();
|
|
6560
|
+
gl_matrix__rspack_import_2.vec3.scaleAndAdd(endPos, worldPos, viewPlaneNormal, numSlicesToPropagate * spacingInNormal);
|
|
7319
6561
|
const endCoord = this._getCoordinateForViewplaneNormal(endPos, viewPlaneNormal);
|
|
7320
6562
|
return endCoord;
|
|
7321
6563
|
}
|
|
@@ -9573,17 +8815,17 @@ const addCanvasPointsToArray = (element, canvasPoints, newCanvasPoint, commonDat
|
|
|
9573
8815
|
}
|
|
9574
8816
|
const lastWorldPos = viewport.canvasToWorld(canvasPoints[canvasPoints.length - 1]);
|
|
9575
8817
|
const newWorldPos = viewport.canvasToWorld(newCanvasPoint);
|
|
9576
|
-
const worldPosDiff = gl_matrix__rspack_import_1
|
|
9577
|
-
gl_matrix__rspack_import_1
|
|
9578
|
-
const xDist = Math.abs(gl_matrix__rspack_import_1
|
|
9579
|
-
const yDist = Math.abs(gl_matrix__rspack_import_1
|
|
8818
|
+
const worldPosDiff = gl_matrix__rspack_import_1.vec3.create();
|
|
8819
|
+
gl_matrix__rspack_import_1.vec3.subtract(worldPosDiff, newWorldPos, lastWorldPos);
|
|
8820
|
+
const xDist = Math.abs(gl_matrix__rspack_import_1.vec3.dot(worldPosDiff, xDir));
|
|
8821
|
+
const yDist = Math.abs(gl_matrix__rspack_import_1.vec3.dot(worldPosDiff, yDir));
|
|
9580
8822
|
const numPointsToAdd = Math.max(Math.floor(xDist / spacing[0]), Math.floor(yDist / spacing[0]));
|
|
9581
8823
|
if (numPointsToAdd > 1) {
|
|
9582
8824
|
const lastCanvasPoint = canvasPoints[canvasPoints.length - 1];
|
|
9583
|
-
const canvasDist = gl_matrix__rspack_import_1
|
|
9584
|
-
const canvasDir = gl_matrix__rspack_import_1
|
|
9585
|
-
gl_matrix__rspack_import_1
|
|
9586
|
-
gl_matrix__rspack_import_1
|
|
8825
|
+
const canvasDist = gl_matrix__rspack_import_1.vec2.dist(lastCanvasPoint, newCanvasPoint);
|
|
8826
|
+
const canvasDir = gl_matrix__rspack_import_1.vec2.create();
|
|
8827
|
+
gl_matrix__rspack_import_1.vec2.subtract(canvasDir, newCanvasPoint, lastCanvasPoint);
|
|
8828
|
+
gl_matrix__rspack_import_1.vec2.set(canvasDir, canvasDir[0] / canvasDist, canvasDir[1] / canvasDist);
|
|
9587
8829
|
const distPerPoint = canvasDist / numPointsToAdd;
|
|
9588
8830
|
for (let i = 1; i <= numPointsToAdd; i++) {
|
|
9589
8831
|
canvasPoints.push([
|
|
@@ -10255,14 +9497,14 @@ const getSubPixelSpacingAndXYDirections = (viewport, subPixelResolution) => {
|
|
|
10255
9497
|
const iVector = direction.slice(0, 3);
|
|
10256
9498
|
const jVector = direction.slice(3, 6);
|
|
10257
9499
|
const kVector = direction.slice(6, 9);
|
|
10258
|
-
const normalizedViewUp = gl_matrix__rspack_import_1
|
|
10259
|
-
gl_matrix__rspack_import_1
|
|
10260
|
-
const viewRight = gl_matrix__rspack_import_1
|
|
10261
|
-
gl_matrix__rspack_import_1
|
|
10262
|
-
gl_matrix__rspack_import_1
|
|
10263
|
-
const absViewRightDotI = Math.abs(gl_matrix__rspack_import_1
|
|
10264
|
-
const absViewRightDotJ = Math.abs(gl_matrix__rspack_import_1
|
|
10265
|
-
const absViewRightDotK = Math.abs(gl_matrix__rspack_import_1
|
|
9500
|
+
const normalizedViewUp = gl_matrix__rspack_import_1.vec3.create();
|
|
9501
|
+
gl_matrix__rspack_import_1.vec3.normalize(normalizedViewUp, viewUp);
|
|
9502
|
+
const viewRight = gl_matrix__rspack_import_1.vec3.create();
|
|
9503
|
+
gl_matrix__rspack_import_1.vec3.cross(viewRight, normalizedViewUp, viewPlaneNormal);
|
|
9504
|
+
gl_matrix__rspack_import_1.vec3.normalize(viewRight, viewRight);
|
|
9505
|
+
const absViewRightDotI = Math.abs(gl_matrix__rspack_import_1.vec3.dot(viewRight, iVector));
|
|
9506
|
+
const absViewRightDotJ = Math.abs(gl_matrix__rspack_import_1.vec3.dot(viewRight, jVector));
|
|
9507
|
+
const absViewRightDotK = Math.abs(gl_matrix__rspack_import_1.vec3.dot(viewRight, kVector));
|
|
10266
9508
|
let xSpacing;
|
|
10267
9509
|
if (Math.abs(1 - absViewRightDotI) < EPSILON) {
|
|
10268
9510
|
xSpacing = volumeSpacing[0];
|
|
@@ -10280,9 +9522,9 @@ const getSubPixelSpacingAndXYDirections = (viewport, subPixelResolution) => {
|
|
|
10280
9522
|
xSpacing = getEffectiveSpacingAlongDirection(imageData, viewRight);
|
|
10281
9523
|
xDir = Array.from(viewRight);
|
|
10282
9524
|
}
|
|
10283
|
-
const absViewUpDotI = Math.abs(gl_matrix__rspack_import_1
|
|
10284
|
-
const absViewUpDotJ = Math.abs(gl_matrix__rspack_import_1
|
|
10285
|
-
const absViewUpDotK = Math.abs(gl_matrix__rspack_import_1
|
|
9525
|
+
const absViewUpDotI = Math.abs(gl_matrix__rspack_import_1.vec3.dot(normalizedViewUp, iVector));
|
|
9526
|
+
const absViewUpDotJ = Math.abs(gl_matrix__rspack_import_1.vec3.dot(normalizedViewUp, jVector));
|
|
9527
|
+
const absViewUpDotK = Math.abs(gl_matrix__rspack_import_1.vec3.dot(normalizedViewUp, kVector));
|
|
10286
9528
|
let ySpacing;
|
|
10287
9529
|
if (Math.abs(1 - absViewUpDotI) < EPSILON) {
|
|
10288
9530
|
ySpacing = volumeSpacing[0];
|
|
@@ -10650,11 +9892,11 @@ const pointCanProjectOnLine = (p, p1, p2, proximity) => {
|
|
|
10650
9892
|
p1[0] + projectionVector[0],
|
|
10651
9893
|
p1[1] + projectionVector[1],
|
|
10652
9894
|
];
|
|
10653
|
-
const distance = gl_matrix__rspack_import_0
|
|
9895
|
+
const distance = gl_matrix__rspack_import_0.vec2.distance(p, projectionPoint);
|
|
10654
9896
|
if (distance > proximity) {
|
|
10655
9897
|
return false;
|
|
10656
9898
|
}
|
|
10657
|
-
if (gl_matrix__rspack_import_0
|
|
9899
|
+
if (gl_matrix__rspack_import_0.vec2.distance(p1, projectionPoint) > gl_matrix__rspack_import_0.vec2.distance(p1, p2)) {
|
|
10658
9900
|
return false;
|
|
10659
9901
|
}
|
|
10660
9902
|
return true;
|
|
@@ -10667,7 +9909,7 @@ const pointCanProjectOnLine = (p, p1, p2, proximity) => {
|
|
|
10667
9909
|
/* import */ var gl_matrix__rspack_import_0 = __webpack_require__(50341);
|
|
10668
9910
|
|
|
10669
9911
|
const pointsAreWithinCloseContourProximity = (p1, p2, closeContourProximity) => {
|
|
10670
|
-
return gl_matrix__rspack_import_0
|
|
9912
|
+
return gl_matrix__rspack_import_0.vec2.dist(p1, p2) < closeContourProximity;
|
|
10671
9913
|
};
|
|
10672
9914
|
/* export default */ __webpack_exports__.A = (pointsAreWithinCloseContourProximity);
|
|
10673
9915
|
|
|
@@ -11084,11 +10326,11 @@ function filterAnnotationsWithinSlice(annotations, camera, spacingInNormalDirect
|
|
|
11084
10326
|
if (planeRestriction) {
|
|
11085
10327
|
const { inPlaneVector1, inPlaneVector2 } = planeRestriction;
|
|
11086
10328
|
if (inPlaneVector1 &&
|
|
11087
|
-
!isEqual(0, gl_matrix__rspack_import_0
|
|
10329
|
+
!isEqual(0, gl_matrix__rspack_import_0.vec3.dot(viewPlaneNormal, inPlaneVector1))) {
|
|
11088
10330
|
return false;
|
|
11089
10331
|
}
|
|
11090
10332
|
if (inPlaneVector2 &&
|
|
11091
|
-
!isEqual(0, gl_matrix__rspack_import_0
|
|
10333
|
+
!isEqual(0, gl_matrix__rspack_import_0.vec3.dot(viewPlaneNormal, inPlaneVector2))) {
|
|
11092
10334
|
return false;
|
|
11093
10335
|
}
|
|
11094
10336
|
return true;
|
|
@@ -11097,8 +10339,8 @@ function filterAnnotationsWithinSlice(annotations, camera, spacingInNormalDirect
|
|
|
11097
10339
|
!annotationViewPlaneNormal &&
|
|
11098
10340
|
td.metadata.FrameOfReferenceUID) {
|
|
11099
10341
|
for (const point of td.data.handles.points) {
|
|
11100
|
-
const vector = gl_matrix__rspack_import_0
|
|
11101
|
-
const dotProduct = gl_matrix__rspack_import_0
|
|
10342
|
+
const vector = gl_matrix__rspack_import_0.vec3.sub(gl_matrix__rspack_import_0.vec3.create(), point, camera.focalPoint);
|
|
10343
|
+
const dotProduct = gl_matrix__rspack_import_0.vec3.dot(vector, viewPlaneNormal);
|
|
11102
10344
|
if (!isEqual(dotProduct, 0)) {
|
|
11103
10345
|
return false;
|
|
11104
10346
|
}
|
|
@@ -11109,13 +10351,13 @@ function filterAnnotationsWithinSlice(annotations, camera, spacingInNormalDirect
|
|
|
11109
10351
|
}
|
|
11110
10352
|
if (!annotationViewPlaneNormal && referencedImageId) {
|
|
11111
10353
|
const { imageOrientationPatient } = _cornerstonejs_core__rspack_import_1.metaData.get('imagePlaneModule', referencedImageId);
|
|
11112
|
-
const rowCosineVec = gl_matrix__rspack_import_0
|
|
11113
|
-
const colCosineVec = gl_matrix__rspack_import_0
|
|
11114
|
-
annotationViewPlaneNormal = gl_matrix__rspack_import_0
|
|
11115
|
-
gl_matrix__rspack_import_0
|
|
10354
|
+
const rowCosineVec = gl_matrix__rspack_import_0.vec3.fromValues(imageOrientationPatient[0], imageOrientationPatient[1], imageOrientationPatient[2]);
|
|
10355
|
+
const colCosineVec = gl_matrix__rspack_import_0.vec3.fromValues(imageOrientationPatient[3], imageOrientationPatient[4], imageOrientationPatient[5]);
|
|
10356
|
+
annotationViewPlaneNormal = gl_matrix__rspack_import_0.vec3.create();
|
|
10357
|
+
gl_matrix__rspack_import_0.vec3.cross(annotationViewPlaneNormal, rowCosineVec, colCosineVec);
|
|
11116
10358
|
td.metadata.viewPlaneNormal = annotationViewPlaneNormal;
|
|
11117
10359
|
}
|
|
11118
|
-
const isParallel = Math.abs(gl_matrix__rspack_import_0
|
|
10360
|
+
const isParallel = Math.abs(gl_matrix__rspack_import_0.vec3.dot(viewPlaneNormal, annotationViewPlaneNormal)) >
|
|
11119
10361
|
PARALLEL_THRESHOLD;
|
|
11120
10362
|
return annotationViewPlaneNormal && isParallel;
|
|
11121
10363
|
});
|
|
@@ -11137,8 +10379,8 @@ function filterAnnotationsWithinSlice(annotations, camera, spacingInNormalDirect
|
|
|
11137
10379
|
annotationsWithinSlice.push(annotation);
|
|
11138
10380
|
continue;
|
|
11139
10381
|
}
|
|
11140
|
-
const dir = gl_matrix__rspack_import_0
|
|
11141
|
-
const dot = Math.abs(gl_matrix__rspack_import_0
|
|
10382
|
+
const dir = gl_matrix__rspack_import_0.vec3.sub(gl_matrix__rspack_import_0.vec3.create(), focalPoint, point);
|
|
10383
|
+
const dot = Math.abs(gl_matrix__rspack_import_0.vec3.dot(dir, viewPlaneNormal));
|
|
11142
10384
|
if (dot < halfSpacingInNormalDirection) {
|
|
11143
10385
|
annotationsWithinSlice.push(annotation);
|
|
11144
10386
|
}
|
|
@@ -11156,17 +10398,17 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
11156
10398
|
/* import */ var gl_matrix__rspack_import_0 = __webpack_require__(50341);
|
|
11157
10399
|
|
|
11158
10400
|
function getWorldWidthAndHeightFromCorners(viewPlaneNormal, viewUp, topLeftWorld, bottomRightWorld) {
|
|
11159
|
-
const viewRight = gl_matrix__rspack_import_0
|
|
11160
|
-
gl_matrix__rspack_import_0
|
|
11161
|
-
const pos1 = gl_matrix__rspack_import_0
|
|
11162
|
-
const pos2 = gl_matrix__rspack_import_0
|
|
11163
|
-
const diagonal = gl_matrix__rspack_import_0
|
|
11164
|
-
gl_matrix__rspack_import_0
|
|
11165
|
-
const diagonalLength = gl_matrix__rspack_import_0
|
|
10401
|
+
const viewRight = gl_matrix__rspack_import_0.vec3.create();
|
|
10402
|
+
gl_matrix__rspack_import_0.vec3.cross(viewRight, viewUp, viewPlaneNormal);
|
|
10403
|
+
const pos1 = gl_matrix__rspack_import_0.vec3.fromValues(...topLeftWorld);
|
|
10404
|
+
const pos2 = gl_matrix__rspack_import_0.vec3.fromValues(...bottomRightWorld);
|
|
10405
|
+
const diagonal = gl_matrix__rspack_import_0.vec3.create();
|
|
10406
|
+
gl_matrix__rspack_import_0.vec3.subtract(diagonal, pos1, pos2);
|
|
10407
|
+
const diagonalLength = gl_matrix__rspack_import_0.vec3.length(diagonal);
|
|
11166
10408
|
if (diagonalLength < 0.0001) {
|
|
11167
10409
|
return { worldWidth: 0, worldHeight: 0 };
|
|
11168
10410
|
}
|
|
11169
|
-
const cosTheta = gl_matrix__rspack_import_0
|
|
10411
|
+
const cosTheta = gl_matrix__rspack_import_0.vec3.dot(diagonal, viewRight) / (diagonalLength * gl_matrix__rspack_import_0.vec3.length(viewRight));
|
|
11170
10412
|
const sinTheta = Math.sqrt(1 - cosTheta * cosTheta);
|
|
11171
10413
|
const worldWidth = sinTheta * diagonalLength;
|
|
11172
10414
|
const worldHeight = cosTheta * diagonalLength;
|
|
@@ -12387,7 +11629,7 @@ function filterViewportsWithParallelNormals(viewports, referenceViewport, EPS =
|
|
|
12387
11629
|
if (!vpCamera.viewPlaneNormal) {
|
|
12388
11630
|
return false;
|
|
12389
11631
|
}
|
|
12390
|
-
const isParallel = Math.abs(gl_matrix__rspack_import_0
|
|
11632
|
+
const isParallel = Math.abs(gl_matrix__rspack_import_0.vec3.dot(vpCamera.viewPlaneNormal, referenceNormal)) > EPS;
|
|
12391
11633
|
return isParallel;
|
|
12392
11634
|
});
|
|
12393
11635
|
}
|