@ohif/app 3.14.0-beta.97 → 3.14.0-beta.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{1645.bundle.a98b9ca6.js → 1645.bundle.1a466b16.js} +600 -600
- package/dist/{1788.bundle.3f1349d2.js → 1788.bundle.962951f9.js} +26 -26
- package/dist/{1793.bundle.27458a55.js → 1793.bundle.30f89e46.js} +5 -3
- package/dist/{1862.bundle.79bfe469.js → 1862.bundle.3ae388c3.js} +2 -2
- package/dist/204.bundle.bc44c201.js +101 -0
- package/dist/204.bundle.css +52 -0
- package/dist/{2748.bundle.eaa94e2e.js → 2103.bundle.1cf348e8.js} +1 -1771
- package/dist/{2478.bundle.fc6ab30b.js → 2478.bundle.68ff1b2d.js} +2 -2
- package/dist/{2717.bundle.d5f58443.js → 2717.bundle.4318f1ee.js} +45 -43
- package/dist/{5989.bundle.f484884a.js → 287.bundle.ee60c370.js} +4570 -832
- package/dist/{2894.bundle.d612efb2.js → 2894.bundle.30c0af5b.js} +20 -14
- package/dist/{2991.bundle.f94892fb.js → 2991.bundle.77642eee.js} +101 -97
- package/dist/{3004.bundle.51919fdc.js → 3004.bundle.5568149a.js} +39 -38
- package/dist/{3255.bundle.13e205ac.js → 3255.bundle.3272671f.js} +29 -27
- package/dist/{3366.bundle.62baeeec.js → 3366.bundle.d9e78e25.js} +57 -53
- package/dist/{3468.bundle.f5dc5e44.js → 3468.bundle.666f2441.js} +37 -27
- package/dist/{347.bundle.397bb252.js → 347.bundle.1323658e.js} +44 -44
- package/dist/{3622.bundle.f4cf2d16.js → 3622.bundle.edb42b96.js} +56 -54
- package/dist/{3723.bundle.eab70100.js → 3723.bundle.43ff1971.js} +1 -1
- package/dist/{3771.bundle.aba09bd7.js → 3771.bundle.a5754f97.js} +8 -8
- package/dist/{4449.bundle.aaa4ab92.js → 4487.bundle.fa0375a4.js} +853 -95
- package/dist/{4606.bundle.a3485206.js → 4606.bundle.6c297e2a.js} +9 -7
- package/dist/{4998.bundle.3aedb48d.js → 4998.bundle.25b8cbfe.js} +5 -3
- package/dist/{5076.bundle.95c07142.js → 5076.bundle.2a14756f.js} +66 -66
- package/dist/{5143.bundle.04f54c00.js → 5143.bundle.53156bb0.js} +358 -226
- package/dist/{5154.bundle.2f460017.js → 5154.bundle.ccd02dd7.js} +5 -3
- package/dist/{5320.bundle.9b05cebb.js → 5320.bundle.c17eb4a7.js} +678 -546
- package/dist/{6212.bundle.e505e123.js → 6212.bundle.c4856be7.js} +48 -46
- package/dist/{6253.bundle.9b473339.js → 6253.bundle.596ce463.js} +1225 -1145
- package/dist/{1153.bundle.51d39e80.js → 6314.bundle.5aadfe48.js} +199 -420
- package/dist/{641.bundle.4627a8e1.js → 641.bundle.8e45751e.js} +89 -89
- package/dist/{6481.bundle.d2fca485.js → 6481.bundle.85093e70.js} +29 -23
- package/dist/{6507.bundle.d52f5e81.js → 6507.bundle.bbcdd01e.js} +76 -76
- package/dist/{6722.bundle.d09a8aad.js → 6722.bundle.3e9a4ef6.js} +4 -4
- package/dist/{6956.bundle.c82fd790.js → 6956.bundle.dc0e8660.js} +33 -33
- package/dist/{7526.bundle.0685dfeb.js → 7526.bundle.3460c3ca.js} +55 -53
- package/dist/{7604.bundle.9eb317c8.js → 7604.bundle.f1eeded4.js} +2 -2
- package/dist/{8312.bundle.2cb75b58.js → 8312.bundle.d67b6f4e.js} +652 -687
- package/dist/{6847.bundle.b2adb444.js → 8729.bundle.e17fe9b2.js} +87 -845
- package/dist/{8788.bundle.4bb4c65b.js → 8788.bundle.83ddf642.js} +21 -20
- package/dist/{8868.bundle.4c357767.js → 8868.bundle.8f3653b3.js} +31 -31
- package/dist/{8923.bundle.9aca06c4.js → 8923.bundle.8b682e96.js} +148 -148
- package/dist/{899.bundle.9a033d16.js → 899.bundle.4e1aee7f.js} +73 -203
- package/dist/{9187.bundle.8f72b4fe.js → 9187.bundle.407afa07.js} +112 -110
- package/dist/9385.bundle.fb0bbf4a.js +1888 -0
- package/dist/{9481.bundle.ccb81f53.js → 9481.bundle.d045ae3a.js} +8 -6
- package/dist/{9517.bundle.1ae74db3.js → 9517.bundle.3e2896ef.js} +31 -17
- package/dist/{9620.bundle.d1dc0be1.js → 9620.bundle.b4cc392c.js} +63 -61
- package/dist/{9841.bundle.0f40f02b.js → 9841.bundle.4f2c401a.js} +93 -91
- package/dist/{9886.bundle.cabb4a24.js → 9886.bundle.b00d5d78.js} +4 -4
- package/dist/{8037.bundle.30a187f7.js → 9889.bundle.bf312047.js} +7743 -1098
- package/dist/{9948.bundle.1172ebca.js → 9948.bundle.fecf81f8.js} +5 -5
- package/dist/{app.bundle.12bfd0b7.js → app.bundle.bb359653.js} +1953 -1245
- package/dist/{compute.bundle.0ed1fe87.js → compute.bundle.9267d449.js} +13 -12
- package/dist/{histogram-worker.bundle.58e60d7c.js → histogram-worker.bundle.29bcdbf6.js} +6 -5
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.5a53d112.js → interpolation.bundle.ee9998a4.js} +8 -7
- package/dist/{lib-router.bundle.a5ac870a.js → lib-router.bundle.2a887bc7.js} +334 -201
- package/dist/{polySeg.bundle.b4089601.js → polySeg.bundle.a55f8eee.js} +12 -12
- package/dist/sw.js +11 -1
- package/package.json +14 -19
- package/dist/1566.bundle.d58db206.js +0 -3610
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(globalThis["rspackChunk_ohif_app"] ||= []).push([[9481], {
|
|
3
3
|
90133(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
4
|
+
// ESM COMPAT FLAG
|
|
5
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4
6
|
|
|
5
7
|
// EXPORTS
|
|
6
8
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -52,7 +54,7 @@ function _extendDisplaySet(displaySet, { servicesManager, extensionManager }) {
|
|
|
52
54
|
const instance = displaySet.instances[0];
|
|
53
55
|
const { StudyInstanceUID, SeriesInstanceUID, SOPInstanceUID, SeriesDescription, SeriesNumber, SOPClassUID, wadoRoot, wadoUri, wadoUriRoot } = instance; // The date/time of a display set is the date/time of the instance it shows,
|
|
54
56
|
// chosen from all the attributes that instance carries.
|
|
55
|
-
const { SeriesDate, SeriesTime } = src
|
|
57
|
+
const { SeriesDate, SeriesTime } = src.utils.getLatestInstanceDateTime(instance);
|
|
56
58
|
Object.assign(displaySet, {
|
|
57
59
|
// "PMAP" is used in the viewer even though this is not a valid DICOM modality
|
|
58
60
|
Modality: 'PMAP',
|
|
@@ -82,7 +84,7 @@ function _extendDisplaySet(displaySet, { servicesManager, extensionManager }) {
|
|
|
82
84
|
wadoUriRoot,
|
|
83
85
|
wadoUri,
|
|
84
86
|
supportsWindowLevel: true,
|
|
85
|
-
label: SeriesDescription || `${i18n_src
|
|
87
|
+
label: SeriesDescription || `${i18n_src["default"].t('Series')} ${SeriesNumber} - ${i18n_src["default"].t('PMAP')}`
|
|
86
88
|
});
|
|
87
89
|
const referencedSeriesSequence = instance.ReferencedSeriesSequence;
|
|
88
90
|
if (!referencedSeriesSequence) {
|
|
@@ -113,7 +115,7 @@ function _extendDisplaySet(displaySet, { servicesManager, extensionManager }) {
|
|
|
113
115
|
}
|
|
114
116
|
const referencedDisplaySet = displaySet.getReferenceDisplaySet();
|
|
115
117
|
const referencedVolumeURI = referencedDisplaySet.displaySetInstanceUID;
|
|
116
|
-
const referencedVolumeId = `${cornerstone_src
|
|
118
|
+
const referencedVolumeId = `${cornerstone_src.VOLUME_LOADER_SCHEME}:${referencedVolumeURI}`;
|
|
117
119
|
displaySet.referencedVolumeURI = referencedVolumeURI;
|
|
118
120
|
displaySet.referencedVolumeId = referencedVolumeId;
|
|
119
121
|
return referencedVolumeId;
|
|
@@ -123,7 +125,7 @@ function _extendDisplaySet(displaySet, { servicesManager, extensionManager }) {
|
|
|
123
125
|
}
|
|
124
126
|
function _getDisplaySetsFromSeries(instances, servicesManager, extensionManager) {
|
|
125
127
|
const displaySet = {
|
|
126
|
-
displaySetInstanceUID: `pmap.${src
|
|
128
|
+
displaySetInstanceUID: `pmap.${src.utils.guid()}`,
|
|
127
129
|
instances: [
|
|
128
130
|
instances[0]
|
|
129
131
|
]
|
|
@@ -155,7 +157,7 @@ const getRangeFromPixelData = (pixelData)=>{
|
|
|
155
157
|
];
|
|
156
158
|
};
|
|
157
159
|
async function _load(displaySet, servicesManager, extensionManager, headers) {
|
|
158
|
-
const volumeId = `${cornerstone_src
|
|
160
|
+
const volumeId = `${cornerstone_src.VOLUME_LOADER_SCHEME}:${displaySet.displaySetInstanceUID}`;
|
|
159
161
|
const volumeLoadObject = esm.cache.getVolumeLoadObject(volumeId);
|
|
160
162
|
if (volumeLoadObject) {
|
|
161
163
|
return volumeLoadObject.promise;
|
|
@@ -187,7 +189,7 @@ async function _load(displaySet, servicesManager, extensionManager, headers) {
|
|
|
187
189
|
return promise;
|
|
188
190
|
}
|
|
189
191
|
async function _loadParametricMap({ displaySet, headers }) {
|
|
190
|
-
const arrayBuffer = await cornerstone_src
|
|
192
|
+
const arrayBuffer = await cornerstone_src.dicomLoaderService.findDicomDataPromise(displaySet, null, headers);
|
|
191
193
|
const referencedVolumeId = displaySet.getReferencedVolumeId();
|
|
192
194
|
const cachedReferencedVolume = esm.cache.getVolume(referencedVolumeId); // Parametric map can be loaded only if its referenced volume exists otherwise it will fail
|
|
193
195
|
if (!cachedReferencedVolume) {
|
|
@@ -1,28 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(globalThis["rspackChunk_ohif_app"] ||= []).push([[9517], {
|
|
3
3
|
42252(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
4
|
+
// ESM COMPAT FLAG
|
|
5
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4
6
|
|
|
5
7
|
// EXPORTS
|
|
6
8
|
__webpack_require__.d(__webpack_exports__, {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
NON_IMAGE_MODALITIES: () => (/* binding */ NON_IMAGE_MODALITIES),
|
|
10
|
+
addActivatePanelTriggers: () => (/* reexport */ addActivatePanelTriggers),
|
|
11
|
+
applyToolGroupAdditions: () => (/* reexport */ applyToolGroupAdditions),
|
|
12
|
+
basicLayout: () => (/* binding */ basicLayout),
|
|
13
|
+
basicRoute: () => (/* binding */ basicRoute),
|
|
14
|
+
cornerstone: () => (/* binding */ cornerstone),
|
|
15
|
+
customizations: () => (/* binding */ customizations),
|
|
10
16
|
"default": () => (/* binding */ basic_src),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
defaultActivatePanelTriggers: () => (/* binding */ defaultActivatePanelTriggers),
|
|
18
|
+
dicomPmap: () => (/* binding */ dicomPmap),
|
|
19
|
+
dicomRT: () => (/* binding */ dicomRT),
|
|
20
|
+
dicomSeg: () => (/* binding */ dicomSeg),
|
|
21
|
+
dicomecg: () => (/* binding */ dicomecg),
|
|
22
|
+
dicompdf: () => (/* binding */ dicompdf),
|
|
23
|
+
dicomsr: () => (/* binding */ dicomsr),
|
|
24
|
+
dicomvideo: () => (/* binding */ dicomvideo),
|
|
25
|
+
extensionDependencies: () => (/* binding */ extensionDependencies),
|
|
26
|
+
initToolGroups: () => (/* reexport */ src_initToolGroups),
|
|
27
|
+
isValidMode: () => (/* binding */ isValidMode),
|
|
28
|
+
layoutTemplate: () => (/* binding */ layoutTemplate),
|
|
29
|
+
mode: () => (/* binding */ mode),
|
|
30
|
+
modeFactory: () => (/* binding */ modeFactory),
|
|
31
|
+
modeInstance: () => (/* binding */ src_modeInstance),
|
|
32
|
+
ohif: () => (/* binding */ ohif),
|
|
33
|
+
onModeEnter: () => (/* binding */ onModeEnter),
|
|
34
|
+
onModeExit: () => (/* binding */ onModeExit),
|
|
35
|
+
registerModeToolbar: () => (/* reexport */ registerModeToolbar),
|
|
36
|
+
segmentation: () => (/* binding */ segmentation),
|
|
37
|
+
sopClassHandlers: () => (/* binding */ sopClassHandlers)
|
|
22
38
|
});
|
|
23
39
|
|
|
24
|
-
// UNUSED EXPORTS: NON_IMAGE_MODALITIES, addActivatePanelTriggers, applyToolGroupAdditions, customizations, defaultActivatePanelTriggers, dicomPmap, dicomSeg, dicomecg, dicompdf, dicomsr, dicomvideo, initToolGroups, registerModeToolbar, sopClassHandlers
|
|
25
|
-
|
|
26
40
|
// EXTERNAL MODULE: ../../node_modules/immutability-helper/index.js
|
|
27
41
|
var immutability_helper = __webpack_require__(53435);
|
|
28
42
|
var immutability_helper_default = /*#__PURE__*/__webpack_require__.n(immutability_helper);
|
|
@@ -577,7 +591,7 @@ const id = package_namespaceObject.UU;
|
|
|
577
591
|
|
|
578
592
|
|
|
579
593
|
|
|
580
|
-
const { structuredCloneWithFunctions } = src
|
|
594
|
+
const { structuredCloneWithFunctions } = src.utils; /**
|
|
581
595
|
* Define non-imaging modalities.
|
|
582
596
|
* This can be used to exclude modes which have only these modalities,
|
|
583
597
|
* or it can be used to not display thumbnails for some of these.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(globalThis["rspackChunk_ohif_app"] ||= []).push([[9620], {
|
|
3
3
|
20711(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
4
|
+
// ESM COMPAT FLAG
|
|
5
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4
6
|
|
|
5
7
|
// EXPORTS
|
|
6
8
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -41,7 +43,7 @@ var dcmjs_es = __webpack_require__(85631);
|
|
|
41
43
|
* @returns The RGB color as an array of three integers between 0 and 255.
|
|
42
44
|
*/
|
|
43
45
|
function dicomlabToRGB(cielab) {
|
|
44
|
-
const rgb = dcmjs_es
|
|
46
|
+
const rgb = dcmjs_es["default"].data.Colors.dicomlab2RGB(cielab).map((x)=>Math.round(x * 255));
|
|
45
47
|
return rgb;
|
|
46
48
|
}
|
|
47
49
|
|
|
@@ -175,7 +177,7 @@ function _ensureSegImageIdMetadataRegistered(imageId, instance) {
|
|
|
175
177
|
if (!imageId) {
|
|
176
178
|
return;
|
|
177
179
|
}
|
|
178
|
-
const metadataProvider = src
|
|
180
|
+
const metadataProvider = src.classes.MetadataProvider;
|
|
179
181
|
const StudyInstanceUID = instance.StudyInstanceUID;
|
|
180
182
|
const SeriesInstanceUID = instance.SeriesInstanceUID;
|
|
181
183
|
const SOPInstanceUID = instance.SOPInstanceUID || instance.SopInstanceUID;
|
|
@@ -200,8 +202,8 @@ function _ensureSegInstanceMetadataAvailable(imageId, instance) {
|
|
|
200
202
|
const StudyInstanceUID = instance.StudyInstanceUID;
|
|
201
203
|
const SeriesInstanceUID = instance.SeriesInstanceUID;
|
|
202
204
|
const SOPInstanceUID = instance.SOPInstanceUID || instance.SopInstanceUID;
|
|
203
|
-
const storedInstance = StudyInstanceUID && SeriesInstanceUID && SOPInstanceUID ? src
|
|
204
|
-
src
|
|
205
|
+
const storedInstance = StudyInstanceUID && SeriesInstanceUID && SOPInstanceUID ? src.DicomMetadataStore.getInstance(StudyInstanceUID, SeriesInstanceUID, SOPInstanceUID) : undefined;
|
|
206
|
+
src.classes.MetadataProvider.addCustomMetadata(imageId, 'instance', storedInstance || instance);
|
|
205
207
|
}
|
|
206
208
|
function _getSegDataSource(extensionManager, instance) {
|
|
207
209
|
const StudyInstanceUID = instance.StudyInstanceUID;
|
|
@@ -209,7 +211,7 @@ function _getSegDataSource(extensionManager, instance) {
|
|
|
209
211
|
const SOPInstanceUID = instance.SOPInstanceUID || instance.SopInstanceUID;
|
|
210
212
|
let localUrl;
|
|
211
213
|
if (StudyInstanceUID && SeriesInstanceUID && SOPInstanceUID) {
|
|
212
|
-
const storedInstance = src
|
|
214
|
+
const storedInstance = src.DicomMetadataStore.getInstance(StudyInstanceUID, SeriesInstanceUID, SOPInstanceUID);
|
|
213
215
|
localUrl = storedInstance?.url;
|
|
214
216
|
}
|
|
215
217
|
localUrl = localUrl || instance.url;
|
|
@@ -257,7 +259,7 @@ function _resolveFrameImageIds(segImageIdStr, instance, dataSource) {
|
|
|
257
259
|
function _logSegImageIds({ segDisplaySet, segImageIdStr, frameImageIds, referencedImageIds }) {
|
|
258
260
|
const instance = segDisplaySet.instance;
|
|
259
261
|
const numberOfFrames = Number(instance?.NumberOfFrames) || 1;
|
|
260
|
-
src
|
|
262
|
+
src.log.debug(SEG_LOAD_LOG_PREFIX, 'Loading SEG pixel data', {
|
|
261
263
|
SOPInstanceUID: segDisplaySet.SOPInstanceUID,
|
|
262
264
|
SeriesInstanceUID: segDisplaySet.SeriesInstanceUID,
|
|
263
265
|
SOPClassUID: segDisplaySet.SOPClassUID,
|
|
@@ -279,14 +281,14 @@ function _logSegImageIds({ segDisplaySet, segImageIdStr, frameImageIds, referenc
|
|
|
279
281
|
*/
|
|
280
282
|
function _extendDisplaySet(displaySet, { servicesManager, extensionManager }) {
|
|
281
283
|
const { instances } = displaySet;
|
|
282
|
-
src
|
|
284
|
+
src.utils.sortStudyInstances(instances); // Choose the LAST instance in the list as the most recently created one.
|
|
283
285
|
const instance = instances[instances.length - 1];
|
|
284
286
|
const { StudyInstanceUID, SeriesInstanceUID, SOPInstanceUID, SeriesDescription = '', SeriesNumber, SOPClassUID, FrameOfReferenceUID, wadoRoot, wadoUri, wadoUriRoot, imageId: predecessorImageId } = instance; // The date/time of a display set is the date/time of the instance it shows,
|
|
285
287
|
// chosen from all the attributes that instance carries - for a SEG that is
|
|
286
288
|
// typically the content or structure set date/time rather than the series
|
|
287
289
|
// one, and for a SEG saved into an existing series only the instance level
|
|
288
290
|
// date/time reflects the save.
|
|
289
|
-
const { SeriesDate, SeriesTime } = src
|
|
291
|
+
const { SeriesDate, SeriesTime } = src.utils.getLatestInstanceDateTime(instance);
|
|
290
292
|
Object.assign(displaySet, {
|
|
291
293
|
Modality: 'SEG',
|
|
292
294
|
loading: false,
|
|
@@ -315,7 +317,7 @@ function _extendDisplaySet(displaySet, { servicesManager, extensionManager }) {
|
|
|
315
317
|
wadoUriRoot,
|
|
316
318
|
wadoUri,
|
|
317
319
|
isOverlayDisplaySet: true,
|
|
318
|
-
label: SeriesDescription || `${i18n_src
|
|
320
|
+
label: SeriesDescription || `${i18n_src["default"].t('Series')} ${SeriesNumber} - ${i18n_src["default"].t('SEG')}`
|
|
319
321
|
});
|
|
320
322
|
const referencedSeriesSequence = instance.ReferencedSeriesSequence;
|
|
321
323
|
if (!referencedSeriesSequence) {
|
|
@@ -353,9 +355,9 @@ function _extendDisplaySet(displaySet, { servicesManager, extensionManager }) {
|
|
|
353
355
|
return true;
|
|
354
356
|
}
|
|
355
357
|
function _getDisplaySetsFromSeries(instances, servicesManager, extensionManager) {
|
|
356
|
-
src
|
|
358
|
+
src.utils.sortStudyInstances(instances);
|
|
357
359
|
const displaySet = {
|
|
358
|
-
displaySetInstanceUID: src
|
|
360
|
+
displaySetInstanceUID: src.utils.guid(),
|
|
359
361
|
instances: [
|
|
360
362
|
instances[instances.length - 1]
|
|
361
363
|
]
|
|
@@ -505,7 +507,7 @@ async function _loadSegments({ extensionManager, servicesManager, segDisplaySet
|
|
|
505
507
|
}
|
|
506
508
|
Object.assign(segDisplaySet, results);
|
|
507
509
|
const labelMapImageIds = results.labelMapImages?.flat().map((image)=>image.imageId);
|
|
508
|
-
src
|
|
510
|
+
src.log.debug(SEG_LOAD_LOG_PREFIX, 'SEG parse complete', {
|
|
509
511
|
SOPInstanceUID: segDisplaySet.SOPInstanceUID,
|
|
510
512
|
labelMapImageCount: labelMapImageIds?.length ?? 0,
|
|
511
513
|
labelMapImageIds,
|
|
@@ -805,7 +807,7 @@ const commandsModule = ({ servicesManager, extensionManager, commandsManager })=
|
|
|
805
807
|
const { label } = segment;
|
|
806
808
|
const firstRepresentation = representations[0];
|
|
807
809
|
const color = segmentationService.getSegmentColor(firstRepresentation.viewportId, segmentationId, segment.segmentIndex);
|
|
808
|
-
const RecommendedDisplayCIELabValue = dcmjs_es
|
|
810
|
+
const RecommendedDisplayCIELabValue = dcmjs_es["default"].data.Colors.rgb2DICOMLAB(color.slice(0, 3).map((value)=>value / 255)).map((value)=>Math.round(value));
|
|
809
811
|
metadata[segmentIndex] = {
|
|
810
812
|
SegmentNumber: segmentIndex.toString(),
|
|
811
813
|
SegmentLabel: label,
|
|
@@ -846,7 +848,7 @@ const commandsModule = ({ servicesManager, extensionManager, commandsManager })=
|
|
|
846
848
|
referencedImages = referencedImageIds.map(resolveReferencedImage);
|
|
847
849
|
labelmaps3D = layers.map((layer)=>buildLabelmap3D(layer.imageIds ?? [], metadata, referencedImageIds, layer.labelToSegmentIndex));
|
|
848
850
|
} else {
|
|
849
|
-
const { imageIds, labelToSegmentIndex, layerWithoutImageIds } = cornerstone_src
|
|
851
|
+
const { imageIds, labelToSegmentIndex, layerWithoutImageIds } = cornerstone_src.utils.getSingleLayerExportSource(labelmapData);
|
|
850
852
|
if (layerWithoutImageIds) {
|
|
851
853
|
console.warn(`Labelmap layer ${layerWithoutImageIds.labelmapId} has no image ids. The SEG export uses the segmentation image ids with the label map of that layer.`);
|
|
852
854
|
}
|
|
@@ -863,7 +865,7 @@ const commandsModule = ({ servicesManager, extensionManager, commandsManager })=
|
|
|
863
865
|
// this instance was created whichever series it goes into, whereas a
|
|
864
866
|
// segmentation added to an existing series takes that series' date and
|
|
865
867
|
// time, which the adapter copies from the predecessor instance.
|
|
866
|
-
const { date: creationDate, time: creationTime } = src
|
|
868
|
+
const { date: creationDate, time: creationTime } = src.utils.getCurrentDicomDateTime();
|
|
867
869
|
const saveOptions = {
|
|
868
870
|
predecessorImageId,
|
|
869
871
|
ContentDate: creationDate,
|
|
@@ -874,7 +876,7 @@ const commandsModule = ({ servicesManager, extensionManager, commandsManager })=
|
|
|
874
876
|
},
|
|
875
877
|
...getSegmentationSaveOptions(customizationService, dataSourceStoreOverride),
|
|
876
878
|
...generateOptions,
|
|
877
|
-
...src
|
|
879
|
+
...src.utils.getOhifWriterHeader('@cornerstonejs/adapters', 'CS3D', (/* inlined export .version */"5.18.3"), generateOptions)
|
|
878
880
|
}; // A LABELMAP SEG frame stores a single label per voxel, so the labelmap
|
|
879
881
|
// encoder cannot represent overlapping segments — it keeps only the last
|
|
880
882
|
// layer written to each voxel. Overlapping segmentations arrive here as
|
|
@@ -929,7 +931,7 @@ const commandsModule = ({ servicesManager, extensionManager, commandsManager })=
|
|
|
929
931
|
// first; a generated one goes to `defaultSeriesDescription`, offered last.
|
|
930
932
|
const chosenLabel = labelIsGenerated ? '' : label || '';
|
|
931
933
|
const defaultSeriesDescription = labelIsGenerated && label || (modality === 'RTSTRUCT' ? 'Contours' : 'Segmentation');
|
|
932
|
-
const { value: reportName, dataSourceName, series, seriesNumber, action } = await (0,default_src
|
|
934
|
+
const { value: reportName, dataSourceName, series, seriesNumber, action } = await (0,default_src.createReportDialogPrompt)({
|
|
933
935
|
servicesManager,
|
|
934
936
|
extensionManager,
|
|
935
937
|
predecessorImageId,
|
|
@@ -966,7 +968,7 @@ const commandsModule = ({ servicesManager, extensionManager, commandsManager })=
|
|
|
966
968
|
throw new Error('Error during segmentation generation');
|
|
967
969
|
}
|
|
968
970
|
const { dataset: naturalizedReport } = generatedData; // After the generation, which is what names the series numbered here.
|
|
969
|
-
src
|
|
971
|
+
src.utils.updateNewInstanceMetadata(naturalizedReport); // DCMJS assigns a dummy study id during creation, and this can cause problems, so clearing it out
|
|
970
972
|
if (naturalizedReport.StudyID === 'No Study ID') {
|
|
971
973
|
naturalizedReport.StudyID = '';
|
|
972
974
|
}
|
|
@@ -992,13 +994,13 @@ const commandsModule = ({ servicesManager, extensionManager, commandsManager })=
|
|
|
992
994
|
// whichever series it is stored into. There is no series date/time to
|
|
993
995
|
// supply alongside it: an RTSTRUCT gets one only from the series it is
|
|
994
996
|
// added to, which the adapter copies from the predecessor instance.
|
|
995
|
-
const { date: structureSetDate, time: structureSetTime } = src
|
|
997
|
+
const { date: structureSetDate, time: structureSetTime } = src.utils.getCurrentDicomDateTime();
|
|
996
998
|
const dataset = await generateRTSSFromRepresentation(segmentations, {
|
|
997
999
|
predecessorImageId,
|
|
998
1000
|
StructureSetDate: structureSetDate,
|
|
999
1001
|
StructureSetTime: structureSetTime,
|
|
1000
1002
|
...contourOptions,
|
|
1001
|
-
...src
|
|
1003
|
+
...src.utils.getOhifWriterHeader('@cornerstonejs/adapters', 'CS3D', (/* inlined export .version */"5.18.3"), contourOptions)
|
|
1002
1004
|
});
|
|
1003
1005
|
return {
|
|
1004
1006
|
dataset
|
|
@@ -1017,7 +1019,7 @@ const commandsModule = ({ servicesManager, extensionManager, commandsManager })=
|
|
|
1017
1019
|
await storeFn(dataset);
|
|
1018
1020
|
},
|
|
1019
1021
|
toggleActiveSegmentationUtility: ({ itemId: buttonId })=>{
|
|
1020
|
-
const { uiState, setUIState } = default_src
|
|
1022
|
+
const { uiState, setUIState } = default_src.useUIStateStore.getState();
|
|
1021
1023
|
const isButtonActive = uiState['activeSegmentationUtility'] === buttonId;
|
|
1022
1024
|
console.log('toggleActiveSegmentationUtility', isButtonActive, buttonId); // if the button is active, clear the active segmentation utility
|
|
1023
1025
|
if (isButtonActive) {
|
|
@@ -1110,7 +1112,7 @@ function SegmentSelector(t0) {
|
|
|
1110
1112
|
const $ = (0,compiler_runtime.c)(25);
|
|
1111
1113
|
const { label, value, onValueChange, segments, placeholder: t1 } = t0;
|
|
1112
1114
|
const placeholder = t1 === undefined ? "Select a segment" : t1;
|
|
1113
|
-
const { t } = (0,es
|
|
1115
|
+
const { t } = (0,es.useTranslation)("SegmentationPanel");
|
|
1114
1116
|
let t2;
|
|
1115
1117
|
if ($[0] !== label) {
|
|
1116
1118
|
t2 = /*#__PURE__*/ (0,jsx_runtime.jsx)("div", {
|
|
@@ -1142,7 +1144,7 @@ function SegmentSelector(t0) {
|
|
|
1142
1144
|
}
|
|
1143
1145
|
let t7;
|
|
1144
1146
|
if ($[7] !== t6) {
|
|
1145
|
-
t7 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1147
|
+
t7 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.SelectValue, {
|
|
1146
1148
|
placeholder: t6
|
|
1147
1149
|
});
|
|
1148
1150
|
$[7] = t6;
|
|
@@ -1152,7 +1154,7 @@ function SegmentSelector(t0) {
|
|
|
1152
1154
|
}
|
|
1153
1155
|
let t8;
|
|
1154
1156
|
if ($[9] !== t5 || $[10] !== t7) {
|
|
1155
|
-
t8 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1157
|
+
t8 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.SelectTrigger, {
|
|
1156
1158
|
className: "overflow-hidden",
|
|
1157
1159
|
"data-cy": t5,
|
|
1158
1160
|
children: t7
|
|
@@ -1173,7 +1175,7 @@ function SegmentSelector(t0) {
|
|
|
1173
1175
|
}
|
|
1174
1176
|
let t10;
|
|
1175
1177
|
if ($[14] !== t9) {
|
|
1176
|
-
t10 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1178
|
+
t10 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.SelectContent, {
|
|
1177
1179
|
children: t9
|
|
1178
1180
|
});
|
|
1179
1181
|
$[14] = t9;
|
|
@@ -1183,7 +1185,7 @@ function SegmentSelector(t0) {
|
|
|
1183
1185
|
}
|
|
1184
1186
|
let t11;
|
|
1185
1187
|
if ($[16] !== onValueChange || $[17] !== t10 || $[18] !== t3 || $[19] !== t8 || $[20] !== value) {
|
|
1186
|
-
t11 = /*#__PURE__*/ (0,jsx_runtime.jsxs)(ui_next_src
|
|
1188
|
+
t11 = /*#__PURE__*/ (0,jsx_runtime.jsxs)(ui_next_src.Select, {
|
|
1187
1189
|
onValueChange: onValueChange,
|
|
1188
1190
|
value: value,
|
|
1189
1191
|
children: [
|
|
@@ -1218,17 +1220,17 @@ function SegmentSelector(t0) {
|
|
|
1218
1220
|
return t12;
|
|
1219
1221
|
}
|
|
1220
1222
|
function _temp(segment) {
|
|
1221
|
-
return /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1223
|
+
return /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.SelectItem, {
|
|
1222
1224
|
value: segment.segmentIndex.toString(),
|
|
1223
1225
|
children: segment.label
|
|
1224
1226
|
}, segment.segmentIndex);
|
|
1225
1227
|
}
|
|
1226
1228
|
function LogicalContourOperationOptions() {
|
|
1227
1229
|
const $ = (0,compiler_runtime.c)(74);
|
|
1228
|
-
const { servicesManager } = (0,src
|
|
1230
|
+
const { servicesManager } = (0,src.useSystem)();
|
|
1229
1231
|
const { segmentationService } = servicesManager.services;
|
|
1230
|
-
const { t } = (0,es
|
|
1231
|
-
const { segmentationsWithRepresentations } = (0,cornerstone_src
|
|
1232
|
+
const { t } = (0,es.useTranslation)("SegmentationPanel");
|
|
1233
|
+
const { segmentationsWithRepresentations } = (0,cornerstone_src.useActiveViewportSegmentationRepresentations)();
|
|
1232
1234
|
const activeRepresentation = segmentationsWithRepresentations?.find(_temp2);
|
|
1233
1235
|
const segments = activeRepresentation ? Object.values(activeRepresentation.segmentation.segments) : [];
|
|
1234
1236
|
const nextSegmentIndex = activeRepresentation ? segmentationService.getNextAvailableSegmentIndex(activeRepresentation.segmentation.segmentationId) : 1;
|
|
@@ -1274,7 +1276,7 @@ function LogicalContourOperationOptions() {
|
|
|
1274
1276
|
t3 = $[5];
|
|
1275
1277
|
}
|
|
1276
1278
|
(0,react.useEffect)(t2, t3);
|
|
1277
|
-
const runCommand = (0,src
|
|
1279
|
+
const runCommand = (0,src.useRunCommand)();
|
|
1278
1280
|
let t4;
|
|
1279
1281
|
if ($[6] !== createNewSegment || $[7] !== newSegmentName || $[8] !== nextSegmentIndex || $[9] !== operation.logicalOperation || $[10] !== runCommand || $[11] !== segmentA || $[12] !== segmentB || $[13] !== segmentationId) {
|
|
1280
1282
|
t4 = ()=>{
|
|
@@ -1323,11 +1325,11 @@ function LogicalContourOperationOptions() {
|
|
|
1323
1325
|
if ($[15] !== setOperation) {
|
|
1324
1326
|
t6 = LogicalContourOperationsOptions_options.map((option)=>{
|
|
1325
1327
|
const { value, icon } = option;
|
|
1326
|
-
return /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1328
|
+
return /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.TabsTrigger, {
|
|
1327
1329
|
value: value,
|
|
1328
1330
|
onClick: ()=>setOperation(option),
|
|
1329
1331
|
"data-cy": `logical-contour-operation-${value}`,
|
|
1330
|
-
children: /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1332
|
+
children: /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Icons.ByName, {
|
|
1331
1333
|
name: icon
|
|
1332
1334
|
})
|
|
1333
1335
|
}, `logical-contour-operation-${value}`);
|
|
@@ -1339,7 +1341,7 @@ function LogicalContourOperationOptions() {
|
|
|
1339
1341
|
}
|
|
1340
1342
|
let t7;
|
|
1341
1343
|
if ($[17] !== t6) {
|
|
1342
|
-
t7 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1344
|
+
t7 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.TabsList, {
|
|
1343
1345
|
className: "inline-flex space-x-1",
|
|
1344
1346
|
children: t6
|
|
1345
1347
|
});
|
|
@@ -1350,7 +1352,7 @@ function LogicalContourOperationOptions() {
|
|
|
1350
1352
|
}
|
|
1351
1353
|
let t8;
|
|
1352
1354
|
if ($[19] !== operation.value || $[20] !== t7) {
|
|
1353
|
-
t8 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1355
|
+
t8 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Tabs, {
|
|
1354
1356
|
value: t5,
|
|
1355
1357
|
children: t7
|
|
1356
1358
|
});
|
|
@@ -1398,7 +1400,7 @@ function LogicalContourOperationOptions() {
|
|
|
1398
1400
|
if ($[30] !== operation.helperIcon) {
|
|
1399
1401
|
t12 = /*#__PURE__*/ (0,jsx_runtime.jsx)("div", {
|
|
1400
1402
|
className: "bg-muted flex h-[62px] w-[88px] items-center justify-center rounded-lg",
|
|
1401
|
-
children: /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1403
|
+
children: /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Icons.ByName, {
|
|
1402
1404
|
name: operation.helperIcon
|
|
1403
1405
|
})
|
|
1404
1406
|
});
|
|
@@ -1473,7 +1475,7 @@ function LogicalContourOperationOptions() {
|
|
|
1473
1475
|
if ($[46] !== t16 || $[47] !== t17) {
|
|
1474
1476
|
t18 = /*#__PURE__*/ (0,jsx_runtime.jsx)("div", {
|
|
1475
1477
|
className: "flex justify-end pl-[34px]",
|
|
1476
|
-
children: /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1478
|
+
children: /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Button, {
|
|
1477
1479
|
"data-cy": "apply-logical-contour-operation",
|
|
1478
1480
|
className: "border-primary/60 grow border",
|
|
1479
1481
|
variant: "ghost",
|
|
@@ -1489,7 +1491,7 @@ function LogicalContourOperationOptions() {
|
|
|
1489
1491
|
}
|
|
1490
1492
|
let t19;
|
|
1491
1493
|
if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1492
|
-
t19 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1494
|
+
t19 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Separator, {
|
|
1493
1495
|
className: "bg-input mt-2 h-[1px]"
|
|
1494
1496
|
});
|
|
1495
1497
|
$[49] = t19;
|
|
@@ -1498,7 +1500,7 @@ function LogicalContourOperationOptions() {
|
|
|
1498
1500
|
}
|
|
1499
1501
|
let t20;
|
|
1500
1502
|
if ($[50] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1501
|
-
t20 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1503
|
+
t20 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Switch, {
|
|
1502
1504
|
id: "logical-contour-operations-create-new-segment-switch",
|
|
1503
1505
|
"data-cy": "logical-contour-create-new-segment-switch",
|
|
1504
1506
|
onCheckedChange: setCreateNewSegment
|
|
@@ -1521,7 +1523,7 @@ function LogicalContourOperationOptions() {
|
|
|
1521
1523
|
className: "flex items-center justify-start gap-2",
|
|
1522
1524
|
children: [
|
|
1523
1525
|
t20,
|
|
1524
|
-
/*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1526
|
+
/*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Label, {
|
|
1525
1527
|
htmlFor: "logical-contour-operations-create-new-segment-switch",
|
|
1526
1528
|
children: t21
|
|
1527
1529
|
})
|
|
@@ -1561,7 +1563,7 @@ function LogicalContourOperationOptions() {
|
|
|
1561
1563
|
if ($[60] !== newSegmentName || $[61] !== t24 || $[62] !== t25 || $[63] !== t26) {
|
|
1562
1564
|
t28 = /*#__PURE__*/ (0,jsx_runtime.jsx)("div", {
|
|
1563
1565
|
className: "pl-9",
|
|
1564
|
-
children: /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1566
|
+
children: /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Input, {
|
|
1565
1567
|
className: t24,
|
|
1566
1568
|
disabled: t25,
|
|
1567
1569
|
id: "logical-contour-operations-create-new-segment-input",
|
|
@@ -1637,8 +1639,8 @@ function _temp2(t0) {
|
|
|
1637
1639
|
function SimplifyContourOptions() {
|
|
1638
1640
|
const $ = (0,compiler_runtime.c)(60);
|
|
1639
1641
|
const [areaThreshold, setAreaThreshold] = (0,react.useState)(10);
|
|
1640
|
-
const runCommand = (0,src
|
|
1641
|
-
const { t } = (0,es
|
|
1642
|
+
const runCommand = (0,src.useRunCommand)();
|
|
1643
|
+
const { t } = (0,es.useTranslation)("SegmentationPanel");
|
|
1642
1644
|
let t0;
|
|
1643
1645
|
if ($[0] !== t) {
|
|
1644
1646
|
t0 = t("Fill contour holes");
|
|
@@ -1677,7 +1679,7 @@ function SimplifyContourOptions() {
|
|
|
1677
1679
|
}
|
|
1678
1680
|
let t4;
|
|
1679
1681
|
if ($[8] !== t2 || $[9] !== t3) {
|
|
1680
|
-
t4 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1682
|
+
t4 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Button, {
|
|
1681
1683
|
className: "border-primary/60 border",
|
|
1682
1684
|
variant: "ghost",
|
|
1683
1685
|
onClick: t2,
|
|
@@ -1691,7 +1693,7 @@ function SimplifyContourOptions() {
|
|
|
1691
1693
|
}
|
|
1692
1694
|
let t5;
|
|
1693
1695
|
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1694
|
-
t5 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1696
|
+
t5 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Separator, {
|
|
1695
1697
|
className: "bg-input mt-[20px] h-[1px]"
|
|
1696
1698
|
});
|
|
1697
1699
|
$[11] = t5;
|
|
@@ -1742,7 +1744,7 @@ function SimplifyContourOptions() {
|
|
|
1742
1744
|
}
|
|
1743
1745
|
let t10;
|
|
1744
1746
|
if ($[21] !== t9) {
|
|
1745
|
-
t10 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1747
|
+
t10 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Label, {
|
|
1746
1748
|
htmlFor: "simplify-contour-options",
|
|
1747
1749
|
className: "text-muted-foreground",
|
|
1748
1750
|
children: t9
|
|
@@ -1761,7 +1763,7 @@ function SimplifyContourOptions() {
|
|
|
1761
1763
|
}
|
|
1762
1764
|
let t12;
|
|
1763
1765
|
if ($[24] !== areaThreshold) {
|
|
1764
|
-
t12 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1766
|
+
t12 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Input, {
|
|
1765
1767
|
id: "simplify-contour-options",
|
|
1766
1768
|
className: "w-20",
|
|
1767
1769
|
type: "number",
|
|
@@ -1811,7 +1813,7 @@ function SimplifyContourOptions() {
|
|
|
1811
1813
|
}
|
|
1812
1814
|
let t16;
|
|
1813
1815
|
if ($[34] !== t14 || $[35] !== t15) {
|
|
1814
|
-
t16 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1816
|
+
t16 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Button, {
|
|
1815
1817
|
className: "border-primary/60 border",
|
|
1816
1818
|
variant: "ghost",
|
|
1817
1819
|
onClick: t14,
|
|
@@ -1825,7 +1827,7 @@ function SimplifyContourOptions() {
|
|
|
1825
1827
|
}
|
|
1826
1828
|
let t17;
|
|
1827
1829
|
if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1828
|
-
t17 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1830
|
+
t17 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Separator, {
|
|
1829
1831
|
className: "bg-input mt-[20px] h-[1px]"
|
|
1830
1832
|
});
|
|
1831
1833
|
$[37] = t17;
|
|
@@ -1888,7 +1890,7 @@ function SimplifyContourOptions() {
|
|
|
1888
1890
|
}
|
|
1889
1891
|
let t23;
|
|
1890
1892
|
if ($[50] !== t21 || $[51] !== t22) {
|
|
1891
|
-
t23 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1893
|
+
t23 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Button, {
|
|
1892
1894
|
className: "border-primary/60 border",
|
|
1893
1895
|
variant: "ghost",
|
|
1894
1896
|
onClick: t21,
|
|
@@ -1945,8 +1947,8 @@ function SimplifyContourOptions() {
|
|
|
1945
1947
|
|
|
1946
1948
|
function SmoothContoursOptions() {
|
|
1947
1949
|
const $ = (0,compiler_runtime.c)(32);
|
|
1948
|
-
const runCommand = (0,src
|
|
1949
|
-
const { t } = (0,es
|
|
1950
|
+
const runCommand = (0,src.useRunCommand)();
|
|
1951
|
+
const { t } = (0,es.useTranslation)("SegmentationPanel");
|
|
1950
1952
|
let t0;
|
|
1951
1953
|
if ($[0] !== t) {
|
|
1952
1954
|
t0 = t("Smooth all edges");
|
|
@@ -1985,7 +1987,7 @@ function SmoothContoursOptions() {
|
|
|
1985
1987
|
}
|
|
1986
1988
|
let t4;
|
|
1987
1989
|
if ($[8] !== t2 || $[9] !== t3) {
|
|
1988
|
-
t4 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
1990
|
+
t4 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Button, {
|
|
1989
1991
|
className: "border-primary/60 border",
|
|
1990
1992
|
variant: "ghost",
|
|
1991
1993
|
onClick: t2,
|
|
@@ -1999,7 +2001,7 @@ function SmoothContoursOptions() {
|
|
|
1999
2001
|
}
|
|
2000
2002
|
let t5;
|
|
2001
2003
|
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2002
|
-
t5 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
2004
|
+
t5 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Separator, {
|
|
2003
2005
|
className: "bg-input mt-[20px] h-[1px]"
|
|
2004
2006
|
});
|
|
2005
2007
|
$[11] = t5;
|
|
@@ -2060,7 +2062,7 @@ function SmoothContoursOptions() {
|
|
|
2060
2062
|
}
|
|
2061
2063
|
let t11;
|
|
2062
2064
|
if ($[23] !== t10 || $[24] !== t9) {
|
|
2063
|
-
t11 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src
|
|
2065
|
+
t11 = /*#__PURE__*/ (0,jsx_runtime.jsx)(ui_next_src.Button, {
|
|
2064
2066
|
className: "border-primary/60 border",
|
|
2065
2067
|
variant: "ghost",
|
|
2066
2068
|
onClick: t9,
|
|
@@ -2131,7 +2133,7 @@ function getToolbarModule({ servicesManager }) {
|
|
|
2131
2133
|
{
|
|
2132
2134
|
name: 'cornerstone.isActiveSegmentationUtility',
|
|
2133
2135
|
evaluate: ({ button })=>{
|
|
2134
|
-
const { uiState } = default_src
|
|
2136
|
+
const { uiState } = default_src.useUIStateStore.getState();
|
|
2135
2137
|
return {
|
|
2136
2138
|
isActive: uiState[`activeSegmentationUtility`] === button.id
|
|
2137
2139
|
};
|
|
@@ -2153,7 +2155,7 @@ function getToolbarModule({ servicesManager }) {
|
|
|
2153
2155
|
if (!segmentations?.length) {
|
|
2154
2156
|
return {
|
|
2155
2157
|
disabled: true,
|
|
2156
|
-
disabledText: i18n_src
|
|
2158
|
+
disabledText: i18n_src["default"].t('SegmentationPanel:No segmentations available')
|
|
2157
2159
|
};
|
|
2158
2160
|
}
|
|
2159
2161
|
if (!segmentations.some((segmentation)=>Boolean(segmentation.type === segmentationRepresentationType))) {
|
|
@@ -2174,21 +2176,21 @@ function getToolbarModule({ servicesManager }) {
|
|
|
2174
2176
|
if (!segmentations?.length) {
|
|
2175
2177
|
return {
|
|
2176
2178
|
disabled: true,
|
|
2177
|
-
disabledText: disabledText ?? i18n_src
|
|
2179
|
+
disabledText: disabledText ?? i18n_src["default"].t('SegmentationPanel:No segmentations available')
|
|
2178
2180
|
};
|
|
2179
2181
|
}
|
|
2180
2182
|
const activeSegmentation = segmentationService.getActiveSegmentation(viewportId);
|
|
2181
2183
|
if (!Object.keys(activeSegmentation.segments).length) {
|
|
2182
2184
|
return {
|
|
2183
2185
|
disabled: true,
|
|
2184
|
-
disabledText: i18n_src
|
|
2186
|
+
disabledText: i18n_src["default"].t('SegmentationPanel:Add segment to enable this tool')
|
|
2185
2187
|
};
|
|
2186
2188
|
}
|
|
2187
2189
|
const toolGroup = toolGroupService.getToolGroupForViewport(viewportId);
|
|
2188
2190
|
if (!toolGroup) {
|
|
2189
2191
|
return {
|
|
2190
2192
|
disabled: true,
|
|
2191
|
-
disabledText: disabledText ?? i18n_src
|
|
2193
|
+
disabledText: disabledText ?? i18n_src["default"].t('SegmentationPanel:Not available on the current viewport')
|
|
2192
2194
|
};
|
|
2193
2195
|
}
|
|
2194
2196
|
if (!toolNames) {
|
|
@@ -2200,7 +2202,7 @@ function getToolbarModule({ servicesManager }) {
|
|
|
2200
2202
|
if (!toolGroup.hasTool(toolName) && !toolNames) {
|
|
2201
2203
|
return {
|
|
2202
2204
|
disabled: true,
|
|
2203
|
-
disabledText: disabledText ?? i18n_src
|
|
2205
|
+
disabledText: disabledText ?? i18n_src["default"].t('SegmentationPanel:Not available on the current viewport')
|
|
2204
2206
|
};
|
|
2205
2207
|
}
|
|
2206
2208
|
const isPrimaryActive = toolNames ? toolNames.includes(toolGroup.getActivePrimaryMouseButtonTool()) : toolGroup.getActivePrimaryMouseButtonTool() === toolName;
|