@ohif/app 3.14.0-beta.106 → 3.14.0-beta.107
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/{8923.bundle.8b682e96.js → 1183.bundle.bb27988c.js} +36 -329
- package/dist/{1645.bundle.1a466b16.js → 1645.bundle.ca31eb2f.js} +350 -41
- package/dist/{8729.bundle.e17fe9b2.js → 1654.bundle.d6a57234.js} +277 -15
- package/dist/{204.bundle.bc44c201.js → 204.bundle.9bb87642.js} +1 -1
- package/dist/{641.bundle.8e45751e.js → 2492.bundle.29d1731e.js} +336 -2
- package/dist/{3366.bundle.d9e78e25.js → 3366.bundle.54300d70.js} +3 -3
- package/dist/{4487.bundle.fa0375a4.js → 4487.bundle.d04fb8a6.js} +11 -16
- package/dist/{4606.bundle.6c297e2a.js → 4606.bundle.6191768a.js} +2 -2
- package/dist/{8312.bundle.d67b6f4e.js → 4718.bundle.e4f1e836.js} +83 -30
- package/dist/{4998.bundle.25b8cbfe.js → 4998.bundle.93ec76dd.js} +2 -2
- package/dist/{5143.bundle.53156bb0.js → 5143.bundle.cb1a942d.js} +32 -15
- package/dist/{5154.bundle.ccd02dd7.js → 5154.bundle.7806c0de.js} +2 -2
- package/dist/{5320.bundle.c17eb4a7.js → 5320.bundle.5686617c.js} +53 -342
- package/dist/{287.bundle.ee60c370.js → 5636.bundle.d736d89a.js} +92 -50
- package/dist/{6253.bundle.a1726f1f.js → 6253.bundle.da4ecc40.js} +676 -9
- package/dist/{6314.bundle.5aadfe48.js → 6314.bundle.907b94ea.js} +132 -50
- package/dist/{6507.bundle.bbcdd01e.js → 6507.bundle.1f9bcad5.js} +2 -2
- package/dist/{6956.bundle.dc0e8660.js → 6956.bundle.3e1bfe44.js} +188 -102
- package/dist/{7526.bundle.3460c3ca.js → 7526.bundle.22fdc0bb.js} +2 -2
- package/dist/{8868.bundle.8f3653b3.js → 8868.bundle.b2dc2ccb.js} +4 -4
- package/dist/{5076.bundle.2a14756f.js → 915.bundle.48917224.js} +1 -22
- package/dist/{9187.bundle.407afa07.js → 9187.bundle.bd5c0f55.js} +2 -2
- package/dist/{9481.bundle.d045ae3a.js → 9481.bundle.df453a4a.js} +2 -2
- package/dist/{9620.bundle.b4cc392c.js → 9620.bundle.a7dbe946.js} +4 -4
- package/dist/{9889.bundle.bf312047.js → 9889.bundle.6dee52c5.js} +138 -61
- package/dist/{app.bundle.5d7c3f70.js → app.bundle.9f4c5572.js} +48 -44
- package/dist/app.bundle.css +21 -9
- package/dist/{compute.bundle.9267d449.js → compute.bundle.34155635.js} +10 -10
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.ee9998a4.js → interpolation.bundle.244cf3e9.js} +6 -6
- package/dist/{polySeg.bundle.a55f8eee.js → polySeg.bundle.58b3a681.js} +10 -10
- package/dist/sw.js +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(globalThis["rspackChunk_ohif_app"] ||= []).push([[
|
|
2
|
+
(globalThis["rspackChunk_ohif_app"] ||= []).push([[1654], {
|
|
3
3
|
23172(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
4
4
|
/**
|
|
5
5
|
* Common utilities
|
|
@@ -210,6 +210,31 @@ function isVolumeCompatible(viewport) {
|
|
|
210
210
|
/* export default */ __webpack_exports__.A = (isVolumeCompatible);
|
|
211
211
|
|
|
212
212
|
|
|
213
|
+
},
|
|
214
|
+
61048(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
215
|
+
/* import */ var _cache_js__rspack_import_0 = __webpack_require__(73998);
|
|
216
|
+
/* import */ var _classes_ImageVolume_js__rspack_import_1 = __webpack_require__(19564);
|
|
217
|
+
/* import */ var _classes_Surface_js__rspack_import_2 = __webpack_require__(34136);
|
|
218
|
+
/* import */ var _classes_Mesh_js__rspack_import_3 = __webpack_require__(99931);
|
|
219
|
+
/* import */ var _classes_StreamingImageVolume_js__rspack_import_4 = __webpack_require__(40676);
|
|
220
|
+
/* import */ var _classes_StreamingDynamicImageVolume_js__rspack_import_5 = __webpack_require__(32855);
|
|
221
|
+
/* import */ var _volumeTextureStore_js__rspack_import_6 = __webpack_require__(82340);
|
|
222
|
+
/* import */ var _classes_VolumeTextureSet_js__rspack_import_7 = __webpack_require__(97896);
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
234
|
+
QV: () => (/* reexport safe */ _classes_ImageVolume_js__rspack_import_1.Ay)
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
|
|
213
238
|
},
|
|
214
239
|
85387(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
215
240
|
/* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(16080);
|
|
@@ -3989,14 +4014,36 @@ async function internalComputeVolumeLabelmapFromStack({ imageIds, options, }) {
|
|
|
3989
4014
|
return { volumeId };
|
|
3990
4015
|
}
|
|
3991
4016
|
async function internalConvertStackToVolumeLabelmap({ segmentationId, options, }) {
|
|
3992
|
-
const
|
|
3993
|
-
const
|
|
4017
|
+
const sourceSegmentation = defaultSegmentationStateManager.getSegmentation(segmentationId);
|
|
4018
|
+
const sourceLabelmapState = ensureLabelmapState(sourceSegmentation);
|
|
4019
|
+
const sourcePrimaryLayer = sourceLabelmapState?.labelmaps[sourceLabelmapState.primaryLabelmapId];
|
|
4020
|
+
if (sourcePrimaryLayer &&
|
|
4021
|
+
hasMultipleLabelmapImagesPerReferencedImageId(sourcePrimaryLayer)) {
|
|
4022
|
+
return;
|
|
4023
|
+
}
|
|
4024
|
+
const data = sourceSegmentation.representationData
|
|
3994
4025
|
.Labelmap;
|
|
4026
|
+
const dynamicVolume = getOrCreateDynamicLabelmapVolume(sourceSegmentation);
|
|
4027
|
+
if (dynamicVolume) {
|
|
4028
|
+
data.volumeId =
|
|
4029
|
+
dynamicVolume.volumeId;
|
|
4030
|
+
return;
|
|
4031
|
+
}
|
|
3995
4032
|
const { volumeId } = await internalComputeVolumeLabelmapFromStack({
|
|
3996
4033
|
imageIds: data.imageIds,
|
|
3997
4034
|
options,
|
|
3998
4035
|
});
|
|
3999
|
-
segmentation
|
|
4036
|
+
const segmentation = defaultSegmentationStateManager.getSegmentation(segmentationId);
|
|
4037
|
+
if (!segmentation) {
|
|
4038
|
+
return;
|
|
4039
|
+
}
|
|
4040
|
+
const labelmapState = ensureLabelmapState(segmentation);
|
|
4041
|
+
const primaryLayer = labelmapState?.labelmaps[labelmapState.primaryLabelmapId];
|
|
4042
|
+
if (primaryLayer) {
|
|
4043
|
+
primaryLayer.volumeId = volumeId;
|
|
4044
|
+
primaryLayer.storageKind = 'volume';
|
|
4045
|
+
}
|
|
4046
|
+
syncLegacyLabelmapData(segmentation);
|
|
4000
4047
|
}
|
|
4001
4048
|
function getDefaultRenderingConfig(type) {
|
|
4002
4049
|
const cfun = _kitware_vtk_js_Rendering_Core_ColorTransferFunction_js__rspack_import_2/* ["default"].newInstance */.Ay.newInstance();
|
|
@@ -4160,15 +4207,18 @@ function addSegmentations(segmentationInputArray, suppressEvents) {
|
|
|
4160
4207
|
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
4161
4208
|
/* import */ var _enums_index_js__rspack_import_1 = __webpack_require__(36776);
|
|
4162
4209
|
/* import */ var _utilities_segmentation_utilities_js__rspack_import_2 = __webpack_require__(57055);
|
|
4210
|
+
/* import */ var _labelmapModel_dynamicLabelmapVolume_js__rspack_import_3 = __webpack_require__(74136);
|
|
4211
|
+
|
|
4163
4212
|
|
|
4164
4213
|
|
|
4165
4214
|
|
|
4166
|
-
function triggerSegmentationDataModified(segmentationId, modifiedSlicesToUse, segmentIndex, { voxelsUnchanged } = {}) {
|
|
4215
|
+
function triggerSegmentationDataModified(segmentationId, modifiedSlicesToUse, segmentIndex, { voxelsUnchanged, dimensionGroupNumber = (0,_labelmapModel_dynamicLabelmapVolume_js__rspack_import_3/* .getDynamicLabelmapTimePointForSegmentation */.oE)(segmentationId), } = {}) {
|
|
4167
4216
|
const eventDetail = {
|
|
4168
4217
|
segmentationId,
|
|
4169
4218
|
modifiedSlicesToUse,
|
|
4170
4219
|
segmentIndex,
|
|
4171
4220
|
...(voxelsUnchanged ? { voxelsUnchanged } : {}),
|
|
4221
|
+
...(dimensionGroupNumber ? { dimensionGroupNumber } : {}),
|
|
4172
4222
|
};
|
|
4173
4223
|
(0,_utilities_segmentation_utilities_js__rspack_import_2/* .setSegmentationDirty */.HM)(segmentationId);
|
|
4174
4224
|
(0,_cornerstonejs_core__rspack_import_0.triggerEvent)(_cornerstonejs_core__rspack_import_0.eventTarget, _enums_index_js__rspack_import_1.Events.SEGMENTATION_DATA_MODIFIED, eventDetail);
|
|
@@ -4300,13 +4350,20 @@ async function updateStackSegmentationState_updateStackSegmentationState({ segme
|
|
|
4300
4350
|
eventTarget.addEventListenerOnce(Events.SEGMENTATION_RENDERED, () => triggerSegmentationDataModified(segmentationId));
|
|
4301
4351
|
}
|
|
4302
4352
|
|
|
4353
|
+
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/labelmapModel/dynamicLabelmapVolume.js
|
|
4354
|
+
var dynamicLabelmapVolume = __webpack_require__(74136);
|
|
4303
4355
|
;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/helpers/computeStackLabelmapFromVolume.js
|
|
4304
4356
|
|
|
4305
4357
|
|
|
4306
4358
|
|
|
4359
|
+
|
|
4360
|
+
function getStackImageIds(segmentationVolume) {
|
|
4361
|
+
return (getDynamicLabelmapImageIds(segmentationVolume) ??
|
|
4362
|
+
segmentationVolume.imageIds);
|
|
4363
|
+
}
|
|
4307
4364
|
async function computeStackLabelmapFromVolume({ volumeId, }) {
|
|
4308
4365
|
const segmentationVolume = cache.getVolume(volumeId);
|
|
4309
|
-
return { imageIds: segmentationVolume
|
|
4366
|
+
return { imageIds: getStackImageIds(segmentationVolume) };
|
|
4310
4367
|
}
|
|
4311
4368
|
function convertVolumeToStackLabelmap({ segmentationId, options, }) {
|
|
4312
4369
|
const segmentation = getSegmentation(segmentationId);
|
|
@@ -4319,7 +4376,7 @@ function convertVolumeToStackLabelmap({ segmentationId, options, }) {
|
|
|
4319
4376
|
return updateStackSegmentationState({
|
|
4320
4377
|
segmentationId,
|
|
4321
4378
|
viewportId: options.viewportId,
|
|
4322
|
-
imageIds: segmentationVolume
|
|
4379
|
+
imageIds: getStackImageIds(segmentationVolume),
|
|
4323
4380
|
options,
|
|
4324
4381
|
});
|
|
4325
4382
|
}
|
|
@@ -4334,6 +4391,150 @@ async function computeVolumeLabelmapFromStack(args) {
|
|
|
4334
4391
|
}
|
|
4335
4392
|
|
|
4336
4393
|
|
|
4394
|
+
},
|
|
4395
|
+
74136(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4396
|
+
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
4397
|
+
/* import */ var _labelmapImageIdMapping_js__rspack_import_1 = __webpack_require__(27749);
|
|
4398
|
+
|
|
4399
|
+
|
|
4400
|
+
const { VoxelManager, deepClone, generateVolumePropsFromImageIds, sortImageIdsAndGetSpacing, splitImageIdsBy4DTags, } = _cornerstonejs_core__rspack_import_0.utilities;
|
|
4401
|
+
const dynamicLabelmaps = new WeakMap();
|
|
4402
|
+
const timePointByVoxelManager = new WeakMap();
|
|
4403
|
+
const volumeIdBySegmentationId = new Map();
|
|
4404
|
+
function createDynamicLabelmapVolume(volumeId, layer) {
|
|
4405
|
+
const imageIdByReferencedImageId = new Map();
|
|
4406
|
+
(0,_labelmapImageIdMapping_js__rspack_import_1/* .forEachLabelmapImageReference */.Zd)(layer, (referencedImageId, imageId) => {
|
|
4407
|
+
imageIdByReferencedImageId.set(referencedImageId, imageId);
|
|
4408
|
+
});
|
|
4409
|
+
const { imageIdGroups: unsortedReferencedGroups } = splitImageIdsBy4DTags([
|
|
4410
|
+
...imageIdByReferencedImageId.keys(),
|
|
4411
|
+
]);
|
|
4412
|
+
if (unsortedReferencedGroups.length < 2) {
|
|
4413
|
+
return;
|
|
4414
|
+
}
|
|
4415
|
+
const groupSize = unsortedReferencedGroups[0].length;
|
|
4416
|
+
if (unsortedReferencedGroups.some((group) => group.length !== groupSize ||
|
|
4417
|
+
group.some((id) => !imageIdByReferencedImageId.has(id)))) {
|
|
4418
|
+
_cornerstonejs_core__rspack_import_0.utilities.logger.toolsLog.getLogger('dynamicLabelmapVolume')
|
|
4419
|
+
.warn(`Labelmap ${layer.labelmapId}: the 4D split does not match the labelmap images; using a static volume`);
|
|
4420
|
+
return;
|
|
4421
|
+
}
|
|
4422
|
+
const referencedImageIdByImageId = new Map();
|
|
4423
|
+
imageIdByReferencedImageId.forEach((imageId, referencedImageId) => referencedImageIdByImageId.set(imageId, referencedImageId));
|
|
4424
|
+
const firstGroup = unsortedReferencedGroups[0].map((referencedImageId) => imageIdByReferencedImageId.get(referencedImageId));
|
|
4425
|
+
const volumeProps = generateVolumePropsFromImageIds(firstGroup, volumeId);
|
|
4426
|
+
const scanAxisNormal = volumeProps.direction.slice(6, 9);
|
|
4427
|
+
const imageIdGroups = unsortedReferencedGroups.map((referencedImageIds) => sortImageIdsAndGetSpacing(referencedImageIds.map((referencedImageId) => imageIdByReferencedImageId.get(referencedImageId)), scanAxisNormal).sortedImageIds);
|
|
4428
|
+
const referencedImageIdGroups = imageIdGroups.map((imageIds) => imageIds.map((imageId) => referencedImageIdByImageId.get(imageId)));
|
|
4429
|
+
const groupIndexByReferencedImageId = new Map();
|
|
4430
|
+
referencedImageIdGroups.forEach((referencedImageIds, groupIndex) => referencedImageIds.forEach((referencedImageId) => groupIndexByReferencedImageId.set(referencedImageId, groupIndex)));
|
|
4431
|
+
const voxelManager = VoxelManager.createScalarDynamicVolumeVoxelManager({
|
|
4432
|
+
imageIdGroups,
|
|
4433
|
+
dimensions: volumeProps.dimensions,
|
|
4434
|
+
numberOfComponents: 1,
|
|
4435
|
+
id: volumeId,
|
|
4436
|
+
});
|
|
4437
|
+
const volume = new _cornerstonejs_core__rspack_import_0.ImageVolume({
|
|
4438
|
+
volumeId,
|
|
4439
|
+
dataType: volumeProps.dataType,
|
|
4440
|
+
metadata: deepClone(volumeProps.metadata),
|
|
4441
|
+
dimensions: volumeProps.dimensions,
|
|
4442
|
+
spacing: volumeProps.spacing,
|
|
4443
|
+
origin: volumeProps.origin,
|
|
4444
|
+
direction: volumeProps.direction,
|
|
4445
|
+
imageIds: imageIdGroups[0],
|
|
4446
|
+
referencedImageIds: referencedImageIdGroups[0],
|
|
4447
|
+
voxelManager,
|
|
4448
|
+
});
|
|
4449
|
+
const dynamicLabelmap = {
|
|
4450
|
+
imageIdGroups,
|
|
4451
|
+
referencedImageIdGroups,
|
|
4452
|
+
groupIndexByReferencedImageId,
|
|
4453
|
+
groupIndex: 0,
|
|
4454
|
+
setGroupIndex: (groupIndex) => {
|
|
4455
|
+
voxelManager.setDimensionGroupNumber(groupIndex + 1);
|
|
4456
|
+
volume.imageIds = imageIdGroups[groupIndex];
|
|
4457
|
+
volume.referencedImageIds = referencedImageIdGroups[groupIndex];
|
|
4458
|
+
dynamicLabelmap.groupIndex = groupIndex;
|
|
4459
|
+
},
|
|
4460
|
+
groupVoxelManagers: [],
|
|
4461
|
+
};
|
|
4462
|
+
dynamicLabelmaps.set(volume, dynamicLabelmap);
|
|
4463
|
+
_cornerstonejs_core__rspack_import_0.cache.putVolumeSync(volumeId, volume);
|
|
4464
|
+
for (const imageVolume of _cornerstonejs_core__rspack_import_0.cache.getVolumes()) {
|
|
4465
|
+
if (syncDynamicLabelmapVolume(volume, imageVolume)) {
|
|
4466
|
+
break;
|
|
4467
|
+
}
|
|
4468
|
+
}
|
|
4469
|
+
return volume;
|
|
4470
|
+
}
|
|
4471
|
+
function syncDynamicLabelmapVolume(labelmapVolume, imageVolume) {
|
|
4472
|
+
const currentImageIds = imageVolume.getCurrentDimensionGroupImageIds?.();
|
|
4473
|
+
return Boolean(currentImageIds?.length &&
|
|
4474
|
+
syncDynamicLabelmapVolumeToImageId(labelmapVolume, currentImageIds[0]));
|
|
4475
|
+
}
|
|
4476
|
+
function syncDynamicLabelmapVolumeToImageId(labelmapVolume, referencedImageId) {
|
|
4477
|
+
const dynamicLabelmap = dynamicLabelmaps.get(labelmapVolume);
|
|
4478
|
+
const groupIndex = dynamicLabelmap?.groupIndexByReferencedImageId.get(referencedImageId);
|
|
4479
|
+
if (groupIndex === undefined || groupIndex === dynamicLabelmap.groupIndex) {
|
|
4480
|
+
return false;
|
|
4481
|
+
}
|
|
4482
|
+
dynamicLabelmap.setGroupIndex(groupIndex);
|
|
4483
|
+
return true;
|
|
4484
|
+
}
|
|
4485
|
+
function isDynamicLabelmapImageCovered(labelmapVolume, referencedImageId) {
|
|
4486
|
+
const dynamicLabelmap = labelmapVolume && dynamicLabelmaps.get(labelmapVolume);
|
|
4487
|
+
return (!dynamicLabelmap ||
|
|
4488
|
+
dynamicLabelmap.groupIndexByReferencedImageId.has(referencedImageId));
|
|
4489
|
+
}
|
|
4490
|
+
function getDynamicLabelmapTimePoint(volume) {
|
|
4491
|
+
const dynamicLabelmap = volume && dynamicLabelmaps.get(volume);
|
|
4492
|
+
if (!dynamicLabelmap) {
|
|
4493
|
+
return;
|
|
4494
|
+
}
|
|
4495
|
+
const { groupIndex, groupVoxelManagers, imageIdGroups } = dynamicLabelmap;
|
|
4496
|
+
const dimensionGroupNumber = groupIndex + 1;
|
|
4497
|
+
groupVoxelManagers[groupIndex] ??= VoxelManager.createImageVolumeVoxelManager({
|
|
4498
|
+
dimensions: volume.dimensions,
|
|
4499
|
+
imageIds: imageIdGroups[groupIndex],
|
|
4500
|
+
numberOfComponents: 1,
|
|
4501
|
+
id: `${volume.volumeId}-${dimensionGroupNumber}`,
|
|
4502
|
+
});
|
|
4503
|
+
timePointByVoxelManager.set(groupVoxelManagers[groupIndex], dimensionGroupNumber);
|
|
4504
|
+
return { dimensionGroupNumber, voxelManager: groupVoxelManagers[groupIndex] };
|
|
4505
|
+
}
|
|
4506
|
+
function getVoxelManagerTimePoint(voxelManager) {
|
|
4507
|
+
return timePointByVoxelManager.get(voxelManager);
|
|
4508
|
+
}
|
|
4509
|
+
function setDynamicLabelmapVolumeId(segmentationId, volumeId) {
|
|
4510
|
+
volumeIdBySegmentationId.set(segmentationId, volumeId);
|
|
4511
|
+
}
|
|
4512
|
+
function getDynamicLabelmapTimePointForSegmentation(segmentationId) {
|
|
4513
|
+
const volumeId = volumeIdBySegmentationId.get(segmentationId);
|
|
4514
|
+
const volume = volumeId && _cornerstonejs_core__rspack_import_0.cache.getVolume(volumeId);
|
|
4515
|
+
const dynamicLabelmap = volume && dynamicLabelmaps.get(volume);
|
|
4516
|
+
return dynamicLabelmap && dynamicLabelmap.groupIndex + 1;
|
|
4517
|
+
}
|
|
4518
|
+
function getDynamicLabelmapImageIds(volume) {
|
|
4519
|
+
return volume && dynamicLabelmaps.get(volume)?.imageIdGroups.flat();
|
|
4520
|
+
}
|
|
4521
|
+
function isDynamicLabelmapVolume(volume) {
|
|
4522
|
+
return Boolean(volume && dynamicLabelmaps.has(volume));
|
|
4523
|
+
}
|
|
4524
|
+
|
|
4525
|
+
|
|
4526
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
4527
|
+
Bm: () => (getDynamicLabelmapTimePoint),
|
|
4528
|
+
Ix: () => (createDynamicLabelmapVolume),
|
|
4529
|
+
Tj: () => (getVoxelManagerTimePoint),
|
|
4530
|
+
UP: () => (isDynamicLabelmapVolume),
|
|
4531
|
+
Yf: () => (syncDynamicLabelmapVolumeToImageId),
|
|
4532
|
+
oE: () => (getDynamicLabelmapTimePointForSegmentation),
|
|
4533
|
+
tl: () => (isDynamicLabelmapImageCovered),
|
|
4534
|
+
v0: () => (setDynamicLabelmapVolumeId)
|
|
4535
|
+
});
|
|
4536
|
+
|
|
4537
|
+
|
|
4337
4538
|
},
|
|
4338
4539
|
53344(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4339
4540
|
/* import */ var _normalizeLabelmapSegmentationData_js__rspack_import_0 = __webpack_require__(18782);
|
|
@@ -6759,15 +6960,38 @@ RectangleROIThresholdTool.toolName = 'RectangleROIThreshold';
|
|
|
6759
6960
|
/* import */ var _enums_StrategyCallbacks_js__rspack_import_1 = __webpack_require__(48413);
|
|
6760
6961
|
/* import */ var _stateManagement_segmentation_getSegmentation_js__rspack_import_2 = __webpack_require__(50115);
|
|
6761
6962
|
/* import */ var _utilities_segmentation_getOrCreateImageVolume_js__rspack_import_3 = __webpack_require__(14915);
|
|
6963
|
+
/* import */ var _stateManagement_segmentation_labelmapModel_index_js__rspack_import_4 = __webpack_require__(82159);
|
|
6964
|
+
/* import */ var _stateManagement_segmentation_labelmapModel_dynamicLabelmapVolume_js__rspack_import_5 = __webpack_require__(74136);
|
|
6762
6965
|
|
|
6763
6966
|
|
|
6764
6967
|
|
|
6765
6968
|
|
|
6969
|
+
|
|
6970
|
+
|
|
6971
|
+
function getDynamicImageVolume(referencedImageIds, isDynamicLabelmap) {
|
|
6972
|
+
const volume = _cornerstonejs_core__rspack_import_0.cache.getVolumeContainingImageId(referencedImageIds[0])
|
|
6973
|
+
?.volume;
|
|
6974
|
+
if (!volume?.isDynamicVolume?.()) {
|
|
6975
|
+
return;
|
|
6976
|
+
}
|
|
6977
|
+
if (!isDynamicLabelmap ||
|
|
6978
|
+
volume.getCurrentDimensionGroupImageIds().includes(referencedImageIds[0])) {
|
|
6979
|
+
return volume;
|
|
6980
|
+
}
|
|
6981
|
+
}
|
|
6766
6982
|
/* export default */ __webpack_exports__.A = ({
|
|
6767
6983
|
[_enums_StrategyCallbacks_js__rspack_import_1/* ["default"].EnsureImageVolumeFor3DManipulation */.A.EnsureImageVolumeFor3DManipulation]: (data) => {
|
|
6768
6984
|
const { operationData, viewport } = data;
|
|
6985
|
+
const segmentation = (0,_stateManagement_segmentation_getSegmentation_js__rspack_import_2/* .getSegmentation */.T)(operationData.segmentationId);
|
|
6986
|
+
const dynamicLabelmapVolume = (0,_stateManagement_segmentation_labelmapModel_index_js__rspack_import_4/* .getOrCreateDynamicLabelmapVolume */.bx)(segmentation);
|
|
6769
6987
|
let referencedImageIds;
|
|
6770
|
-
if (
|
|
6988
|
+
if (dynamicLabelmapVolume) {
|
|
6989
|
+
if (viewport) {
|
|
6990
|
+
(0,_stateManagement_segmentation_labelmapModel_dynamicLabelmapVolume_js__rspack_import_5/* .syncDynamicLabelmapVolumeToImageId */.Yf)(dynamicLabelmapVolume, viewport.getCurrentImageId());
|
|
6991
|
+
}
|
|
6992
|
+
referencedImageIds = dynamicLabelmapVolume.referencedImageIds;
|
|
6993
|
+
}
|
|
6994
|
+
else if (viewport) {
|
|
6771
6995
|
referencedImageIds = viewport.getImageIds();
|
|
6772
6996
|
const isValidVolumeForSphere = _cornerstonejs_core__rspack_import_0.utilities.isValidVolume(referencedImageIds);
|
|
6773
6997
|
if (!isValidVolumeForSphere) {
|
|
@@ -6775,7 +6999,6 @@ RectangleROIThresholdTool.toolName = 'RectangleROIThreshold';
|
|
|
6775
6999
|
}
|
|
6776
7000
|
}
|
|
6777
7001
|
else {
|
|
6778
|
-
const segmentation = (0,_stateManagement_segmentation_getSegmentation_js__rspack_import_2/* .getSegmentation */.T)(operationData.segmentationId);
|
|
6779
7002
|
const imageIds = segmentation.representationData
|
|
6780
7003
|
.Labelmap.imageIds;
|
|
6781
7004
|
referencedImageIds = imageIds.map((imageId) => {
|
|
@@ -6783,7 +7006,9 @@ RectangleROIThresholdTool.toolName = 'RectangleROIThreshold';
|
|
|
6783
7006
|
return image.referencedImageId;
|
|
6784
7007
|
});
|
|
6785
7008
|
}
|
|
6786
|
-
const imageVolume = (
|
|
7009
|
+
const imageVolume = (viewport && !dynamicLabelmapVolume
|
|
7010
|
+
? undefined
|
|
7011
|
+
: getDynamicImageVolume(referencedImageIds, Boolean(dynamicLabelmapVolume))) ?? (0,_utilities_segmentation_getOrCreateImageVolume_js__rspack_import_3/* ["default"] */.A)(referencedImageIds);
|
|
6787
7012
|
if (!imageVolume) {
|
|
6788
7013
|
throw new Error('Failed to create or get image volume');
|
|
6789
7014
|
}
|
|
@@ -6798,6 +7023,8 @@ RectangleROIThresholdTool.toolName = 'RectangleROIThreshold';
|
|
|
6798
7023
|
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
6799
7024
|
/* import */ var _enums_StrategyCallbacks_js__rspack_import_1 = __webpack_require__(48413);
|
|
6800
7025
|
/* import */ var _utilities_segmentation_getOrCreateSegmentationVolume_js__rspack_import_2 = __webpack_require__(95906);
|
|
7026
|
+
/* import */ var _stateManagement_segmentation_labelmapModel_dynamicLabelmapVolume_js__rspack_import_3 = __webpack_require__(74136);
|
|
7027
|
+
|
|
6801
7028
|
|
|
6802
7029
|
|
|
6803
7030
|
|
|
@@ -6805,6 +7032,21 @@ RectangleROIThresholdTool.toolName = 'RectangleROIThreshold';
|
|
|
6805
7032
|
[_enums_StrategyCallbacks_js__rspack_import_1/* ["default"].EnsureSegmentationVolumeFor3DManipulation */.A.EnsureSegmentationVolumeFor3DManipulation]: (data) => {
|
|
6806
7033
|
const { operationData, viewport } = data;
|
|
6807
7034
|
const { segmentationId, imageIds: segImageIds } = operationData;
|
|
7035
|
+
const segVolume = (0,_utilities_segmentation_getOrCreateSegmentationVolume_js__rspack_import_2/* ["default"] */.A)(segmentationId);
|
|
7036
|
+
if ((0,_stateManagement_segmentation_labelmapModel_dynamicLabelmapVolume_js__rspack_import_3/* .isDynamicLabelmapVolume */.UP)(segVolume)) {
|
|
7037
|
+
if (viewport) {
|
|
7038
|
+
const imageId = viewport.getCurrentImageId();
|
|
7039
|
+
if (!(0,_stateManagement_segmentation_labelmapModel_dynamicLabelmapVolume_js__rspack_import_3/* .isDynamicLabelmapImageCovered */.tl)(segVolume, imageId)) {
|
|
7040
|
+
operationData.segmentationVoxelManager = undefined;
|
|
7041
|
+
return;
|
|
7042
|
+
}
|
|
7043
|
+
(0,_stateManagement_segmentation_labelmapModel_dynamicLabelmapVolume_js__rspack_import_3/* .syncDynamicLabelmapVolumeToImageId */.Yf)(segVolume, imageId);
|
|
7044
|
+
}
|
|
7045
|
+
operationData.segmentationVoxelManager =
|
|
7046
|
+
(0,_stateManagement_segmentation_labelmapModel_dynamicLabelmapVolume_js__rspack_import_3/* .getDynamicLabelmapTimePoint */.Bm)(segVolume).voxelManager;
|
|
7047
|
+
operationData.segmentationImageData = segVolume.imageData;
|
|
7048
|
+
return;
|
|
7049
|
+
}
|
|
6808
7050
|
const referencedImageIds = viewport
|
|
6809
7051
|
? viewport.getImageIds()
|
|
6810
7052
|
: segImageIds.map((imageId) => _cornerstonejs_core__rspack_import_0.cache.getImage(imageId).referencedImageId);
|
|
@@ -6812,7 +7054,6 @@ RectangleROIThresholdTool.toolName = 'RectangleROIThreshold';
|
|
|
6812
7054
|
if (!isValidVolumeForSphere) {
|
|
6813
7055
|
throw new Error('Volume is not reconstructable for sphere manipulation');
|
|
6814
7056
|
}
|
|
6815
|
-
const segVolume = (0,_utilities_segmentation_getOrCreateSegmentationVolume_js__rspack_import_2/* ["default"] */.A)(segmentationId);
|
|
6816
7057
|
if (!segVolume) {
|
|
6817
7058
|
return;
|
|
6818
7059
|
}
|
|
@@ -6828,7 +7069,9 @@ RectangleROIThresholdTool.toolName = 'RectangleROIThreshold';
|
|
|
6828
7069
|
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
6829
7070
|
/* import */ var _stateManagement_segmentation_segmentationState_js__rspack_import_1 = __webpack_require__(61342);
|
|
6830
7071
|
/* import */ var _stateManagement_segmentation_helpers_index_js__rspack_import_2 = __webpack_require__(28142);
|
|
6831
|
-
/* import */ var
|
|
7072
|
+
/* import */ var _stateManagement_segmentation_labelmapModel_dynamicLabelmapVolume_js__rspack_import_3 = __webpack_require__(74136);
|
|
7073
|
+
/* import */ var _utilities_segmentation_getReferenceVolumeForSegmentationVolume_js__rspack_import_4 = __webpack_require__(40469);
|
|
7074
|
+
|
|
6832
7075
|
|
|
6833
7076
|
|
|
6834
7077
|
|
|
@@ -6847,12 +7090,18 @@ function getStrategyDataForVolumeViewport({ operationData, }) {
|
|
|
6847
7090
|
return null;
|
|
6848
7091
|
}
|
|
6849
7092
|
const segmentationVolume = _cornerstonejs_core__rspack_import_0.cache.getVolume(volumeId);
|
|
6850
|
-
const imageVolume = (0,
|
|
7093
|
+
const imageVolume = (0,_utilities_segmentation_getReferenceVolumeForSegmentationVolume_js__rspack_import_4/* .getReferenceVolumeForSegmentationVolume */.b)(volumeId);
|
|
6851
7094
|
if (!segmentationVolume || !imageVolume) {
|
|
6852
7095
|
return null;
|
|
6853
7096
|
}
|
|
7097
|
+
const currentImageIds = imageVolume.getCurrentDimensionGroupImageIds?.();
|
|
7098
|
+
if (currentImageIds?.length &&
|
|
7099
|
+
!(0,_stateManagement_segmentation_labelmapModel_dynamicLabelmapVolume_js__rspack_import_3/* .isDynamicLabelmapImageCovered */.tl)(segmentationVolume, currentImageIds[0])) {
|
|
7100
|
+
return null;
|
|
7101
|
+
}
|
|
6854
7102
|
const { imageData: segmentationImageData } = segmentationVolume;
|
|
6855
|
-
const
|
|
7103
|
+
const segmentationVoxelManager = (0,_stateManagement_segmentation_labelmapModel_dynamicLabelmapVolume_js__rspack_import_3/* .getDynamicLabelmapTimePoint */.Bm)(segmentationVolume)?.voxelManager ??
|
|
7104
|
+
segmentationVolume.voxelManager;
|
|
6856
7105
|
const { voxelManager: imageVoxelManager, imageData } = imageVolume;
|
|
6857
7106
|
return {
|
|
6858
7107
|
segmentationImageData,
|
|
@@ -6877,6 +7126,9 @@ function getStrategyDataForStackViewport({ operationData, viewport, strategy, })
|
|
|
6877
7126
|
viewport,
|
|
6878
7127
|
});
|
|
6879
7128
|
segmentationVoxelManager = operationData.segmentationVoxelManager;
|
|
7129
|
+
if (!segmentationVoxelManager) {
|
|
7130
|
+
return null;
|
|
7131
|
+
}
|
|
6880
7132
|
segmentationImageData = operationData.segmentationImageData;
|
|
6881
7133
|
getSegmentationScalarData = () => null;
|
|
6882
7134
|
}
|
|
@@ -10969,6 +11221,8 @@ function createBidirectionalToolData(bidirectionalData, viewport) {
|
|
|
10969
11221
|
89725(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
10970
11222
|
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
10971
11223
|
/* import */ var _stateManagement_segmentation_triggerSegmentationEvents_js__rspack_import_1 = __webpack_require__(11815);
|
|
11224
|
+
/* import */ var _stateManagement_segmentation_labelmapModel_dynamicLabelmapVolume_js__rspack_import_2 = __webpack_require__(74136);
|
|
11225
|
+
|
|
10972
11226
|
|
|
10973
11227
|
|
|
10974
11228
|
const { VoxelManager, RLEVoxelMap } = _cornerstonejs_core__rspack_import_0.utilities;
|
|
@@ -10995,7 +11249,15 @@ function restoreMemo(isUndo) {
|
|
|
10995
11249
|
segmentationVoxelManager.setAtIJKPoint(pointIJK, value);
|
|
10996
11250
|
});
|
|
10997
11251
|
const slices = useVoxelManager.getArrayOfModifiedSlices();
|
|
10998
|
-
(0,
|
|
11252
|
+
const dimensionGroupNumber = (0,_stateManagement_segmentation_labelmapModel_dynamicLabelmapVolume_js__rspack_import_2/* .getVoxelManagerTimePoint */.Tj)(segmentationVoxelManager);
|
|
11253
|
+
if (dimensionGroupNumber) {
|
|
11254
|
+
(0,_stateManagement_segmentation_triggerSegmentationEvents_js__rspack_import_1.triggerSegmentationDataModified)(this.segmentationId, slices, undefined, {
|
|
11255
|
+
dimensionGroupNumber,
|
|
11256
|
+
});
|
|
11257
|
+
}
|
|
11258
|
+
else {
|
|
11259
|
+
(0,_stateManagement_segmentation_triggerSegmentationEvents_js__rspack_import_1.triggerSegmentationDataModified)(this.segmentationId, slices);
|
|
11260
|
+
}
|
|
10999
11261
|
};
|
|
11000
11262
|
if (undo) {
|
|
11001
11263
|
for (let i = postSteps.length - 1; i >= 0; i--) {
|
|
@@ -10,7 +10,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10
10
|
/* import */ var react_jsx_runtime__rspack_import_2 = __webpack_require__(31085);
|
|
11
11
|
/* import */ var _ohif_core__rspack_import_3 = __webpack_require__(34142);
|
|
12
12
|
/* import */ var _ohif_ui_next__rspack_import_4 = __webpack_require__(2727);
|
|
13
|
-
/* import */ var _ohif_i18n__rspack_import_5 = __webpack_require__(
|
|
13
|
+
/* import */ var _ohif_i18n__rspack_import_5 = __webpack_require__(54887);
|
|
14
14
|
/* import */ var _ohif_extension_default__rspack_import_6 = __webpack_require__(55422);
|
|
15
15
|
/* import */ var _ohif_extension_cornerstone__rspack_import_7 = __webpack_require__(87407);
|
|
16
16
|
/* import */ var _cornerstonejs_core__rspack_import_8 = __webpack_require__(62721);
|