@ohif/app 3.9.0-beta.11 → 3.9.0-beta.12
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/{117.bundle.a80b1511ef4b302fb7cc.js → 117.bundle.58f96ac1d52fd08db5c2.js} +49 -15
- package/dist/{164.bundle.1da1cadb56951caef1d6.js → 164.bundle.db5eee347be4e24f6fdd.js} +315 -41
- package/dist/{236.bundle.4ca7987e1d57f60ec13a.js → 236.bundle.e128a6f4c3e4600c55b0.js} +376 -52
- package/dist/{342.bundle.340982440de15f540a89.js → 342.bundle.8da40c53fe26b492a0a1.js} +7 -0
- package/dist/{473.bundle.6cd4be953853f35b29c3.js → 367.bundle.da5db5b510b537e43888.js} +278 -29
- package/dist/{806.bundle.50e039eb624382ee1fce.js → 370.bundle.d009a20516eae7c98921.js} +77 -9
- package/dist/{390.bundle.4fb18436fcd8c75bfab9.js → 390.bundle.41fd0a538167790d9d47.js} +2 -2
- package/dist/{483.bundle.a353efc5a5dd563c903c.js → 483.bundle.67e9abdcf23262c94606.js} +16 -3
- package/dist/{35.bundle.0168d78bfad0cb784112.js → 501.bundle.d5262ba2d61a134e80f9.js} +739 -244
- package/dist/{550.bundle.76c529a79ade359c0af7.js → 550.bundle.a716f910818556a3fe25.js} +1 -0
- package/dist/{722.bundle.2547630541b670f10d6e.js → 722.bundle.1242e0348afc63ca4f5e.js} +10 -4
- package/dist/{889.bundle.60a917f43d3d3aebd378.js → 889.bundle.452d430a2de1befbb4b6.js} +1 -1
- package/dist/{app.bundle.f2e1810071777956e5da.js → app.bundle.4aad780d7de60fbea88c.js} +410 -213
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.1799686b019040500219.js → polySeg.bundle.e577ad8d051493b01ed8.js} +3 -3
- package/dist/{suv-peak-worker.bundle.25f8b85eab9ec06da48d.js → suv-peak-worker.bundle.63bd26cc0f6f37ade9c9.js} +3 -3
- package/dist/sw.js +1 -1
- package/package.json +18 -18
- /package/dist/{243.bundle.f701d3acde1d3750fda2.js → 243.bundle.d1aebc1b37fbc79b4efa.js} +0 -0
- /package/dist/{325.bundle.242d9efe2ed15a5a334e.js → 325.bundle.b9562b2d87395c98c6fd.js} +0 -0
- /package/dist/{448.bundle.97cfffdf73a6f7410119.js → 448.bundle.8cc61deda2bc80acba01.js} +0 -0
- /package/dist/{487.bundle.3146b9a2006ff92246f9.js → 487.bundle.95038d078cb68e2ef2fb.js} +0 -0
- /package/dist/{544.bundle.e8227e98860e39636a00.js → 544.bundle.4d1fb477b572f50f4220.js} +0 -0
- /package/dist/{574.bundle.72bd5061ccd504235419.js → 574.bundle.a09bcafd228eaa261546.js} +0 -0
- /package/dist/{682.bundle.f786c869b632dadc55d3.js → 682.bundle.a1fa16d4d12332743a01.js} +0 -0
- /package/dist/{699.bundle.d8fd228d9425a584b6d1.js → 699.bundle.ce1da733d32e72f233dc.js} +0 -0
- /package/dist/{721.bundle.1070ac1c9bc6aa07e964.js → 721.bundle.24b04bc522eb42eed661.js} +0 -0
- /package/dist/{776.bundle.505d83008d54340ddcee.js → 776.bundle.4b13326929e972f1b556.js} +0 -0
- /package/dist/{783.bundle.f0eabf38cc6f986f2b96.js → 783.bundle.82c773591d704fd43704.js} +0 -0
- /package/dist/{862.bundle.55dde21bab4c841b6259.js → 862.bundle.1380dc65a7782ec98457.js} +0 -0
- /package/dist/{905.bundle.da4b814f42846a91663c.js → 905.bundle.7cdf93c8dcb4a64cf85a.js} +0 -0
- /package/dist/{907.bundle.f3edaafebee9db2e2736.js → 907.bundle.770adbc99f6c80f17ab2.js} +0 -0
- /package/dist/{94.bundle.2486a958cb879d59aa7d.js → 94.bundle.830180a268276294cb20.js} +0 -0
- /package/dist/{961.bundle.5711180f24fad3da4096.js → 961.bundle.ebc13fc1dd54a0a4c577.js} +0 -0
- /package/dist/{981.bundle.b5bcd103ff48bc8817e6.js → 981.bundle.acde3b12915e455d660c.js} +0 -0
- /package/dist/{989.bundle.130439d9d862e47a9200.js → 989.bundle.852be152ceda813c34b8.js} +0 -0
- /package/dist/{998.bundle.d9191b5ca5bde4305742.js → 998.bundle.cd8fbf4a16475a9eaa13.js} +0 -0
|
@@ -796,6 +796,7 @@ var MeasurementReport$1 = /*#__PURE__*/function () {
|
|
|
796
796
|
// Merge the derived dataset with the content from the Measurement Report
|
|
797
797
|
report.dataset = Object.assign(report.dataset, contentItem);
|
|
798
798
|
report.dataset._meta = _meta;
|
|
799
|
+
report.dataset.SpecificCharacterSet = "ISO_IR 192";
|
|
799
800
|
return report;
|
|
800
801
|
}
|
|
801
802
|
|
|
@@ -2408,6 +2409,7 @@ function fillSegmentation$1(segmentation, inputLabelmaps3D) {
|
|
|
2408
2409
|
Value: ["1.2.840.10008.1.2.5"],
|
|
2409
2410
|
vr: "UI"
|
|
2410
2411
|
};
|
|
2412
|
+
segmentation.dataset.SpecificCharacterSet = "ISO_IR 192";
|
|
2411
2413
|
segmentation.dataset._vrMap.PixelData = "OB";
|
|
2412
2414
|
segmentation.dataset.PixelData = rleEncodedFrames;
|
|
2413
2415
|
} else {
|
|
@@ -2441,6 +2443,7 @@ function _createSegFromImages(images, isMultiframe, options) {
|
|
|
2441
2443
|
var dicomData = DicomMessage.readFile(arrayBuffer);
|
|
2442
2444
|
var dataset = DicomMetaDictionary$2.naturalizeDataset(dicomData.dict);
|
|
2443
2445
|
dataset._meta = DicomMetaDictionary$2.namifyDataset(dicomData.meta);
|
|
2446
|
+
dataset.SpecificCharacterSet = "ISO_IR 192";
|
|
2444
2447
|
datasets.push(dataset);
|
|
2445
2448
|
} else {
|
|
2446
2449
|
for (var i = 0; i < images.length; i++) {
|
|
@@ -2449,6 +2452,7 @@ function _createSegFromImages(images, isMultiframe, options) {
|
|
|
2449
2452
|
var _dicomData = DicomMessage.readFile(_arrayBuffer);
|
|
2450
2453
|
var _dataset = DicomMetaDictionary$2.naturalizeDataset(_dicomData.dict);
|
|
2451
2454
|
_dataset._meta = DicomMetaDictionary$2.namifyDataset(_dicomData.meta);
|
|
2455
|
+
_dataset.SpecificCharacterSet = "ISO_IR 192";
|
|
2452
2456
|
datasets.push(_dataset);
|
|
2453
2457
|
}
|
|
2454
2458
|
}
|
|
@@ -3810,6 +3814,7 @@ var MeasurementReport = /** @class */ (function () {
|
|
|
3810
3814
|
// Merge the derived dataset with the content from the Measurement Report
|
|
3811
3815
|
report.dataset = Object.assign(report.dataset, contentItem);
|
|
3812
3816
|
report.dataset._meta = _meta;
|
|
3817
|
+
report.SpecificCharacterSet = "ISO_IR 192";
|
|
3813
3818
|
return report;
|
|
3814
3819
|
};
|
|
3815
3820
|
/**
|
|
@@ -5327,6 +5332,7 @@ function generateRTSSFromSegmentations(segmentations, metadataProvider, DicomMet
|
|
|
5327
5332
|
}
|
|
5328
5333
|
};
|
|
5329
5334
|
dataset._meta = _meta;
|
|
5335
|
+
dataset.SpecificCharacterSet = "ISO_IR 192";
|
|
5330
5336
|
return dataset;
|
|
5331
5337
|
}
|
|
5332
5338
|
/**
|
|
@@ -5378,6 +5384,7 @@ function generateRTSSFromAnnotations(annotations, metadataProvider, DicomMetadat
|
|
|
5378
5384
|
}
|
|
5379
5385
|
};
|
|
5380
5386
|
dataset._meta = _meta;
|
|
5387
|
+
dataset.SpecificCharacterSet = "ISO_IR 192";
|
|
5381
5388
|
return dataset;
|
|
5382
5389
|
}
|
|
5383
5390
|
// /**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[367],{
|
|
3
3
|
|
|
4
4
|
/***/ 52454:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
@@ -293,6 +293,101 @@ class AnnotationFrameRange {
|
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
|
|
296
|
+
/***/ }),
|
|
297
|
+
|
|
298
|
+
/***/ 25781:
|
|
299
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
300
|
+
|
|
301
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
302
|
+
/* harmony export */ i: () => (/* binding */ annotationHydration)
|
|
303
|
+
/* harmony export */ });
|
|
304
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
305
|
+
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95778);
|
|
306
|
+
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44753);
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
function annotationHydration(viewport, toolName, worldPoints, options) {
|
|
311
|
+
const viewReference = viewport.getViewReference();
|
|
312
|
+
const { viewPlaneNormal, FrameOfReferenceUID } = viewReference;
|
|
313
|
+
const annotation = {
|
|
314
|
+
annotationUID: options?.annotationUID || _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.uuidv4(),
|
|
315
|
+
data: {
|
|
316
|
+
handles: {
|
|
317
|
+
points: worldPoints,
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
highlighted: false,
|
|
321
|
+
autoGenerated: false,
|
|
322
|
+
invalidated: false,
|
|
323
|
+
isLocked: false,
|
|
324
|
+
isVisible: true,
|
|
325
|
+
metadata: {
|
|
326
|
+
toolName,
|
|
327
|
+
viewPlaneNormal,
|
|
328
|
+
FrameOfReferenceUID,
|
|
329
|
+
referencedImageId: getReferencedImageId(viewport, worldPoints[0], viewPlaneNormal),
|
|
330
|
+
...options,
|
|
331
|
+
},
|
|
332
|
+
};
|
|
333
|
+
(0,_stateManagement__WEBPACK_IMPORTED_MODULE_1__/* .addAnnotation */ .lC)(annotation, viewport.element);
|
|
334
|
+
return annotation;
|
|
335
|
+
}
|
|
336
|
+
function getReferencedImageId(viewport, worldPos, viewPlaneNormal) {
|
|
337
|
+
let referencedImageId;
|
|
338
|
+
if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.StackViewport) {
|
|
339
|
+
referencedImageId = getClosestImageIdForStackViewport(viewport, worldPos, viewPlaneNormal);
|
|
340
|
+
}
|
|
341
|
+
else if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.BaseVolumeViewport) {
|
|
342
|
+
const targetId = getTargetId(viewport);
|
|
343
|
+
const volumeId = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.getVolumeId(targetId);
|
|
344
|
+
const imageVolume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(volumeId);
|
|
345
|
+
referencedImageId = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.getClosestImageId(imageVolume, worldPos, viewPlaneNormal);
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
throw new Error('getReferencedImageId: viewport must be a StackViewport or BaseVolumeViewport');
|
|
349
|
+
}
|
|
350
|
+
return referencedImageId;
|
|
351
|
+
}
|
|
352
|
+
function getTargetId(viewport) {
|
|
353
|
+
const targetId = viewport.getReferenceId?.();
|
|
354
|
+
if (targetId) {
|
|
355
|
+
return targetId;
|
|
356
|
+
}
|
|
357
|
+
if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.BaseVolumeViewport) {
|
|
358
|
+
return `volumeId:${getTargetVolumeId(viewport)}`;
|
|
359
|
+
}
|
|
360
|
+
throw new Error('getTargetId: viewport must have a getTargetId method');
|
|
361
|
+
}
|
|
362
|
+
function getTargetVolumeId(viewport) {
|
|
363
|
+
const actorEntries = viewport.getActors();
|
|
364
|
+
if (!actorEntries) {
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
return actorEntries.find((actorEntry) => actorEntry.actor.getClassName() === 'vtkVolume')?.uid;
|
|
368
|
+
}
|
|
369
|
+
function getClosestImageIdForStackViewport(viewport, worldPos, viewPlaneNormal) {
|
|
370
|
+
const imageIds = viewport.getImageIds();
|
|
371
|
+
if (!imageIds || !imageIds.length) {
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
const distanceImagePairs = imageIds.map((imageId) => {
|
|
375
|
+
const { imagePositionPatient } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.metaData.get('imagePlaneModule', imageId);
|
|
376
|
+
const distance = calculateDistanceToImage(worldPos, imagePositionPatient, viewPlaneNormal);
|
|
377
|
+
return { imageId, distance };
|
|
378
|
+
});
|
|
379
|
+
distanceImagePairs.sort((a, b) => a.distance - b.distance);
|
|
380
|
+
return distanceImagePairs[0].imageId;
|
|
381
|
+
}
|
|
382
|
+
function calculateDistanceToImage(worldPos, ImagePositionPatient, viewPlaneNormal) {
|
|
383
|
+
const dir = gl_matrix__WEBPACK_IMPORTED_MODULE_2__/* .vec3.create */ .eR.create();
|
|
384
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_2__/* .vec3.sub */ .eR.sub(dir, worldPos, ImagePositionPatient);
|
|
385
|
+
const dot = gl_matrix__WEBPACK_IMPORTED_MODULE_2__/* .vec3.dot */ .eR.dot(dir, viewPlaneNormal);
|
|
386
|
+
return Math.abs(dot);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
296
391
|
/***/ }),
|
|
297
392
|
|
|
298
393
|
/***/ 42290:
|
|
@@ -2214,6 +2309,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
2214
2309
|
Calculator: () => (/* reexport */ basic_Calculator)
|
|
2215
2310
|
});
|
|
2216
2311
|
|
|
2312
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
2313
|
+
var esm = __webpack_require__(92136);
|
|
2217
2314
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/basic/Calculator.js
|
|
2218
2315
|
class Calculator {
|
|
2219
2316
|
}
|
|
@@ -2221,55 +2318,73 @@ class Calculator {
|
|
|
2221
2318
|
|
|
2222
2319
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/basic/BasicStatsCalculator.js
|
|
2223
2320
|
|
|
2321
|
+
|
|
2322
|
+
const { PointsManager } = esm.utilities;
|
|
2224
2323
|
class BasicStatsCalculator extends basic_Calculator {
|
|
2225
2324
|
static { this.max = [-Infinity]; }
|
|
2325
|
+
static { this.min = [Infinity]; }
|
|
2226
2326
|
static { this.sum = [0]; }
|
|
2227
|
-
static { this.sumSquares = [0]; }
|
|
2228
|
-
static { this.squaredDiffSum = [0]; }
|
|
2229
2327
|
static { this.count = 0; }
|
|
2230
|
-
static { this.
|
|
2328
|
+
static { this.runMean = [0]; }
|
|
2329
|
+
static { this.m2 = [0]; }
|
|
2330
|
+
static { this.pointsInShape = PointsManager.create3(1024); }
|
|
2331
|
+
static statsInit(options) {
|
|
2332
|
+
if (options.noPointsCollection) {
|
|
2333
|
+
BasicStatsCalculator.pointsInShape = null;
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
static { this.statsCallback = ({ value: newValue, pointLPS = null }) => {
|
|
2231
2337
|
if (Array.isArray(newValue) &&
|
|
2232
2338
|
newValue.length > 1 &&
|
|
2233
2339
|
this.max.length === 1) {
|
|
2234
2340
|
this.max.push(this.max[0], this.max[0]);
|
|
2341
|
+
this.min.push(this.min[0], this.min[0]);
|
|
2235
2342
|
this.sum.push(this.sum[0], this.sum[0]);
|
|
2236
|
-
this.
|
|
2237
|
-
this.
|
|
2343
|
+
this.runMean.push(0, 0);
|
|
2344
|
+
this.m2.push(this.m2[0], this.m2[0]);
|
|
2238
2345
|
}
|
|
2346
|
+
this.pointsInShape?.push(pointLPS);
|
|
2239
2347
|
const newArray = Array.isArray(newValue) ? newValue : [newValue];
|
|
2240
2348
|
this.count += 1;
|
|
2241
|
-
this.max.
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2349
|
+
this.max.map((it, idx) => {
|
|
2350
|
+
const value = newArray[idx];
|
|
2351
|
+
const delta = value - this.runMean[idx];
|
|
2352
|
+
this.sum[idx] += value;
|
|
2353
|
+
this.runMean[idx] += delta / this.count;
|
|
2354
|
+
const delta2 = value - this.runMean[idx];
|
|
2355
|
+
this.m2[idx] += delta * delta2;
|
|
2356
|
+
this.min[idx] = Math.min(this.min[idx], value);
|
|
2357
|
+
this.max[idx] = Math.max(it, value);
|
|
2358
|
+
});
|
|
2245
2359
|
}; }
|
|
2246
|
-
static { this.getStatistics = () => {
|
|
2360
|
+
static { this.getStatistics = (options) => {
|
|
2247
2361
|
const mean = this.sum.map((sum) => sum / this.count);
|
|
2248
|
-
const stdDev = this.
|
|
2249
|
-
const
|
|
2362
|
+
const stdDev = this.m2.map((squaredDiffSum) => Math.sqrt(squaredDiffSum / this.count));
|
|
2363
|
+
const unit = options?.unit || null;
|
|
2250
2364
|
const named = {
|
|
2251
2365
|
max: {
|
|
2252
2366
|
name: 'max',
|
|
2253
2367
|
label: 'Max Pixel',
|
|
2254
2368
|
value: singleArrayAsNumber(this.max),
|
|
2255
|
-
unit
|
|
2369
|
+
unit,
|
|
2370
|
+
},
|
|
2371
|
+
min: {
|
|
2372
|
+
name: 'min',
|
|
2373
|
+
label: 'Min Pixel',
|
|
2374
|
+
value: singleArrayAsNumber(this.min),
|
|
2375
|
+
unit,
|
|
2256
2376
|
},
|
|
2257
2377
|
mean: {
|
|
2258
2378
|
name: 'mean',
|
|
2259
2379
|
label: 'Mean Pixel',
|
|
2260
2380
|
value: singleArrayAsNumber(mean),
|
|
2261
|
-
unit
|
|
2381
|
+
unit,
|
|
2262
2382
|
},
|
|
2263
2383
|
stdDev: {
|
|
2264
2384
|
name: 'stdDev',
|
|
2265
2385
|
label: 'Standard Deviation',
|
|
2266
2386
|
value: singleArrayAsNumber(stdDev),
|
|
2267
|
-
unit
|
|
2268
|
-
},
|
|
2269
|
-
stdDevWithSumSquare: {
|
|
2270
|
-
name: 'stdDevWithSumSquare',
|
|
2271
|
-
value: singleArrayAsNumber(stdDevWithSumSquare),
|
|
2272
|
-
unit: null,
|
|
2387
|
+
unit,
|
|
2273
2388
|
},
|
|
2274
2389
|
count: {
|
|
2275
2390
|
name: 'count',
|
|
@@ -2277,14 +2392,17 @@ class BasicStatsCalculator extends basic_Calculator {
|
|
|
2277
2392
|
value: this.count,
|
|
2278
2393
|
unit: null,
|
|
2279
2394
|
},
|
|
2395
|
+
pointsInShape: this.pointsInShape,
|
|
2280
2396
|
array: [],
|
|
2281
2397
|
};
|
|
2282
|
-
named.array.push(named.max, named.mean, named.stdDev, named.
|
|
2398
|
+
named.array.push(named.max, named.mean, named.stdDev, named.stdDev, named.count);
|
|
2283
2399
|
this.max = [-Infinity];
|
|
2400
|
+
this.min = [Infinity];
|
|
2284
2401
|
this.sum = [0];
|
|
2285
|
-
this.
|
|
2286
|
-
this.
|
|
2402
|
+
this.m2 = [0];
|
|
2403
|
+
this.runMean = [0];
|
|
2287
2404
|
this.count = 0;
|
|
2405
|
+
this.pointsInShape = PointsManager.create3(1024);
|
|
2288
2406
|
return named;
|
|
2289
2407
|
}; }
|
|
2290
2408
|
}
|
|
@@ -6968,14 +7086,145 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6968
7086
|
|
|
6969
7087
|
/***/ }),
|
|
6970
7088
|
|
|
6971
|
-
/***/
|
|
7089
|
+
/***/ 14149:
|
|
6972
7090
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6973
7091
|
|
|
7092
|
+
// ESM COMPAT FLAG
|
|
6974
7093
|
__webpack_require__.r(__webpack_exports__);
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
7094
|
+
|
|
7095
|
+
// EXPORTS
|
|
7096
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
7097
|
+
colorbar: () => (/* reexport */ colorbar),
|
|
7098
|
+
windowLevel: () => (/* reexport */ windowlevel_namespaceObject)
|
|
7099
|
+
});
|
|
7100
|
+
|
|
7101
|
+
// NAMESPACE OBJECT: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/windowlevel/index.js
|
|
7102
|
+
var windowlevel_namespaceObject = {};
|
|
7103
|
+
__webpack_require__.r(windowlevel_namespaceObject);
|
|
7104
|
+
__webpack_require__.d(windowlevel_namespaceObject, {
|
|
7105
|
+
calculateMinMaxMean: () => (calculateMinMaxMean),
|
|
7106
|
+
extractWindowLevelRegionToolData: () => (extractWindowLevelRegionToolData),
|
|
7107
|
+
getLuminanceFromRegion: () => (getLuminanceFromRegion)
|
|
7108
|
+
});
|
|
7109
|
+
|
|
7110
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/index.js
|
|
7111
|
+
var colorbar = __webpack_require__(64690);
|
|
7112
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/windowlevel/getLuminanceFromRegion.js
|
|
7113
|
+
function getLuminanceFromRegion(imageData, x, y, width, height) {
|
|
7114
|
+
const luminance = [];
|
|
7115
|
+
let index = 0;
|
|
7116
|
+
const pixelData = imageData.scalarData;
|
|
7117
|
+
let spIndex, row, column;
|
|
7118
|
+
if (imageData.color) {
|
|
7119
|
+
for (row = 0; row < height; row++) {
|
|
7120
|
+
for (column = 0; column < width; column++) {
|
|
7121
|
+
spIndex = ((row + y) * imageData.columns + (column + x)) * 4;
|
|
7122
|
+
const red = pixelData[spIndex];
|
|
7123
|
+
const green = pixelData[spIndex + 1];
|
|
7124
|
+
const blue = pixelData[spIndex + 2];
|
|
7125
|
+
luminance[index++] = 0.2126 * red + 0.7152 * green + 0.0722 * blue;
|
|
7126
|
+
}
|
|
7127
|
+
}
|
|
7128
|
+
}
|
|
7129
|
+
else {
|
|
7130
|
+
for (row = 0; row < height; row++) {
|
|
7131
|
+
for (column = 0; column < width; column++) {
|
|
7132
|
+
spIndex = (row + y) * imageData.columns + (column + x);
|
|
7133
|
+
luminance[index++] = pixelData[spIndex];
|
|
7134
|
+
}
|
|
7135
|
+
}
|
|
7136
|
+
}
|
|
7137
|
+
return luminance;
|
|
7138
|
+
}
|
|
7139
|
+
|
|
7140
|
+
|
|
7141
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/windowlevel/calculateMinMaxMean.js
|
|
7142
|
+
function calculateMinMaxMean(pixelLuminance, globalMin, globalMax) {
|
|
7143
|
+
const numPixels = pixelLuminance.length;
|
|
7144
|
+
let min = globalMax;
|
|
7145
|
+
let max = globalMin;
|
|
7146
|
+
let sum = 0;
|
|
7147
|
+
if (numPixels < 2) {
|
|
7148
|
+
return {
|
|
7149
|
+
min,
|
|
7150
|
+
max,
|
|
7151
|
+
mean: (globalMin + globalMax) / 2,
|
|
7152
|
+
};
|
|
7153
|
+
}
|
|
7154
|
+
for (let index = 0; index < numPixels; index++) {
|
|
7155
|
+
const spv = pixelLuminance[index];
|
|
7156
|
+
min = Math.min(min, spv);
|
|
7157
|
+
max = Math.max(max, spv);
|
|
7158
|
+
sum += spv;
|
|
7159
|
+
}
|
|
7160
|
+
return {
|
|
7161
|
+
min,
|
|
7162
|
+
max,
|
|
7163
|
+
mean: sum / numPixels,
|
|
7164
|
+
};
|
|
7165
|
+
}
|
|
7166
|
+
|
|
7167
|
+
|
|
7168
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
7169
|
+
var esm = __webpack_require__(92136);
|
|
7170
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/windowlevel/extractWindowLevelRegionToolData.js
|
|
7171
|
+
|
|
7172
|
+
function extractWindowLevelRegionToolData(viewport) {
|
|
7173
|
+
if (viewport instanceof esm.VolumeViewport) {
|
|
7174
|
+
return extractImageDataVolume(viewport);
|
|
7175
|
+
}
|
|
7176
|
+
if (viewport instanceof esm.StackViewport) {
|
|
7177
|
+
return extractImageDataStack(viewport);
|
|
7178
|
+
}
|
|
7179
|
+
throw new Error('Viewport not supported');
|
|
7180
|
+
}
|
|
7181
|
+
function extractImageDataVolume(viewport) {
|
|
7182
|
+
const { scalarData, width, height } = esm.utilities.getCurrentVolumeViewportSlice(viewport);
|
|
7183
|
+
const { min: minPixelValue, max: maxPixelValue } = esm.utilities.getMinMax(scalarData);
|
|
7184
|
+
const volumeId = viewport.getVolumeId();
|
|
7185
|
+
const volume = esm.cache.getVolume(volumeId);
|
|
7186
|
+
const { metadata, cornerstoneImageMetaData } = volume;
|
|
7187
|
+
const { Rows: rows, Columns: columns } = metadata;
|
|
7188
|
+
const { color } = cornerstoneImageMetaData;
|
|
7189
|
+
return {
|
|
7190
|
+
scalarData,
|
|
7191
|
+
width,
|
|
7192
|
+
height,
|
|
7193
|
+
minPixelValue,
|
|
7194
|
+
maxPixelValue,
|
|
7195
|
+
rows,
|
|
7196
|
+
columns,
|
|
7197
|
+
color,
|
|
7198
|
+
};
|
|
7199
|
+
}
|
|
7200
|
+
function extractImageDataStack(viewport) {
|
|
7201
|
+
const imageData = viewport.getImageData();
|
|
7202
|
+
const { scalarData } = imageData;
|
|
7203
|
+
const { min: minPixelValue, max: maxPixelValue } = esm.utilities.getMinMax(scalarData);
|
|
7204
|
+
const width = imageData.dimensions[0];
|
|
7205
|
+
const height = imageData.dimensions[1];
|
|
7206
|
+
const { rows, columns, color } = viewport.getCornerstoneImage();
|
|
7207
|
+
return {
|
|
7208
|
+
scalarData,
|
|
7209
|
+
width,
|
|
7210
|
+
height,
|
|
7211
|
+
minPixelValue,
|
|
7212
|
+
maxPixelValue,
|
|
7213
|
+
rows,
|
|
7214
|
+
columns,
|
|
7215
|
+
color,
|
|
7216
|
+
};
|
|
7217
|
+
}
|
|
7218
|
+
|
|
7219
|
+
|
|
7220
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/windowlevel/index.js
|
|
7221
|
+
|
|
7222
|
+
|
|
7223
|
+
|
|
7224
|
+
|
|
7225
|
+
|
|
7226
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/index.js
|
|
7227
|
+
|
|
6979
7228
|
|
|
6980
7229
|
|
|
6981
7230
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[
|
|
1
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[370],{
|
|
2
2
|
|
|
3
3
|
/***/ 93858:
|
|
4
4
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
@@ -1840,6 +1840,40 @@ function wheelListener(evt) {
|
|
|
1840
1840
|
/* harmony default export */ const wheel_wheelListener = (wheelListener);
|
|
1841
1841
|
|
|
1842
1842
|
|
|
1843
|
+
/***/ }),
|
|
1844
|
+
|
|
1845
|
+
/***/ 99595:
|
|
1846
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1847
|
+
|
|
1848
|
+
"use strict";
|
|
1849
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1850
|
+
/* harmony export */ Q: () => (/* binding */ checkAndDefineTextBoxProperty),
|
|
1851
|
+
/* harmony export */ d: () => (/* binding */ checkAndDefineCachedStatsProperty)
|
|
1852
|
+
/* harmony export */ });
|
|
1853
|
+
const checkAndDefineTextBoxProperty = (annotation) => {
|
|
1854
|
+
if (!annotation.data) {
|
|
1855
|
+
annotation.data = {};
|
|
1856
|
+
}
|
|
1857
|
+
if (!annotation.data.handles) {
|
|
1858
|
+
annotation.data.handles = {};
|
|
1859
|
+
}
|
|
1860
|
+
if (!annotation.data.handles.textBox) {
|
|
1861
|
+
annotation.data.handles.textBox = {};
|
|
1862
|
+
}
|
|
1863
|
+
return annotation;
|
|
1864
|
+
};
|
|
1865
|
+
const checkAndDefineCachedStatsProperty = (annotation) => {
|
|
1866
|
+
if (!annotation.data) {
|
|
1867
|
+
annotation.data = {};
|
|
1868
|
+
}
|
|
1869
|
+
if (!annotation.data.cachedStats) {
|
|
1870
|
+
annotation.data.cachedStats = {};
|
|
1871
|
+
}
|
|
1872
|
+
return annotation;
|
|
1873
|
+
};
|
|
1874
|
+
|
|
1875
|
+
|
|
1876
|
+
|
|
1843
1877
|
/***/ }),
|
|
1844
1878
|
|
|
1845
1879
|
/***/ 95778:
|
|
@@ -2522,7 +2556,7 @@ class AdvancedMagnifyViewportManager {
|
|
|
2522
2556
|
/* harmony export */ });
|
|
2523
2557
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
2524
2558
|
/* harmony import */ var _distancePointToContour__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7783);
|
|
2525
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
2559
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49574);
|
|
2526
2560
|
/* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(73047);
|
|
2527
2561
|
|
|
2528
2562
|
|
|
@@ -3836,7 +3870,7 @@ function registerOpenContourEndEditLoop(toolInstance) {
|
|
|
3836
3870
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3837
3871
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
3838
3872
|
/* harmony export */ });
|
|
3839
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3873
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(49574);
|
|
3840
3874
|
/* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73047);
|
|
3841
3875
|
/* harmony import */ var _findOpenUShapedContourVectorToPeak__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51051);
|
|
3842
3876
|
/* harmony import */ var _utilities_contours__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75534);
|
|
@@ -4009,10 +4043,42 @@ function renderOpenContourBeingEdited(enabledElement, svgDrawingHelper, annotati
|
|
|
4009
4043
|
const polylineUIDToRender = 'preview-1';
|
|
4010
4044
|
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_0__.drawPolyline)(svgDrawingHelper, annotation.annotationUID, polylineUIDToRender, fusedCanvasPoints, options);
|
|
4011
4045
|
}
|
|
4046
|
+
function renderPointContourWithMarker(enabledElement, svgDrawingHelper, annotation) {
|
|
4047
|
+
if (annotation.parentAnnotationUID) {
|
|
4048
|
+
return;
|
|
4049
|
+
}
|
|
4050
|
+
const { viewport } = enabledElement;
|
|
4051
|
+
const options = this._getRenderingOptions(enabledElement, annotation);
|
|
4052
|
+
const canvasPolyline = annotation.data.contour.polyline.map((worldPos) => viewport.worldToCanvas(worldPos));
|
|
4053
|
+
const childContours = (0,_utilities_contours__WEBPACK_IMPORTED_MODULE_3__.getContourHolesDataCanvas)(annotation, viewport);
|
|
4054
|
+
const polylineUID = '1';
|
|
4055
|
+
const center = canvasPolyline[0];
|
|
4056
|
+
const radius = 6;
|
|
4057
|
+
const numberOfPoints = 100;
|
|
4058
|
+
const circlePoints = [];
|
|
4059
|
+
for (let i = 0; i < numberOfPoints; i++) {
|
|
4060
|
+
const angle = (i / numberOfPoints) * 2 * Math.PI;
|
|
4061
|
+
const x = center[0] + radius * Math.cos(angle);
|
|
4062
|
+
const y = center[1] + radius * Math.sin(angle);
|
|
4063
|
+
circlePoints.push([x, y]);
|
|
4064
|
+
}
|
|
4065
|
+
const crosshair = [
|
|
4066
|
+
[center[0] - radius * 2, center[1]],
|
|
4067
|
+
[center[0] + radius * 2, center[1]],
|
|
4068
|
+
[center[0], center[1] - radius * 2],
|
|
4069
|
+
[center[0], center[1] + radius * 2],
|
|
4070
|
+
];
|
|
4071
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_0__.drawPath)(svgDrawingHelper, annotation.annotationUID, polylineUID + '-crosshair_v', [crosshair[0], crosshair[1]], options);
|
|
4072
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_0__.drawPath)(svgDrawingHelper, annotation.annotationUID, polylineUID + '-crosshair_h', [crosshair[2], crosshair[3]], options);
|
|
4073
|
+
const allContours = [circlePoints, ...childContours];
|
|
4074
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_0__.drawPath)(svgDrawingHelper, annotation.annotationUID, polylineUID, allContours, options);
|
|
4075
|
+
}
|
|
4012
4076
|
function registerRenderMethods(toolInstance) {
|
|
4013
4077
|
toolInstance.renderContour = renderContour.bind(toolInstance);
|
|
4014
4078
|
toolInstance.renderClosedContour = renderClosedContour.bind(toolInstance);
|
|
4015
4079
|
toolInstance.renderOpenContour = renderOpenContour.bind(toolInstance);
|
|
4080
|
+
toolInstance.renderPointContourWithMarker =
|
|
4081
|
+
renderPointContourWithMarker.bind(toolInstance);
|
|
4016
4082
|
toolInstance.renderOpenUShapedContour =
|
|
4017
4083
|
renderOpenUShapedContour.bind(toolInstance);
|
|
4018
4084
|
toolInstance.renderContourBeingDrawn =
|
|
@@ -4738,8 +4804,8 @@ var stateManagement_segmentation = __webpack_require__(63421);
|
|
|
4738
4804
|
var enums = __webpack_require__(84901);
|
|
4739
4805
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/annotationState.js
|
|
4740
4806
|
var annotationState = __webpack_require__(38296);
|
|
4741
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/index.js +
|
|
4742
|
-
var drawingSvg = __webpack_require__(
|
|
4807
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/index.js + 18 modules
|
|
4808
|
+
var drawingSvg = __webpack_require__(49574);
|
|
4743
4809
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/base/AnnotationTool.js
|
|
4744
4810
|
var AnnotationTool = __webpack_require__(52454);
|
|
4745
4811
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/index.js
|
|
@@ -5303,7 +5369,7 @@ function addContourSetsToElement(viewport, geometryIds, contourRepresentation, c
|
|
|
5303
5369
|
highlighted: false,
|
|
5304
5370
|
autoGenerated: false,
|
|
5305
5371
|
invalidated: false,
|
|
5306
|
-
isLocked:
|
|
5372
|
+
isLocked: true,
|
|
5307
5373
|
isVisible: true,
|
|
5308
5374
|
metadata: {
|
|
5309
5375
|
referencedImageId: viewport.getCurrentImageId(),
|
|
@@ -7331,9 +7397,11 @@ function _addInterpolatedContour(interpolated3DPoints, handlePoints, sliceIndex,
|
|
|
7331
7397
|
const points = interpolated3DPoints.points;
|
|
7332
7398
|
const { viewport } = eventData;
|
|
7333
7399
|
const interpolatedAnnotation = createPolylineToolData(points, handlePoints, referencedToolData);
|
|
7334
|
-
const
|
|
7335
|
-
|
|
7336
|
-
|
|
7400
|
+
const viewRef = viewport.getViewReference({ sliceIndex });
|
|
7401
|
+
if (!viewRef) {
|
|
7402
|
+
throw new Error(`Can't find slice ${sliceIndex}`);
|
|
7403
|
+
}
|
|
7404
|
+
Object.assign(interpolatedAnnotation.metadata, viewRef);
|
|
7337
7405
|
stateManagement_annotation.state.addAnnotation(interpolatedAnnotation, viewport.element);
|
|
7338
7406
|
referencedToolData.onInterpolationComplete?.(interpolatedAnnotation, referencedToolData);
|
|
7339
7407
|
const { parentAnnotationUID } = referencedToolData;
|
|
@@ -2757,8 +2757,8 @@ function ViewerHeader({
|
|
|
2757
2757
|
hotkeyDefinitions,
|
|
2758
2758
|
hotkeyDefaults
|
|
2759
2759
|
} = hotkeysManager;
|
|
2760
|
-
const versionNumber = "3.9.0-beta.
|
|
2761
|
-
const commitHash = "
|
|
2760
|
+
const versionNumber = "3.9.0-beta.12";
|
|
2761
|
+
const commitHash = "29944c8512c35718af03c03ef82bc43675ee1872";
|
|
2762
2762
|
const menuOptions = [{
|
|
2763
2763
|
title: t('Header:About'),
|
|
2764
2764
|
icon: 'info',
|
|
@@ -731,7 +731,7 @@ function getToolGroupsWithToolName(toolName) {
|
|
|
731
731
|
/* harmony import */ var _planarFreehandROITool_openContourEndEditLoop__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(72702);
|
|
732
732
|
/* harmony import */ var _planarFreehandROITool_renderMethods__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(11585);
|
|
733
733
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(54177);
|
|
734
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(
|
|
734
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(49574);
|
|
735
735
|
/* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(10910);
|
|
736
736
|
/* harmony import */ var _utilities_math_polyline__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(56634);
|
|
737
737
|
/* harmony import */ var _utilities_pointInShapeCallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(75403);
|
|
@@ -800,6 +800,7 @@ class PlanarFreehandROITool extends _base_ContourSegmentationBaseTool__WEBPACK_I
|
|
|
800
800
|
enabled: false,
|
|
801
801
|
epsilon: 0.1,
|
|
802
802
|
},
|
|
803
|
+
displayOnePointAsCrosshairs: false,
|
|
803
804
|
calculateStats: true,
|
|
804
805
|
getTextLines: defaultGetTextLines,
|
|
805
806
|
statsCalculator: _utilities_math_basic__WEBPACK_IMPORTED_MODULE_22__.BasicStatsCalculator,
|
|
@@ -1136,7 +1137,13 @@ class PlanarFreehandROITool extends _base_ContourSegmentationBaseTool__WEBPACK_I
|
|
|
1136
1137
|
const isEditingOpen = this.isEditingOpen;
|
|
1137
1138
|
const isEditingClosed = this.isEditingClosed;
|
|
1138
1139
|
if (!(isDrawing || isEditingOpen || isEditingClosed)) {
|
|
1139
|
-
this.
|
|
1140
|
+
if (this.configuration.displayOnePointAsCrosshairs &&
|
|
1141
|
+
annotation.data.contour.polyline.length === 1) {
|
|
1142
|
+
this.renderPointContourWithMarker(enabledElement, svgDrawingHelper, annotation);
|
|
1143
|
+
}
|
|
1144
|
+
else {
|
|
1145
|
+
this.renderContour(enabledElement, svgDrawingHelper, annotation);
|
|
1146
|
+
}
|
|
1140
1147
|
}
|
|
1141
1148
|
else {
|
|
1142
1149
|
const activeAnnotationUID = this.commonData.annotation.annotationUID;
|
|
@@ -1155,7 +1162,13 @@ class PlanarFreehandROITool extends _base_ContourSegmentationBaseTool__WEBPACK_I
|
|
|
1155
1162
|
}
|
|
1156
1163
|
}
|
|
1157
1164
|
else {
|
|
1158
|
-
this.
|
|
1165
|
+
if (this.configuration.displayOnePointAsCrosshairs &&
|
|
1166
|
+
annotation.data.contour.polyline.length === 1) {
|
|
1167
|
+
this.renderPointContourWithMarker(enabledElement, svgDrawingHelper, annotation);
|
|
1168
|
+
}
|
|
1169
|
+
else {
|
|
1170
|
+
this.renderContour(enabledElement, svgDrawingHelper, annotation);
|
|
1171
|
+
}
|
|
1159
1172
|
}
|
|
1160
1173
|
renderStatus = true;
|
|
1161
1174
|
}
|