@ohif/app 3.12.0-beta.86 → 3.12.0-beta.88
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/{1037.bundle.c5b7e110bee6ca994e4a.js → 1037.bundle.87a5adb8c92bd5bf53f5.js} +165 -51
- package/dist/{1214.bundle.01574d45655d4aed6d97.js → 1214.bundle.0015f63bce964b6ef47e.js} +170 -20
- package/dist/{1927.bundle.da6db325e08bacb0bca0.js → 1927.bundle.019331c266d306772371.js} +1 -1
- package/dist/{2518.bundle.4fd28150fb5a21d423e6.js → 2518.bundle.644302643ac0790e7374.js} +9 -1
- package/dist/{306.bundle.c671a09e1eacf6bcfc84.js → 306.bundle.f9faa2b3cdd7e86b5869.js} +114 -5
- package/dist/{4113.bundle.e5f1621632eca8b1aa53.js → 3461.bundle.801efcb1108297c5bc55.js} +17 -262
- package/dist/{3613.bundle.0231451edf6a513eb34a.js → 3613.bundle.6157004e0592003c0800.js} +41 -12
- package/dist/{4019.bundle.210bc6108a0656fc35ec.js → 4019.bundle.1be1cdd0805ad2c59d65.js} +16 -43
- package/dist/{414.bundle.f669e66c20b7ea2b7530.js → 414.bundle.bcb93cfec4662384fc24.js} +2 -2
- package/dist/{5400.bundle.3ebba479fc068cd8c700.js → 5400.bundle.c3a3fe8867efa2edfa94.js} +7 -9
- package/dist/{5858.bundle.99a6b9de04c621694ffd.js → 5858.bundle.d5f4bf849aaeebf5025c.js} +1 -1
- package/dist/{7412.bundle.9c3066742e534aaabb61.js → 7412.bundle.34fe5e72833e857edc0a.js} +202 -52
- package/dist/{9548.bundle.b91ebbc3a8ad7206b3aa.js → 9548.bundle.dc1d2a51c2834260179f.js} +2 -2
- package/dist/{app.bundle.5d10f23b4da5b116a61b.js → app.bundle.8a2402eedcc45ffb3249.js} +47 -25
- package/dist/app.bundle.css +1 -1
- package/dist/{compute.bundle.ce909c29a2b66706341f.js → compute.bundle.f3ca9fb0e7ce9e885b9c.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.ed1926b3f492983b8ced.js → polySeg.bundle.7b8d1bb21d442a48da1d.js} +1 -1
- package/dist/sw.js +1 -1
- package/package.json +21 -21
- /package/dist/{1459.bundle.d44f5e52da6fb19aecc6.js → 1459.bundle.7f578dc1846aed55941a.js} +0 -0
- /package/dist/{147.bundle.b1edd4ebd4f25f286183.js → 147.bundle.6fc65a239d1ae1c6a918.js} +0 -0
- /package/dist/{1604.bundle.c31a11dc0ff99454545e.js → 1604.bundle.0dbceba7e533dc8a5538.js} +0 -0
- /package/dist/{1919.bundle.4ca5fe01d2f7c5a62792.js → 1919.bundle.ddc7b254b294a01071ef.js} +0 -0
- /package/dist/{2018.bundle.8c8676df1bfcdb0e7c7c.js → 2018.bundle.3c6b2f7616f910ecd841.js} +0 -0
- /package/dist/{213.bundle.d8bc7e6e70680f236847.js → 213.bundle.434cf325826eea706aaa.js} +0 -0
- /package/dist/{2243.bundle.1e9358b9d772507c02be.js → 2243.bundle.57ff620e2177cd42c600.js} +0 -0
- /package/dist/{2424.bundle.42ad0c57d8a5120b8ed5.js → 2424.bundle.c493683b794a0b640f2d.js} +0 -0
- /package/dist/{319.bundle.f5adcbbef5767dedc45d.js → 319.bundle.4ea0dbcfeb553c900206.js} +0 -0
- /package/dist/{4092.bundle.ca6b0bb4d15e5e45d891.js → 4092.bundle.65bdae18b174487c1676.js} +0 -0
- /package/dist/{5457.bundle.12df550c4148fda9fd19.js → 5457.bundle.e5d677b16d724b4cbf26.js} +0 -0
- /package/dist/{5485.bundle.f5dd3dd6313f57cf9053.js → 5485.bundle.9b70beea7330a4af35d9.js} +0 -0
- /package/dist/{6027.bundle.6db4480e70d0f23b1dec.js → 6027.bundle.54bcbe0f98f17755ec15.js} +0 -0
- /package/dist/{6201.bundle.60af9e41cfe5d1397946.js → 6201.bundle.5755b32632202c3dc29a.js} +0 -0
- /package/dist/{6991.bundle.e989d70e0872071c671c.js → 6991.bundle.3e77f988fa5a44852896.js} +0 -0
- /package/dist/{7431.bundle.cb629cddc7beedb366c8.js → 7431.bundle.55dd86000e66bee467e2.js} +0 -0
- /package/dist/{7639.bundle.57c8bea585ffef6ffcc0.js → 7639.bundle.33544dd89caced2b2a41.js} +0 -0
- /package/dist/{810.bundle.d18a4893fd961ed12dd4.js → 810.bundle.cd396218c3cbf1e10add.js} +0 -0
- /package/dist/{85.bundle.a4d3f7930554511f9392.js → 85.bundle.f10f07e444c16e578e69.js} +0 -0
- /package/dist/{8558.bundle.1e748fff1c13f0d6e6e1.js → 8558.bundle.f15f34e8139e38b1af01.js} +0 -0
- /package/dist/{934.bundle.9ae41e2c3feaffdf108c.js → 934.bundle.78a16ab84358c9848c26.js} +0 -0
- /package/dist/{9862.bundle.9f27703ec23c9c8f4cea.js → 9862.bundle.fa2e1ca195f94ef376de.js} +0 -0
- /package/dist/{9927.bundle.f6b0fde3f41ba52254fc.js → 9927.bundle.7ee83699e0036c10ebdc.js} +0 -0
|
@@ -2315,7 +2315,7 @@ const toolNames = {
|
|
|
2315
2315
|
};
|
|
2316
2316
|
|
|
2317
2317
|
;// ../../../extensions/cornerstone/src/utils/measurementServiceMappings/constants/supportedTools.js
|
|
2318
|
-
const supportedTools = ['Length', 'EllipticalROI', 'CircleROI', 'Bidirectional', 'ArrowAnnotate', 'Angle', 'CobbAngle', 'Probe', 'RectangleROI', 'PlanarFreehandROI', 'SplineROI', 'LivewireContour', 'UltrasoundDirectionalTool', 'UltrasoundPleuraBLineTool', '
|
|
2318
|
+
const supportedTools = ['Length', 'EllipticalROI', 'CircleROI', 'Bidirectional', 'ArrowAnnotate', 'Angle', 'CobbAngle', 'Probe', 'RectangleROI', 'PlanarFreehandROI', 'SplineROI', 'LivewireContour', 'UltrasoundDirectionalTool', 'UltrasoundPleuraBLineTool', 'SegmentBidirectional'];
|
|
2319
2319
|
/* harmony default export */ const constants_supportedTools = (supportedTools);
|
|
2320
2320
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/index.js + 1 modules
|
|
2321
2321
|
var annotation = __webpack_require__(47807);
|
|
@@ -4854,9 +4854,10 @@ function Probe_getMappedAnnotations(annotation, displaySetService) {
|
|
|
4854
4854
|
SeriesNumber
|
|
4855
4855
|
} = displaySet;
|
|
4856
4856
|
const {
|
|
4857
|
-
value
|
|
4857
|
+
value,
|
|
4858
|
+
modalityUnit
|
|
4858
4859
|
} = targetStats;
|
|
4859
|
-
const unit = '
|
|
4860
|
+
const unit = modalityUnit || '';
|
|
4860
4861
|
annotations.push({
|
|
4861
4862
|
SeriesInstanceUID,
|
|
4862
4863
|
SOPInstanceUID,
|
|
@@ -7205,10 +7206,17 @@ async function init({
|
|
|
7205
7206
|
viewportGridService.addPresentationIdProvider('positionPresentationId', getPositionPresentationId);
|
|
7206
7207
|
viewportGridService.addPresentationIdProvider('lutPresentationId', getLutPresentationId);
|
|
7207
7208
|
viewportGridService.addPresentationIdProvider('segmentationPresentationId', getSegmentationPresentationId);
|
|
7208
|
-
|
|
7209
|
+
segmentationService.setStyle({
|
|
7209
7210
|
type: esm_enums.SegmentationRepresentations.Contour
|
|
7210
7211
|
}, {
|
|
7211
|
-
|
|
7212
|
+
// Declare these alpha values at the Contour type level so that they can be set/changed/inherited for all contour segmentations.
|
|
7213
|
+
fillAlpha: 0.5,
|
|
7214
|
+
fillAlphaInactive: 0.4,
|
|
7215
|
+
// In general do not fill contours so that hydrated RTSTRUCTs are not filled in when active or inactive by default.
|
|
7216
|
+
// However, hydrated RTSTRUCTs are filled in when active or inactive if the user chooses to fill ALL contours.
|
|
7217
|
+
// Those Contours created in OHIF (i.e. using the Segmentation Panel) will override both fill properties upon creation.
|
|
7218
|
+
renderFill: false,
|
|
7219
|
+
renderFillInactive: false
|
|
7212
7220
|
});
|
|
7213
7221
|
const metadataProvider = src/* default.classes */.Ay.classes.MetadataProvider;
|
|
7214
7222
|
esm.volumeLoader.registerVolumeLoader('cornerstoneStreamingImageVolume', loaders/* cornerstoneStreamingImageVolumeLoader */.FC);
|
|
@@ -7834,11 +7842,27 @@ function SegmentationToolConfig() {
|
|
|
7834
7842
|
|
|
7835
7843
|
|
|
7836
7844
|
|
|
7837
|
-
|
|
7838
7845
|
function getSegmentationPanelCustomization({
|
|
7839
7846
|
commandsManager,
|
|
7840
7847
|
servicesManager
|
|
7841
7848
|
}) {
|
|
7849
|
+
const {
|
|
7850
|
+
segmentationService
|
|
7851
|
+
} = servicesManager.services;
|
|
7852
|
+
let contourRenderFillChangedGlobally = false;
|
|
7853
|
+
|
|
7854
|
+
// Listen to when the global CONTOUR type renderFill style property is changed.
|
|
7855
|
+
const {
|
|
7856
|
+
unsubscribe
|
|
7857
|
+
} = segmentationService.subscribe(segmentationService.EVENTS.SEGMENTATION_STYLE_MODIFIED, ({
|
|
7858
|
+
specifier,
|
|
7859
|
+
style
|
|
7860
|
+
}) => {
|
|
7861
|
+
if (specifier.type === esm_enums.SegmentationRepresentations.Contour && specifier.segmentationId == null && specifier.viewportId == null && style.renderFill != null) {
|
|
7862
|
+
unsubscribe();
|
|
7863
|
+
contourRenderFillChangedGlobally = true;
|
|
7864
|
+
}
|
|
7865
|
+
});
|
|
7842
7866
|
return {
|
|
7843
7867
|
'panelSegmentation.customDropdownMenuContent': CustomDropdownMenuContent,
|
|
7844
7868
|
'panelSegmentation.customSegmentStatisticsHeader': CustomSegmentStatisticsHeader,
|
|
@@ -7859,12 +7883,48 @@ function getSegmentationPanelCustomization({
|
|
|
7859
7883
|
const segmentationId = await commandsManager.run('createContourForViewport', {
|
|
7860
7884
|
viewportId
|
|
7861
7885
|
});
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7886
|
+
// Override the default (i.e. hydrated RTSTRUCT) style for contours if the global CONTOUR type
|
|
7887
|
+
// renderFill style property has not been changed.
|
|
7888
|
+
if (!contourRenderFillChangedGlobally) {
|
|
7889
|
+
segmentationService.setStyle({
|
|
7890
|
+
segmentationId,
|
|
7891
|
+
type: esm_enums.SegmentationRepresentations.Contour
|
|
7892
|
+
}, {
|
|
7893
|
+
renderFill: true,
|
|
7894
|
+
renderFillInactive: true
|
|
7895
|
+
},
|
|
7896
|
+
// Do not merge so that these created contours inherit other type-specific style properties like the fill alpha.
|
|
7897
|
+
// Merging would otherwise permanently inherit the fill alpha and any inheritance from the type level would be lost.
|
|
7898
|
+
false);
|
|
7899
|
+
}
|
|
7900
|
+
|
|
7901
|
+
// If the global CONTOUR type renderFill style property is already set, do not subscribe to the SEGMENTATION_STYLE_MODIFIED event.
|
|
7902
|
+
if (contourRenderFillChangedGlobally) {
|
|
7903
|
+
return;
|
|
7904
|
+
}
|
|
7905
|
+
|
|
7906
|
+
// Subscribe to the SEGMENTATION_STYLE_MODIFIED event to listen for changes to the CONTOUR type renderFill style property.
|
|
7907
|
+
const {
|
|
7908
|
+
unsubscribe
|
|
7909
|
+
} = segmentationService.subscribe(segmentationService.EVENTS.SEGMENTATION_STYLE_MODIFIED, ({
|
|
7910
|
+
specifier,
|
|
7911
|
+
style
|
|
7912
|
+
}) => {
|
|
7913
|
+
if (specifier.type === esm_enums.SegmentationRepresentations.Contour && specifier.segmentationId == null && specifier.viewportId == null && style.renderFill != null) {
|
|
7914
|
+
// We are here because the renderFill style property is globally being changed for ALL contours.
|
|
7915
|
+
// When this occurs, the desire is for ALL contours to inherit the property. To make this happen,
|
|
7916
|
+
// we have to clear the style property that was set for this specific segmentation
|
|
7917
|
+
// when it was created above.
|
|
7918
|
+
// We can now also unsubscribe because this change only needs to be made when the global CONTOUR type
|
|
7919
|
+
// renderFill style property is first changed.
|
|
7920
|
+
|
|
7921
|
+
contourRenderFillChangedGlobally = true;
|
|
7922
|
+
unsubscribe();
|
|
7923
|
+
segmentationService.setStyle({
|
|
7924
|
+
segmentationId,
|
|
7925
|
+
type: esm_enums.SegmentationRepresentations.Contour
|
|
7926
|
+
}, {}, false);
|
|
7927
|
+
}
|
|
7868
7928
|
});
|
|
7869
7929
|
}
|
|
7870
7930
|
},
|
|
@@ -12120,6 +12180,24 @@ function commandsModule({
|
|
|
12120
12180
|
renderFill: value
|
|
12121
12181
|
});
|
|
12122
12182
|
},
|
|
12183
|
+
/**
|
|
12184
|
+
* Sets whether to render fill for inactive segmentations of a segmentation type
|
|
12185
|
+
* @param props.type - The type of segmentation
|
|
12186
|
+
* @param props.value - Whether to render fill for inactive segmentations
|
|
12187
|
+
*/
|
|
12188
|
+
setRenderFillInactiveCommand: ({
|
|
12189
|
+
type,
|
|
12190
|
+
value
|
|
12191
|
+
}) => {
|
|
12192
|
+
const {
|
|
12193
|
+
segmentationService
|
|
12194
|
+
} = servicesManager.services;
|
|
12195
|
+
segmentationService.setStyle({
|
|
12196
|
+
type
|
|
12197
|
+
}, {
|
|
12198
|
+
renderFillInactive: value
|
|
12199
|
+
});
|
|
12200
|
+
},
|
|
12123
12201
|
/**
|
|
12124
12202
|
* Sets whether to render outline for a segmentation type
|
|
12125
12203
|
* @param props.type - The type of segmentation
|
|
@@ -12139,11 +12217,11 @@ function commandsModule({
|
|
|
12139
12217
|
});
|
|
12140
12218
|
},
|
|
12141
12219
|
/**
|
|
12142
|
-
* Sets
|
|
12220
|
+
* Sets whether to render outline for inactive segmentations of a segmentation type
|
|
12143
12221
|
* @param props.type - The type of segmentation
|
|
12144
|
-
* @param props.value -
|
|
12222
|
+
* @param props.value - Whether to render outline for inactive segmentations
|
|
12145
12223
|
*/
|
|
12146
|
-
|
|
12224
|
+
setRenderOutlineInactiveCommand: ({
|
|
12147
12225
|
type,
|
|
12148
12226
|
value
|
|
12149
12227
|
}) => {
|
|
@@ -12153,9 +12231,41 @@ function commandsModule({
|
|
|
12153
12231
|
segmentationService.setStyle({
|
|
12154
12232
|
type
|
|
12155
12233
|
}, {
|
|
12156
|
-
|
|
12234
|
+
renderOutlineInactive: value
|
|
12157
12235
|
});
|
|
12158
12236
|
},
|
|
12237
|
+
/**
|
|
12238
|
+
* Sets the fill alpha for inactive segmentations.
|
|
12239
|
+
* If no type is provided, the fill alpha for all types will be set.
|
|
12240
|
+
* @param props.type - The type of segmentation
|
|
12241
|
+
* @param props.value - The alpha value to set
|
|
12242
|
+
*/
|
|
12243
|
+
setFillAlphaInactiveCommand: ({
|
|
12244
|
+
type,
|
|
12245
|
+
value
|
|
12246
|
+
}) => {
|
|
12247
|
+
const {
|
|
12248
|
+
segmentationService
|
|
12249
|
+
} = servicesManager.services;
|
|
12250
|
+
if (type) {
|
|
12251
|
+
segmentationService.setStyle({
|
|
12252
|
+
type
|
|
12253
|
+
}, {
|
|
12254
|
+
fillAlphaInactive: value
|
|
12255
|
+
});
|
|
12256
|
+
} else {
|
|
12257
|
+
segmentationService.setStyle({
|
|
12258
|
+
type: esm_enums.SegmentationRepresentations.Labelmap
|
|
12259
|
+
}, {
|
|
12260
|
+
fillAlphaInactive: value
|
|
12261
|
+
});
|
|
12262
|
+
segmentationService.setStyle({
|
|
12263
|
+
type: esm_enums.SegmentationRepresentations.Contour
|
|
12264
|
+
}, {
|
|
12265
|
+
fillAlphaInactive: value
|
|
12266
|
+
});
|
|
12267
|
+
}
|
|
12268
|
+
},
|
|
12159
12269
|
editSegmentLabel: async ({
|
|
12160
12270
|
segmentationId,
|
|
12161
12271
|
segmentIndex
|
|
@@ -13115,9 +13225,15 @@ function commandsModule({
|
|
|
13115
13225
|
setRenderFill: {
|
|
13116
13226
|
commandFn: actions.setRenderFillCommand
|
|
13117
13227
|
},
|
|
13228
|
+
setRenderFillInactive: {
|
|
13229
|
+
commandFn: actions.setRenderFillInactiveCommand
|
|
13230
|
+
},
|
|
13118
13231
|
setRenderOutline: {
|
|
13119
13232
|
commandFn: actions.setRenderOutlineCommand
|
|
13120
13233
|
},
|
|
13234
|
+
setRenderOutlineInactive: {
|
|
13235
|
+
commandFn: actions.setRenderOutlineInactiveCommand
|
|
13236
|
+
},
|
|
13121
13237
|
setFillAlphaInactive: {
|
|
13122
13238
|
commandFn: actions.setFillAlphaInactiveCommand
|
|
13123
13239
|
},
|
|
@@ -19047,7 +19163,8 @@ const SegmentationService_EVENTS = {
|
|
|
19047
19163
|
// loading completed for all segments
|
|
19048
19164
|
SEGMENTATION_LOADING_COMPLETE: 'event::segmentation_loading_complete',
|
|
19049
19165
|
// fired when a contour annotation cut merge process is completed
|
|
19050
|
-
SEGMENTATION_ANNOTATION_CUT_MERGE_PROCESS_COMPLETED: 'event::annotation_cut_merge_process_completed'
|
|
19166
|
+
SEGMENTATION_ANNOTATION_CUT_MERGE_PROCESS_COMPLETED: 'event::annotation_cut_merge_process_completed',
|
|
19167
|
+
SEGMENTATION_STYLE_MODIFIED: 'event::segmentation_style_modified'
|
|
19051
19168
|
};
|
|
19052
19169
|
const VALUE_TYPES = {};
|
|
19053
19170
|
class SegmentationService extends src/* PubSubService */.Rc {
|
|
@@ -19074,8 +19191,13 @@ class SegmentationService extends src/* PubSubService */.Rc {
|
|
|
19074
19191
|
const style = dist_esm.segmentation.config.style.getStyle(specifier);
|
|
19075
19192
|
return style;
|
|
19076
19193
|
};
|
|
19077
|
-
this.setStyle = (specifier, style) => {
|
|
19078
|
-
dist_esm.segmentation.config.style.setStyle(specifier, style);
|
|
19194
|
+
this.setStyle = (specifier, style, merge = true) => {
|
|
19195
|
+
dist_esm.segmentation.config.style.setStyle(specifier, style, merge);
|
|
19196
|
+
this._broadcastEvent(SegmentationService_EVENTS.SEGMENTATION_STYLE_MODIFIED, {
|
|
19197
|
+
specifier,
|
|
19198
|
+
style,
|
|
19199
|
+
merge
|
|
19200
|
+
});
|
|
19079
19201
|
};
|
|
19080
19202
|
this.resetToGlobalStyle = () => {
|
|
19081
19203
|
dist_esm.segmentation.config.style.resetToGlobalStyle();
|
|
@@ -20306,7 +20428,7 @@ class SegmentationService extends src/* PubSubService */.Rc {
|
|
|
20306
20428
|
segmentationId,
|
|
20307
20429
|
segmentIndex,
|
|
20308
20430
|
type: LABELMAP
|
|
20309
|
-
}, {});
|
|
20431
|
+
}, {}, false);
|
|
20310
20432
|
}
|
|
20311
20433
|
};
|
|
20312
20434
|
requestAnimationFrame(animation);
|
|
@@ -23239,6 +23361,9 @@ function PanelSegmentation({
|
|
|
23239
23361
|
setFillAlpha: ({
|
|
23240
23362
|
type
|
|
23241
23363
|
}, value) => {
|
|
23364
|
+
commandsManager.run('activateSelectedSegmentationOfType', {
|
|
23365
|
+
segmentationRepresentationType: type
|
|
23366
|
+
});
|
|
23242
23367
|
commandsManager.run('setFillAlpha', {
|
|
23243
23368
|
type,
|
|
23244
23369
|
value
|
|
@@ -23247,6 +23372,9 @@ function PanelSegmentation({
|
|
|
23247
23372
|
setOutlineWidth: ({
|
|
23248
23373
|
type
|
|
23249
23374
|
}, value) => {
|
|
23375
|
+
commandsManager.run('activateSelectedSegmentationOfType', {
|
|
23376
|
+
segmentationRepresentationType: type
|
|
23377
|
+
});
|
|
23250
23378
|
commandsManager.run('setOutlineWidth', {
|
|
23251
23379
|
type,
|
|
23252
23380
|
value
|
|
@@ -23255,19 +23383,41 @@ function PanelSegmentation({
|
|
|
23255
23383
|
setRenderFill: ({
|
|
23256
23384
|
type
|
|
23257
23385
|
}, value) => {
|
|
23386
|
+
commandsManager.run('activateSelectedSegmentationOfType', {
|
|
23387
|
+
segmentationRepresentationType: type
|
|
23388
|
+
});
|
|
23258
23389
|
commandsManager.run('setRenderFill', {
|
|
23259
23390
|
type,
|
|
23260
23391
|
value
|
|
23261
23392
|
});
|
|
23262
23393
|
},
|
|
23394
|
+
setRenderFillInactive: ({
|
|
23395
|
+
type
|
|
23396
|
+
}, value) => {
|
|
23397
|
+
commandsManager.run('setRenderFillInactive', {
|
|
23398
|
+
type,
|
|
23399
|
+
value
|
|
23400
|
+
});
|
|
23401
|
+
},
|
|
23263
23402
|
setRenderOutline: ({
|
|
23264
23403
|
type
|
|
23265
23404
|
}, value) => {
|
|
23405
|
+
commandsManager.run('activateSelectedSegmentationOfType', {
|
|
23406
|
+
segmentationRepresentationType: type
|
|
23407
|
+
});
|
|
23266
23408
|
commandsManager.run('setRenderOutline', {
|
|
23267
23409
|
type,
|
|
23268
23410
|
value
|
|
23269
23411
|
});
|
|
23270
23412
|
},
|
|
23413
|
+
setRenderOutlineInactive: ({
|
|
23414
|
+
type
|
|
23415
|
+
}, value) => {
|
|
23416
|
+
commandsManager.run('setRenderOutlineInactive', {
|
|
23417
|
+
type,
|
|
23418
|
+
value
|
|
23419
|
+
});
|
|
23420
|
+
},
|
|
23271
23421
|
setFillAlphaInactive: ({
|
|
23272
23422
|
type
|
|
23273
23423
|
}, value) => {
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
/******/ // This function allow to reference async chunks and sibling chunks for the entrypoint
|
|
171
171
|
/******/ __webpack_require__.u = (chunkId) => {
|
|
172
172
|
/******/ // return url for filenames based on template
|
|
173
|
-
/******/ return "" + chunkId + ".bundle." + {"732":"6978ac30a1e36abf06db","5858":"
|
|
173
|
+
/******/ return "" + chunkId + ".bundle." + {"732":"6978ac30a1e36abf06db","5858":"d5f4bf849aaeebf5025c","8094":"5c44190a325ac23e3e5c"}[chunkId] + ".js";
|
|
174
174
|
/******/ };
|
|
175
175
|
/******/ })();
|
|
176
176
|
/******/
|
|
@@ -4878,6 +4878,11 @@ const {
|
|
|
4878
4878
|
Polyline: RectangleROI_TID300Polyline
|
|
4879
4879
|
} = dcmjs_es/* utilities */.BF.TID300;
|
|
4880
4880
|
class RectangleROI extends BaseAdapter3D {
|
|
4881
|
+
static isValidMeasurement(measurement) {
|
|
4882
|
+
const graphicItem = this.getGraphicItem(measurement);
|
|
4883
|
+
const pointsCount = this.getPointsCount(graphicItem);
|
|
4884
|
+
return this.getGraphicType(graphicItem) === "POLYLINE" && (pointsCount === 4 || pointsCount === 5);
|
|
4885
|
+
}
|
|
4881
4886
|
static getMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata) {
|
|
4882
4887
|
const {
|
|
4883
4888
|
state,
|
|
@@ -4885,6 +4890,7 @@ class RectangleROI extends BaseAdapter3D {
|
|
|
4885
4890
|
referencedImageId,
|
|
4886
4891
|
ReferencedFrameNumber
|
|
4887
4892
|
} = MeasurementReport_MeasurementReport.getSetupMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata, this.toolType);
|
|
4893
|
+
const points = worldCoords.length === 5 ? worldCoords.slice(0, 4) : worldCoords;
|
|
4888
4894
|
const areaGroup = MeasurementGroup.ContentSequence.find(g => g.ValueType === "NUM" && g.ConceptNameCodeSequence[0].CodeMeaning === "Area");
|
|
4889
4895
|
const cachedStats = referencedImageId ? {
|
|
4890
4896
|
[`imageId:${referencedImageId}`]: {
|
|
@@ -4896,7 +4902,7 @@ class RectangleROI extends BaseAdapter3D {
|
|
|
4896
4902
|
...state.annotation.data,
|
|
4897
4903
|
handles: {
|
|
4898
4904
|
...state.annotation.data.handles,
|
|
4899
|
-
points: [
|
|
4905
|
+
points: [points[0], points[1], points[3], points[2]]
|
|
4900
4906
|
},
|
|
4901
4907
|
cachedStats,
|
|
4902
4908
|
frameNumber: ReferencedFrameNumber
|
|
@@ -4938,6 +4944,8 @@ _RectangleROI = RectangleROI;
|
|
|
4938
4944
|
(() => {
|
|
4939
4945
|
_RectangleROI.init("RectangleROI", RectangleROI_TID300Polyline);
|
|
4940
4946
|
_RectangleROI.registerLegacy();
|
|
4947
|
+
_RectangleROI.registerType("DCM:111030", "POLYLINE", 4);
|
|
4948
|
+
_RectangleROI.registerType("DCM:111030", "POLYLINE", 5);
|
|
4941
4949
|
})();
|
|
4942
4950
|
|
|
4943
4951
|
|
|
@@ -7618,6 +7618,8 @@ var Surface_surfaceDisplay = __webpack_require__(67014);
|
|
|
7618
7618
|
|
|
7619
7619
|
|
|
7620
7620
|
|
|
7621
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationEventManager.js
|
|
7622
|
+
var segmentationEventManager = __webpack_require__(10692);
|
|
7621
7623
|
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/removeSegmentationRepresentations.js
|
|
7622
7624
|
|
|
7623
7625
|
|
|
@@ -7626,6 +7628,7 @@ var Surface_surfaceDisplay = __webpack_require__(67014);
|
|
|
7626
7628
|
|
|
7627
7629
|
|
|
7628
7630
|
|
|
7631
|
+
|
|
7629
7632
|
function removeSegmentationRepresentation(viewportId, specifier, immediate) {
|
|
7630
7633
|
return _removeSegmentationRepresentations(viewportId, specifier, immediate);
|
|
7631
7634
|
}
|
|
@@ -7685,6 +7688,7 @@ function _removeRepresentationObject(viewportId, segmentationId, type, immediate
|
|
|
7685
7688
|
else if (representation.type === SegmentationRepresentations.Surface) {
|
|
7686
7689
|
surfaceDisplay.removeRepresentation(viewportId, representation.segmentationId, immediate);
|
|
7687
7690
|
}
|
|
7691
|
+
removeSegmentationListener(representation.segmentationId, representation.type);
|
|
7688
7692
|
});
|
|
7689
7693
|
const { viewport } = getEnabledElementByViewportId(viewportId) || {};
|
|
7690
7694
|
if (viewport) {
|
|
@@ -7756,6 +7760,94 @@ function getLockedSegmentIndices(segmentationId) {
|
|
|
7756
7760
|
|
|
7757
7761
|
|
|
7758
7762
|
|
|
7763
|
+
/***/ }),
|
|
7764
|
+
|
|
7765
|
+
/***/ 10692:
|
|
7766
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7767
|
+
|
|
7768
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7769
|
+
/* harmony export */ Np: () => (/* binding */ addDefaultSegmentationListener)
|
|
7770
|
+
/* harmony export */ });
|
|
7771
|
+
/* unused harmony exports addSegmentationListener, removeSegmentationListener, removeAllSegmentationListeners */
|
|
7772
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
|
|
7773
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99737);
|
|
7774
|
+
/* harmony import */ var _triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49906);
|
|
7775
|
+
/* harmony import */ var _utilities_debounce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(52905);
|
|
7776
|
+
/* harmony import */ var _tools_displayTools_Surface_surfaceDisplay__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67014);
|
|
7777
|
+
/* harmony import */ var _tools_displayTools_Contour_contourDisplay__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25894);
|
|
7778
|
+
/* harmony import */ var _tools_displayTools_Labelmap_labelmapDisplay__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(684);
|
|
7779
|
+
/* harmony import */ var _getSegmentation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(33283);
|
|
7780
|
+
|
|
7781
|
+
|
|
7782
|
+
|
|
7783
|
+
|
|
7784
|
+
|
|
7785
|
+
|
|
7786
|
+
|
|
7787
|
+
|
|
7788
|
+
const renderers = {
|
|
7789
|
+
[_enums__WEBPACK_IMPORTED_MODULE_1__.SegmentationRepresentations.Labelmap]: _tools_displayTools_Labelmap_labelmapDisplay__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay,
|
|
7790
|
+
[_enums__WEBPACK_IMPORTED_MODULE_1__.SegmentationRepresentations.Contour]: _tools_displayTools_Contour_contourDisplay__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A,
|
|
7791
|
+
[_enums__WEBPACK_IMPORTED_MODULE_1__.SegmentationRepresentations.Surface]: _tools_displayTools_Surface_surfaceDisplay__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Ay,
|
|
7792
|
+
};
|
|
7793
|
+
const segmentationListeners = new Map();
|
|
7794
|
+
function addDefaultSegmentationListener(viewport, segmentationId, representationType) {
|
|
7795
|
+
const updateFunction = renderers[representationType].getUpdateFunction(viewport);
|
|
7796
|
+
if (updateFunction) {
|
|
7797
|
+
addSegmentationListener(segmentationId, representationType, updateFunction);
|
|
7798
|
+
}
|
|
7799
|
+
}
|
|
7800
|
+
function addSegmentationListener(segmentationId, representationType, updateFunction) {
|
|
7801
|
+
if (!segmentationListeners.has(segmentationId)) {
|
|
7802
|
+
segmentationListeners.set(segmentationId, new Map());
|
|
7803
|
+
}
|
|
7804
|
+
const listenerMap = segmentationListeners.get(segmentationId);
|
|
7805
|
+
if (listenerMap.has(representationType)) {
|
|
7806
|
+
removeSegmentationListener(segmentationId, representationType);
|
|
7807
|
+
}
|
|
7808
|
+
const listener = createDebouncedSegmentationListener(segmentationId, representationType, updateFunction);
|
|
7809
|
+
_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_1__.Events.SEGMENTATION_DATA_MODIFIED, listener);
|
|
7810
|
+
listenerMap.set(representationType, listener);
|
|
7811
|
+
}
|
|
7812
|
+
function removeSegmentationListener(segmentationId, representationType) {
|
|
7813
|
+
const listenerMap = segmentationListeners.get(segmentationId);
|
|
7814
|
+
if (!listenerMap) {
|
|
7815
|
+
return;
|
|
7816
|
+
}
|
|
7817
|
+
const listener = listenerMap.get(representationType);
|
|
7818
|
+
if (!listener) {
|
|
7819
|
+
return;
|
|
7820
|
+
}
|
|
7821
|
+
_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_1__.Events.SEGMENTATION_DATA_MODIFIED, listener);
|
|
7822
|
+
listenerMap.delete(representationType);
|
|
7823
|
+
}
|
|
7824
|
+
function removeAllSegmentationListeners(segmentationId) {
|
|
7825
|
+
const listenerMap = segmentationListeners.get(segmentationId);
|
|
7826
|
+
if (!listenerMap) {
|
|
7827
|
+
return;
|
|
7828
|
+
}
|
|
7829
|
+
for (const listener of listenerMap.values()) {
|
|
7830
|
+
eventTarget.removeEventListener(Events.SEGMENTATION_DATA_MODIFIED, listener);
|
|
7831
|
+
}
|
|
7832
|
+
segmentationListeners.delete(segmentationId);
|
|
7833
|
+
}
|
|
7834
|
+
function createDebouncedSegmentationListener(segmentationId, representationType, updateFunction) {
|
|
7835
|
+
const debouncedHandler = (0,_utilities_debounce__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)((event) => {
|
|
7836
|
+
const eventSegmentationId = event.detail?.segmentationId;
|
|
7837
|
+
const segmentation = (0,_getSegmentation__WEBPACK_IMPORTED_MODULE_7__/* .getSegmentation */ .T)(eventSegmentationId);
|
|
7838
|
+
if (eventSegmentationId === segmentationId &&
|
|
7839
|
+
!!segmentation?.representationData?.[representationType]) {
|
|
7840
|
+
updateFunction(segmentationId);
|
|
7841
|
+
(0,_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_2__.triggerSegmentationModified)(segmentationId);
|
|
7842
|
+
}
|
|
7843
|
+
}, 300);
|
|
7844
|
+
return ((event) => {
|
|
7845
|
+
debouncedHandler(event);
|
|
7846
|
+
});
|
|
7847
|
+
}
|
|
7848
|
+
|
|
7849
|
+
|
|
7850
|
+
|
|
7759
7851
|
/***/ }),
|
|
7760
7852
|
|
|
7761
7853
|
/***/ 98870:
|
|
@@ -12773,6 +12865,8 @@ var createLabelmapVolumeForViewport = __webpack_require__(97492);
|
|
|
12773
12865
|
var enums = __webpack_require__(99737);
|
|
12774
12866
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/SegmentationRepresentations.js
|
|
12775
12867
|
var enums_SegmentationRepresentations = __webpack_require__(18682);
|
|
12868
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentation.js
|
|
12869
|
+
var segmentation_getSegmentation = __webpack_require__(33283);
|
|
12776
12870
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentationRepresentation.js
|
|
12777
12871
|
var getSegmentationRepresentation = __webpack_require__(93210);
|
|
12778
12872
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/displayTools/Surface/surfaceDisplay.js
|
|
@@ -12789,6 +12883,8 @@ var state = __webpack_require__(85204);
|
|
|
12789
12883
|
var PlanarFreehandContourSegmentationTool = __webpack_require__(37590);
|
|
12790
12884
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js + 6 modules
|
|
12791
12885
|
var ToolGroupManager = __webpack_require__(77609);
|
|
12886
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationEventManager.js
|
|
12887
|
+
var segmentationEventManager = __webpack_require__(10692);
|
|
12792
12888
|
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/SegmentationRenderingEngine.js
|
|
12793
12889
|
|
|
12794
12890
|
|
|
@@ -12801,6 +12897,8 @@ var ToolGroupManager = __webpack_require__(77609);
|
|
|
12801
12897
|
|
|
12802
12898
|
|
|
12803
12899
|
|
|
12900
|
+
|
|
12901
|
+
|
|
12804
12902
|
const renderers = {
|
|
12805
12903
|
[enums_SegmentationRepresentations/* default */.A.Labelmap]: labelmapDisplay/* default */.Ay,
|
|
12806
12904
|
[enums_SegmentationRepresentations/* default */.A.Contour]: contourDisplay/* default */.A,
|
|
@@ -12894,15 +12992,19 @@ class SegmentationRenderingEngine {
|
|
|
12894
12992
|
if (!viewport) {
|
|
12895
12993
|
return;
|
|
12896
12994
|
}
|
|
12897
|
-
const viewportRenderList = [];
|
|
12898
12995
|
const segmentationRenderList = segmentationRepresentations.map((representation) => {
|
|
12899
12996
|
if (representation.type === enums.SegmentationRepresentations.Contour) {
|
|
12900
12997
|
this._addPlanarFreeHandToolIfAbsent(viewport);
|
|
12901
12998
|
}
|
|
12902
12999
|
const display = renderers[representation.type];
|
|
13000
|
+
const segmentation = (0,segmentation_getSegmentation/* getSegmentation */.T)(representation.segmentationId);
|
|
13001
|
+
const existingRepresentation = segmentation.representationData[representation.type] !== undefined;
|
|
12903
13002
|
try {
|
|
12904
|
-
|
|
12905
|
-
|
|
13003
|
+
display.render(viewport, representation).then(() => {
|
|
13004
|
+
if (!existingRepresentation) {
|
|
13005
|
+
(0,segmentationEventManager/* addDefaultSegmentationListener */.Np)(viewport, representation.segmentationId, representation.type);
|
|
13006
|
+
}
|
|
13007
|
+
});
|
|
12906
13008
|
}
|
|
12907
13009
|
catch (error) {
|
|
12908
13010
|
console.error(error);
|
|
@@ -14281,8 +14383,6 @@ var getOrCreateImageVolume = __webpack_require__(83075);
|
|
|
14281
14383
|
var getStatistics = __webpack_require__(38440);
|
|
14282
14384
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/validateLabelmap.js
|
|
14283
14385
|
var validateLabelmap = __webpack_require__(21345);
|
|
14284
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentation.js
|
|
14285
|
-
var segmentation_getSegmentation = __webpack_require__(33283);
|
|
14286
14386
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/triggerSegmentationEvents.js
|
|
14287
14387
|
var triggerSegmentationEvents = __webpack_require__(49906);
|
|
14288
14388
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/constants/COLOR_LUT.js
|
|
@@ -14353,6 +14453,8 @@ function segmentIndex_setActiveSegmentIndex(segmentationId, segmentIndex) {
|
|
|
14353
14453
|
|
|
14354
14454
|
|
|
14355
14455
|
|
|
14456
|
+
|
|
14457
|
+
|
|
14356
14458
|
function internalAddSegmentationRepresentation_internalAddSegmentationRepresentation(viewportId, representationInput) {
|
|
14357
14459
|
const { segmentationId, config } = representationInput;
|
|
14358
14460
|
const renderingConfig = {
|
|
@@ -14360,6 +14462,10 @@ function internalAddSegmentationRepresentation_internalAddSegmentationRepresenta
|
|
|
14360
14462
|
...config,
|
|
14361
14463
|
};
|
|
14362
14464
|
defaultSegmentationStateManager.addSegmentationRepresentation(viewportId, segmentationId, representationInput.type, renderingConfig);
|
|
14465
|
+
const { viewport } = getEnabledElementByViewportId(viewportId) || {};
|
|
14466
|
+
if (viewport) {
|
|
14467
|
+
addDefaultSegmentationListener(viewport, segmentationId, representationInput.type);
|
|
14468
|
+
}
|
|
14363
14469
|
if (!getActiveSegmentIndex(segmentationId)) {
|
|
14364
14470
|
let firstSegmentIndex = 1;
|
|
14365
14471
|
const segmentation = defaultSegmentationStateManager.getSegmentation(segmentationId);
|
|
@@ -14374,6 +14480,9 @@ function internalAddSegmentationRepresentation_internalAddSegmentationRepresenta
|
|
|
14374
14480
|
if (representationInput.type === SegmentationRepresentations.Contour) {
|
|
14375
14481
|
triggerAnnotationRenderForViewportIds([viewportId]);
|
|
14376
14482
|
}
|
|
14483
|
+
if (representationInput.type === SegmentationRepresentations.Surface) {
|
|
14484
|
+
triggerSegmentationDataModified(segmentationId);
|
|
14485
|
+
}
|
|
14377
14486
|
triggerSegmentationModified(segmentationId);
|
|
14378
14487
|
}
|
|
14379
14488
|
function getColorLUTIndex(config) {
|