@ohif/app 3.13.0-beta.112 → 3.13.0-beta.114

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.
Files changed (45) hide show
  1. package/dist/{100.bundle.1d81cd3f544858b4.js → 100.bundle.1906f9ae2b66fe58.js} +2 -2
  2. package/dist/{1180.bundle.97e5d7ddb822ada4.js → 1180.bundle.b85ba446cfbf82a9.js} +2 -2
  3. package/dist/{1206.bundle.79ed23079c78f18d.js → 1206.bundle.ecd5aaaca8466ba5.js} +2 -2
  4. package/dist/{1602.bundle.15b448aa8a33f8a3.js → 1602.bundle.58c538f4cfeafc04.js} +4 -4
  5. package/dist/{2779.bundle.d1c8eeb441bf6838.js → 2779.bundle.c50d9f70f57151a4.js} +2 -2
  6. package/dist/{3500.bundle.bff323e7296c7475.js → 3500.bundle.8820a8fab7c4144a.js} +3 -3
  7. package/dist/{3760.bundle.68517e3fbaba0870.js → 3760.bundle.1368166ffc784155.js} +4 -4
  8. package/dist/419.bundle.ba9f959dac4b65e6.js +655 -0
  9. package/dist/{4834.bundle.20712369635ca3b2.js → 4834.bundle.3f085ea647712366.js} +2 -2
  10. package/dist/{5189.bundle.86d3023e7ec28a8f.js → 5189.bundle.bf053e2e1c064914.js} +2 -2
  11. package/dist/{5448.bundle.8cda5b8e4baea275.js → 5448.bundle.1e50777e4c4e122a.js} +1 -1
  12. package/dist/{5696.bundle.a5a7fcaf46e722bd.js → 5696.bundle.d1858642ec96621b.js} +3 -3
  13. package/dist/{5708.bundle.8edb607ae04123db.js → 5708.bundle.07d7d136db71e3ab.js} +4 -4
  14. package/dist/{5910.bundle.c1199bd45e450735.js → 5910.bundle.5561806884c95754.js} +4 -4
  15. package/dist/{6001.bundle.db54385151503e3c.js → 6001.bundle.ab43bf3ef3da02d8.js} +4 -4
  16. package/dist/{7231.bundle.791409f68df0de05.js → 7231.bundle.32e096be83a5dece.js} +8 -6
  17. package/dist/{7248.bundle.b80f39a298a52d10.js → 7248.bundle.eeca01cd07f51f10.js} +5 -5
  18. package/dist/{7295.bundle.39a66efa759102bc.js → 7295.bundle.48faa19b4a5dea0d.js} +6 -6
  19. package/dist/{7463.bundle.afe57ad10829df20.js → 7463.bundle.40668aa8d083d077.js} +2 -2
  20. package/dist/{414.bundle.b80930f5525e536f.js → 7701.bundle.239da7c786e962d9.js} +665 -17
  21. package/dist/{8007.bundle.a3ae96f72b3cc798.js → 8007.bundle.a74956fc12c00f19.js} +18 -12
  22. package/dist/{8423.bundle.11056402679417e0.js → 8423.bundle.6b8ba4230cea3d67.js} +2 -2
  23. package/dist/{8832.bundle.96a209e4a82b6bf4.js → 8832.bundle.e859fea13db9f852.js} +3 -3
  24. package/dist/{899.bundle.6f855ae8df39327e.js → 899.bundle.221329ac8cec3022.js} +2 -2
  25. package/dist/{9068.bundle.29adebcfccb4bc8e.js → 9068.bundle.cd36fcb4e15a153e.js} +4 -4
  26. package/dist/{9116.bundle.72e18d59d3438606.js → 9116.bundle.212df93fa6c89fd5.js} +2 -2
  27. package/dist/{9415.bundle.fca81f7700036325.js → 9415.bundle.cec5bad019e1e0bf.js} +4 -4
  28. package/dist/{9437.bundle.645c37102d332184.js → 9437.bundle.c2beadb9d2b9501e.js} +2 -2
  29. package/dist/app-config.js +42 -251
  30. package/dist/{app.bundle.b346ed66e95b76d0.js → app.bundle.abf5c231a1b49748.js} +2470 -148
  31. package/dist/customizations/ctPresets.jsonc +21 -0
  32. package/dist/customizations/measurementLabels.jsonc +23 -0
  33. package/dist/customizations/patientBirthDate.jsonc +34 -0
  34. package/dist/customizations/smoothRotate.jsonc +42 -0
  35. package/dist/customizations/veterinary.jsonc +5 -0
  36. package/dist/customizations/veterinaryOverlay.jsonc +56 -0
  37. package/dist/index.html +1 -1
  38. package/dist/sw.js +2 -2
  39. package/package.json +5 -5
  40. package/dist/2666.bundle.e54d0f68887f43d2.js +0 -1271
  41. /package/dist/{379.bundle.75b0fb722268f037.js → 379.bundle.4b932c0de4372bc3.js} +0 -0
  42. /package/dist/{4556.bundle.29d68aff99e72e43.js → 4556.bundle.43fbd01f60119590.js} +0 -0
  43. /package/dist/{4683.bundle.0b47cae7de79e58c.js → 4683.bundle.42b75d856c409bef.js} +0 -0
  44. /package/dist/{6650.bundle.defab1d01ae0dcba.js → 6650.bundle.ac76eb90d6f8a353.js} +0 -0
  45. /package/dist/{9290.bundle.5a06e5f28e5dad94.js → 9290.bundle.e966b25e072adc22.js} +0 -0
@@ -0,0 +1,655 @@
1
+ "use strict";
2
+ (globalThis["rspackChunk"] = globalThis["rspackChunk"] || []).push([[419], {
3
+ 86750(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
4
+
5
+ // EXPORTS
6
+ __webpack_require__.d(__webpack_exports__, {
7
+ xT: () => (/* binding */ basicLayout),
8
+ o2: () => (/* binding */ basicRoute),
9
+ Nu: () => (/* binding */ cornerstone),
10
+ "default": () => (/* binding */ basic_src),
11
+ V6: () => (/* binding */ dicomRT),
12
+ tR: () => (/* binding */ extensionDependencies),
13
+ Mq: () => (/* binding */ mode),
14
+ dw: () => (/* binding */ src_modeInstance),
15
+ Dt: () => (/* binding */ ohif),
16
+ b2: () => (/* binding */ segmentation)
17
+ });
18
+
19
+ // UNUSED EXPORTS: NON_IMAGE_MODALITIES, dicomPmap, dicomSeg, dicomecg, dicompdf, dicomsr, dicomvideo, initToolGroups, isValidMode, layoutTemplate, modeFactory, onModeEnter, onModeExit, sopClassHandlers
20
+
21
+ // EXTERNAL MODULE: ../../../node_modules/immutability-helper/index.js
22
+ var immutability_helper = __webpack_require__(1752);
23
+ var immutability_helper_default = /*#__PURE__*/__webpack_require__.n(immutability_helper);
24
+ // EXTERNAL MODULE: ../../core/src/index.ts + 75 modules
25
+ var src = __webpack_require__(50679);
26
+ ;// CONCATENATED MODULE: ../../../modes/basic/src/initToolGroups.ts
27
+ const colours = {
28
+ 'viewport-0': 'rgb(200, 0, 0)',
29
+ 'viewport-1': 'rgb(200, 200, 0)',
30
+ 'viewport-2': 'rgb(0, 200, 0)'
31
+ };
32
+ const colorsByOrientation = {
33
+ axial: 'rgb(200, 0, 0)',
34
+ sagittal: 'rgb(200, 200, 0)',
35
+ coronal: 'rgb(0, 200, 0)'
36
+ };
37
+ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, toolGroupId) {
38
+ const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
39
+ const {
40
+ toolNames,
41
+ Enums
42
+ } = utilityModule.exports;
43
+ const tools = {
44
+ active: [{
45
+ toolName: toolNames.WindowLevel,
46
+ bindings: [{
47
+ mouseButton: Enums.MouseBindings.Primary
48
+ }]
49
+ }, {
50
+ toolName: toolNames.Pan,
51
+ bindings: [{
52
+ mouseButton: Enums.MouseBindings.Auxiliary
53
+ }]
54
+ }, {
55
+ toolName: toolNames.Zoom,
56
+ bindings: [{
57
+ mouseButton: Enums.MouseBindings.Secondary
58
+ }, {
59
+ numTouchPoints: 2
60
+ }]
61
+ }, {
62
+ toolName: toolNames.StackScroll,
63
+ bindings: [{
64
+ mouseButton: Enums.MouseBindings.Wheel
65
+ }, {
66
+ numTouchPoints: 3
67
+ }]
68
+ }],
69
+ passive: [{
70
+ toolName: toolNames.Length
71
+ }, {
72
+ toolName: toolNames.ArrowAnnotate,
73
+ configuration: {
74
+ getTextCallback: (callback, eventDetails) => {
75
+ commandsManager.runCommand('arrowTextCallback', {
76
+ callback,
77
+ eventDetails
78
+ });
79
+ },
80
+ changeTextCallback: (data, eventDetails, callback) => {
81
+ commandsManager.runCommand('arrowTextCallback', {
82
+ callback,
83
+ data,
84
+ eventDetails
85
+ });
86
+ }
87
+ }
88
+ }, {
89
+ toolName: toolNames.SegmentBidirectional
90
+ }, {
91
+ toolName: toolNames.Bidirectional
92
+ }, {
93
+ toolName: toolNames.DragProbe
94
+ }, {
95
+ toolName: toolNames.Probe
96
+ }, {
97
+ toolName: toolNames.EllipticalROI
98
+ }, {
99
+ toolName: toolNames.CircleROI
100
+ }, {
101
+ toolName: toolNames.RectangleROI
102
+ }, {
103
+ toolName: toolNames.StackScroll
104
+ }, {
105
+ toolName: toolNames.Angle
106
+ }, {
107
+ toolName: toolNames.CobbAngle
108
+ }, {
109
+ toolName: toolNames.Magnify
110
+ }, {
111
+ toolName: toolNames.PlanarRotate
112
+ }, {
113
+ toolName: toolNames.CalibrationLine
114
+ }, {
115
+ toolName: toolNames.PlanarFreehandContourSegmentation,
116
+ configuration: {
117
+ displayOnePointAsCrosshairs: true
118
+ }
119
+ }, {
120
+ toolName: toolNames.UltrasoundDirectional
121
+ }, {
122
+ toolName: toolNames.PlanarFreehandROI
123
+ }, {
124
+ toolName: toolNames.SplineROI
125
+ }, {
126
+ toolName: toolNames.LivewireContour
127
+ }, {
128
+ toolName: toolNames.WindowLevelRegion
129
+ }],
130
+ enabled: [{
131
+ toolName: toolNames.ImageOverlayViewer
132
+ }, {
133
+ toolName: toolNames.ReferenceLines
134
+ }],
135
+ disabled: [{
136
+ toolName: toolNames.AdvancedMagnify
137
+ }]
138
+ };
139
+ const updatedTools = commandsManager.run('initializeSegmentLabelTool', {
140
+ tools
141
+ });
142
+ toolGroupService.createToolGroupAndAddTools(toolGroupId, updatedTools);
143
+ }
144
+ function initSRToolGroup(extensionManager, toolGroupService) {
145
+ const SRUtilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone-dicom-sr.utilityModule.tools');
146
+ if (!SRUtilityModule) {
147
+ return;
148
+ }
149
+ const CS3DUtilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
150
+ const {
151
+ toolNames: SRToolNames
152
+ } = SRUtilityModule.exports;
153
+ const {
154
+ toolNames,
155
+ Enums
156
+ } = CS3DUtilityModule.exports;
157
+ const tools = {
158
+ active: [{
159
+ toolName: toolNames.WindowLevel,
160
+ bindings: [{
161
+ mouseButton: Enums.MouseBindings.Primary
162
+ }]
163
+ }, {
164
+ toolName: toolNames.Pan,
165
+ bindings: [{
166
+ mouseButton: Enums.MouseBindings.Auxiliary
167
+ }]
168
+ }, {
169
+ toolName: toolNames.Zoom,
170
+ bindings: [{
171
+ mouseButton: Enums.MouseBindings.Secondary
172
+ }, {
173
+ numTouchPoints: 2
174
+ }]
175
+ }, {
176
+ toolName: toolNames.StackScroll,
177
+ bindings: [{
178
+ mouseButton: Enums.MouseBindings.Wheel
179
+ }, {
180
+ numTouchPoints: 3
181
+ }]
182
+ }],
183
+ passive: [{
184
+ toolName: SRToolNames.SRLength
185
+ }, {
186
+ toolName: SRToolNames.SRArrowAnnotate
187
+ }, {
188
+ toolName: SRToolNames.SRBidirectional
189
+ }, {
190
+ toolName: SRToolNames.SREllipticalROI
191
+ }, {
192
+ toolName: SRToolNames.SRCircleROI
193
+ }, {
194
+ toolName: SRToolNames.SRPlanarFreehandROI
195
+ }, {
196
+ toolName: SRToolNames.SRRectangleROI
197
+ }, {
198
+ toolName: toolNames.WindowLevelRegion
199
+ }],
200
+ enabled: [{
201
+ toolName: SRToolNames.DICOMSRDisplay
202
+ }]
203
+ // disabled
204
+ };
205
+ const toolGroupId = 'SRToolGroup';
206
+ toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
207
+ }
208
+ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
209
+ const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
210
+ const serviceManager = extensionManager._servicesManager;
211
+ const {
212
+ cornerstoneViewportService
213
+ } = serviceManager.services;
214
+ const {
215
+ toolNames,
216
+ Enums
217
+ } = utilityModule.exports;
218
+ const tools = {
219
+ active: [{
220
+ toolName: toolNames.WindowLevel,
221
+ bindings: [{
222
+ mouseButton: Enums.MouseBindings.Primary
223
+ }]
224
+ }, {
225
+ toolName: toolNames.Pan,
226
+ bindings: [{
227
+ mouseButton: Enums.MouseBindings.Auxiliary
228
+ }]
229
+ }, {
230
+ toolName: toolNames.Zoom,
231
+ bindings: [{
232
+ mouseButton: Enums.MouseBindings.Secondary
233
+ }, {
234
+ numTouchPoints: 2
235
+ }]
236
+ }, {
237
+ toolName: toolNames.StackScroll,
238
+ bindings: [{
239
+ mouseButton: Enums.MouseBindings.Wheel
240
+ }, {
241
+ numTouchPoints: 3
242
+ }]
243
+ }],
244
+ passive: [{
245
+ toolName: toolNames.Length
246
+ }, {
247
+ toolName: toolNames.ArrowAnnotate,
248
+ configuration: {
249
+ getTextCallback: (callback, eventDetails) => {
250
+ commandsManager.runCommand('arrowTextCallback', {
251
+ callback,
252
+ eventDetails
253
+ });
254
+ },
255
+ changeTextCallback: (data, eventDetails, callback) => {
256
+ commandsManager.runCommand('arrowTextCallback', {
257
+ callback,
258
+ data,
259
+ eventDetails
260
+ });
261
+ }
262
+ }
263
+ }, {
264
+ toolName: toolNames.Bidirectional
265
+ }, {
266
+ toolName: toolNames.DragProbe
267
+ }, {
268
+ toolName: toolNames.Probe
269
+ }, {
270
+ toolName: toolNames.EllipticalROI
271
+ }, {
272
+ toolName: toolNames.CircleROI
273
+ }, {
274
+ toolName: toolNames.RectangleROI
275
+ }, {
276
+ toolName: toolNames.StackScroll
277
+ }, {
278
+ toolName: toolNames.Angle
279
+ }, {
280
+ toolName: toolNames.CobbAngle
281
+ }, {
282
+ toolName: toolNames.PlanarFreehandROI
283
+ }, {
284
+ toolName: toolNames.SplineROI
285
+ }, {
286
+ toolName: toolNames.LivewireContour
287
+ }, {
288
+ toolName: toolNames.WindowLevelRegion
289
+ }, {
290
+ toolName: toolNames.PlanarFreehandContourSegmentation,
291
+ configuration: {
292
+ displayOnePointAsCrosshairs: true
293
+ }
294
+ }],
295
+ disabled: [{
296
+ toolName: toolNames.Crosshairs,
297
+ bindings: [{
298
+ mouseButton: Enums.MouseBindings.Primary,
299
+ modifierKey: Enums.KeyboardBindings.Shift
300
+ }],
301
+ configuration: {
302
+ viewportIndicators: true,
303
+ viewportIndicatorsConfig: {
304
+ circleRadius: 5,
305
+ xOffset: 0.95,
306
+ yOffset: 0.05
307
+ },
308
+ autoPan: {
309
+ enabled: false,
310
+ panSize: 10
311
+ },
312
+ getReferenceLineColor: viewportId => {
313
+ const viewportInfo = cornerstoneViewportService.getViewportInfo(viewportId);
314
+ const viewportOptions = viewportInfo?.viewportOptions;
315
+ if (viewportOptions) {
316
+ return colours[viewportOptions.id] || colorsByOrientation[viewportOptions.orientation] || '#0c0';
317
+ } else {
318
+ console.warn('missing viewport?', viewportId);
319
+ return '#0c0';
320
+ }
321
+ }
322
+ }
323
+ }, {
324
+ toolName: toolNames.AdvancedMagnify
325
+ }, {
326
+ toolName: toolNames.ReferenceLines
327
+ }]
328
+ };
329
+ toolGroupService.createToolGroupAndAddTools('mpr', tools);
330
+ }
331
+ function initVolume3DToolGroup(extensionManager, toolGroupService) {
332
+ const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
333
+ const {
334
+ toolNames,
335
+ Enums
336
+ } = utilityModule.exports;
337
+ const tools = {
338
+ active: [{
339
+ toolName: toolNames.TrackballRotateTool,
340
+ bindings: [{
341
+ mouseButton: Enums.MouseBindings.Primary
342
+ }]
343
+ }, {
344
+ toolName: toolNames.Zoom,
345
+ bindings: [{
346
+ mouseButton: Enums.MouseBindings.Secondary
347
+ }, {
348
+ numTouchPoints: 2
349
+ }]
350
+ }, {
351
+ toolName: toolNames.Pan,
352
+ bindings: [{
353
+ mouseButton: Enums.MouseBindings.Auxiliary
354
+ }, {
355
+ numTouchPoints: 3
356
+ }]
357
+ }]
358
+ };
359
+ toolGroupService.createToolGroupAndAddTools('volume3d', tools);
360
+ }
361
+ function initToolGroups(extensionManager, toolGroupService, commandsManager) {
362
+ initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, 'default');
363
+ initSRToolGroup(extensionManager, toolGroupService);
364
+ initMPRToolGroup(extensionManager, toolGroupService, commandsManager);
365
+ initVolume3DToolGroup(extensionManager, toolGroupService);
366
+ }
367
+ /* export default */ const src_initToolGroups = (initToolGroups);
368
+ ;// CONCATENATED MODULE: ../../../modes/basic/package.json
369
+ var package_namespaceObject = JSON.parse('{"UU":"@ohif/mode-basic"}')
370
+ ;// CONCATENATED MODULE: ../../../modes/basic/src/id.js
371
+
372
+ const id = package_namespaceObject.UU;
373
+
374
+ ;// CONCATENATED MODULE: ../../../modes/basic/src/index.tsx
375
+
376
+
377
+
378
+
379
+ const {
380
+ structuredCloneWithFunctions
381
+ } = src/* .utils */.Wp;
382
+
383
+ /**
384
+ * Define non-imaging modalities.
385
+ * This can be used to exclude modes which have only these modalities,
386
+ * or it can be used to not display thumbnails for some of these.
387
+ * This list used to include SM, for whole slide imaging, but this is now supported
388
+ * by cornerstone. Others of these may get added.
389
+ */
390
+ const NON_IMAGE_MODALITIES = ['SEG', 'RTSTRUCT', 'RTPLAN', 'PR', 'SR'];
391
+ const ohif = {
392
+ layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
393
+ sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
394
+ thumbnailList: '@ohif/extension-default.panelModule.seriesList',
395
+ hangingProtocol: '@ohif/extension-default.hangingProtocolModule.default',
396
+ wsiSopClassHandler: '@ohif/extension-cornerstone.sopClassHandlerModule.DicomMicroscopySopClassHandler'
397
+ };
398
+ const cornerstone = {
399
+ measurements: '@ohif/extension-cornerstone.panelModule.panelMeasurement',
400
+ labelMapSegmentationPanel: '@ohif/extension-cornerstone.panelModule.panelSegmentationWithToolsLabelMap',
401
+ contourSegmentationPanel: '@ohif/extension-cornerstone.panelModule.panelSegmentationWithToolsContour',
402
+ segmentation: '@ohif/extension-cornerstone.panelModule.panelSegmentation',
403
+ viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone'
404
+ };
405
+ const dicomsr = {
406
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr',
407
+ sopClassHandler3D: '@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr-3d',
408
+ viewport: '@ohif/extension-cornerstone-dicom-sr.viewportModule.dicom-sr'
409
+ };
410
+ const dicomvideo = {
411
+ sopClassHandler: '@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video'
412
+ };
413
+ const dicomecg = {
414
+ sopClassHandler: '@ohif/extension-cornerstone.sopClassHandlerModule.DicomEcgSopClassHandler'
415
+ };
416
+ const dicompdf = {
417
+ sopClassHandler: '@ohif/extension-dicom-pdf.sopClassHandlerModule.dicom-pdf',
418
+ viewport: '@ohif/extension-dicom-pdf.viewportModule.dicom-pdf'
419
+ };
420
+ const dicomSeg = {
421
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
422
+ viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg'
423
+ };
424
+ const dicomPmap = {
425
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-pmap.sopClassHandlerModule.dicom-pmap',
426
+ viewport: '@ohif/extension-cornerstone-dicom-pmap.viewportModule.dicom-pmap'
427
+ };
428
+ const dicomRT = {
429
+ viewport: '@ohif/extension-cornerstone-dicom-rt.viewportModule.dicom-rt',
430
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-rt.sopClassHandlerModule.dicom-rt'
431
+ };
432
+ const segmentation = {
433
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
434
+ viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg'
435
+ };
436
+ const extensionDependencies = {
437
+ // Can derive the versions at least process.env.from npm_package_version
438
+ '@ohif/extension-default': '^3.0.0',
439
+ '@ohif/extension-cornerstone': '^3.0.0',
440
+ '@ohif/extension-cornerstone-dicom-sr': '^3.0.0',
441
+ '@ohif/extension-cornerstone-dicom-seg': '^3.0.0',
442
+ '@ohif/extension-cornerstone-dicom-pmap': '^3.0.0',
443
+ '@ohif/extension-cornerstone-dicom-rt': '^3.0.0',
444
+ '@ohif/extension-dicom-pdf': '^3.0.1',
445
+ '@ohif/extension-dicom-video': '^3.0.1'
446
+ };
447
+ const sopClassHandlers = [dicomvideo.sopClassHandler, dicomecg.sopClassHandler, dicomSeg.sopClassHandler, dicomPmap.sopClassHandler, ohif.sopClassHandler, ohif.wsiSopClassHandler, dicompdf.sopClassHandler, dicomsr.sopClassHandler3D, dicomsr.sopClassHandler, dicomRT.sopClassHandler];
448
+
449
+ /**
450
+ * Indicate this is a valid mode if:
451
+ * - it contains at least one of the modeModalities
452
+ * - it contains all of the array value in modeModalities
453
+ * Otherwise, if modeModalities is not defined:
454
+ * - it contains at least one modality other than the nonModeMOdalities.
455
+ */
456
+ function isValidMode({
457
+ modalities
458
+ }) {
459
+ const modalities_list = modalities.split('\\');
460
+ if (this.modeModalities?.length) {
461
+ for (const modeModality of this.modeModalities) {
462
+ if (Array.isArray(modeModality) && modeModality.every(m => modalities.indexOf(m) !== -1)) {
463
+ return {
464
+ valid: true,
465
+ description: `Matches ${modeModality.join(', ')}`
466
+ };
467
+ } else if (modalities.indexOf(modeModality)) {
468
+ return {
469
+ valid: true,
470
+ description: `Matches ${modeModality}`
471
+ };
472
+ }
473
+ }
474
+ return {
475
+ valid: false,
476
+ description: `None of the mode modalities match: ${JSON.stringify(this.modeModalities)}`
477
+ };
478
+ }
479
+ return {
480
+ valid: !!modalities_list.find(modality => this.nonModeModalities.indexOf(modality) === -1),
481
+ description: `The mode does not support studies that ONLY include the following modalities: ${this.nonModeModalities.join(', ')}`
482
+ };
483
+ }
484
+ function onModeEnter({
485
+ servicesManager,
486
+ extensionManager,
487
+ commandsManager,
488
+ panelService,
489
+ segmentationService
490
+ }) {
491
+ const {
492
+ measurementService,
493
+ toolbarService,
494
+ toolGroupService,
495
+ customizationService
496
+ } = servicesManager.services;
497
+ measurementService.clearMeasurements();
498
+
499
+ // Init Default and SR ToolGroups
500
+ src_initToolGroups(extensionManager, toolGroupService, commandsManager);
501
+
502
+ // Toolbar buttons and layout may be supplied either as a customization name
503
+ // (a string, resolved through the customization service so `?customization=`
504
+ // modules can extend the cornerstone-registered defaults) or as a literal
505
+ // value (the button array / sections object) for modes that define them inline.
506
+ const resolveToolbarCustomization = value => typeof value === 'string' ? customizationService.getCustomization(value) : value;
507
+ const toolbarButtons = resolveToolbarCustomization(this.toolbarButtons);
508
+ const toolbarSections = resolveToolbarCustomization(this.toolbarSections) ?? {};
509
+ toolbarService.register(toolbarButtons);
510
+ for (const [key, section] of Object.entries(toolbarSections)) {
511
+ toolbarService.updateSection(key, section);
512
+ }
513
+ if (!this.enableSegmentationEdit) {
514
+ customizationService.setCustomizations({
515
+ 'panelSegmentation.disableEditing': {
516
+ $set: true
517
+ }
518
+ });
519
+ }
520
+
521
+ // // ActivatePanel event trigger for when a segmentation or measurement is added.
522
+ // // Do not force activation so as to respect the state the user may have left the UI in.
523
+ if (this.activatePanelTrigger) {
524
+ this._activatePanelTriggersSubscriptions = [...panelService.addActivatePanelTriggers(cornerstone.segmentation, [{
525
+ sourcePubSubService: segmentationService,
526
+ sourceEvents: [segmentationService.EVENTS.SEGMENTATION_ADDED]
527
+ }], true), ...panelService.addActivatePanelTriggers(cornerstone.measurements, [{
528
+ sourcePubSubService: measurementService,
529
+ sourceEvents: [measurementService.EVENTS.MEASUREMENT_ADDED, measurementService.EVENTS.RAW_MEASUREMENT_ADDED]
530
+ }], true), true];
531
+ }
532
+ }
533
+ function onModeExit({
534
+ servicesManager
535
+ }) {
536
+ const {
537
+ toolGroupService,
538
+ syncGroupService,
539
+ segmentationService,
540
+ cornerstoneViewportService,
541
+ uiDialogService,
542
+ uiModalService
543
+ } = servicesManager.services;
544
+ this._activatePanelTriggersSubscriptions.forEach(sub => sub.unsubscribe());
545
+ this._activatePanelTriggersSubscriptions.length = 0;
546
+ uiDialogService.hideAll();
547
+ uiModalService.hide();
548
+ toolGroupService.destroy();
549
+ syncGroupService.destroy();
550
+ segmentationService.destroy();
551
+ cornerstoneViewportService.destroy();
552
+ }
553
+ const basicLayout = {
554
+ id: ohif.layout,
555
+ props: {
556
+ leftPanels: [ohif.thumbnailList],
557
+ leftPanelResizable: true,
558
+ rightPanels: [cornerstone.segmentation, cornerstone.measurements],
559
+ rightPanelClosed: true,
560
+ rightPanelResizable: true,
561
+ viewports: [{
562
+ namespace: cornerstone.viewport,
563
+ displaySetsToDisplay: [ohif.sopClassHandler, dicomvideo.sopClassHandler, ohif.wsiSopClassHandler, dicomecg.sopClassHandler]
564
+ }, {
565
+ namespace: dicomsr.viewport,
566
+ displaySetsToDisplay: [dicomsr.sopClassHandler, dicomsr.sopClassHandler3D]
567
+ }, {
568
+ namespace: dicompdf.viewport,
569
+ displaySetsToDisplay: [dicompdf.sopClassHandler]
570
+ }, {
571
+ namespace: dicomSeg.viewport,
572
+ displaySetsToDisplay: [dicomSeg.sopClassHandler]
573
+ }, {
574
+ namespace: dicomPmap.viewport,
575
+ displaySetsToDisplay: [dicomPmap.sopClassHandler]
576
+ }, {
577
+ namespace: dicomRT.viewport,
578
+ displaySetsToDisplay: [dicomRT.sopClassHandler]
579
+ }]
580
+ }
581
+ };
582
+ function layoutTemplate() {
583
+ return structuredCloneWithFunctions(this.layoutInstance);
584
+ }
585
+ const basicRoute = {
586
+ path: 'basic',
587
+ layoutTemplate,
588
+ layoutInstance: basicLayout
589
+ };
590
+ const src_modeInstance = {
591
+ // TODO: We're using this as a route segment
592
+ // We should not be.
593
+ id: id,
594
+ routeName: 'basic',
595
+ // Don't hide this by default - see the registration later to hide the basic
596
+ // instance by default.
597
+ hide: false,
598
+ displayName: 'Non-Longitudinal Basic',
599
+ _activatePanelTriggersSubscriptions: [],
600
+ // Toolbar buttons and layout are referenced by customization name; the
601
+ // cornerstone extension registers the defaults and `?customization=` modules
602
+ // can extend them. onModeEnter resolves these names via the customization service.
603
+ toolbarSections: 'cornerstone.toolbarSections',
604
+ /**
605
+ * Lifecycle hooks
606
+ */
607
+ onModeEnter,
608
+ onModeExit,
609
+ validationTags: {
610
+ study: [],
611
+ series: []
612
+ },
613
+ isValidMode,
614
+ routes: [basicRoute],
615
+ extensions: extensionDependencies,
616
+ // Default protocol gets self-registered by default in the init
617
+ hangingProtocol: 'default',
618
+ // Order is important in sop class handlers when two handlers both use
619
+ // the same sop class under different situations. In that case, the more
620
+ // general handler needs to come last. For this case, the dicomvideo must
621
+ // come first to remove video transfer syntax before ohif uses images
622
+ sopClassHandlers,
623
+ toolbarButtons: 'cornerstone.toolbarButtons',
624
+ enableSegmentationEdit: false,
625
+ nonModeModalities: NON_IMAGE_MODALITIES
626
+ };
627
+
628
+ /**
629
+ * Creates a mode on this object, using immutability-helper to apply changes
630
+ * from modeConfiguration into the modeInstance.
631
+ */
632
+ function modeFactory({
633
+ modeConfiguration
634
+ }) {
635
+ let modeInstance = this.modeInstance;
636
+ if (modeConfiguration) {
637
+ modeInstance = immutability_helper_default()(modeInstance, modeConfiguration);
638
+ }
639
+ return modeInstance;
640
+ }
641
+ const mode = {
642
+ id: id,
643
+ modeFactory,
644
+ modeInstance: {
645
+ ...src_modeInstance,
646
+ hide: true
647
+ },
648
+ extensionDependencies
649
+ };
650
+ /* export default */ const basic_src = (mode);
651
+
652
+
653
+ },
654
+
655
+ }]);
@@ -7,8 +7,8 @@ __webpack_require__.d(__webpack_exports__, {
7
7
  "default": () => (/* binding */ tmtv_src)
8
8
  });
9
9
 
10
- // EXTERNAL MODULE: ../../core/src/index.ts + 69 modules
11
- var src = __webpack_require__(62901);
10
+ // EXTERNAL MODULE: ../../core/src/index.ts + 75 modules
11
+ var src = __webpack_require__(50679);
12
12
  ;// CONCATENATED MODULE: ../../../modes/tmtv/src/constants.ts
13
13
  const MIN_SEGMENTATION_DRAWING_RADIUS = 0.5;
14
14
  const MAX_SEGMENTATION_DRAWING_RADIUS = 99.5;
@@ -119,8 +119,8 @@ function getCompression(imageId) {
119
119
  return 'Lossless / Uncompressed';
120
120
  }
121
121
 
122
- // EXTERNAL MODULE: ../../core/src/index.ts + 69 modules
123
- var core_src = __webpack_require__(62901);
122
+ // EXTERNAL MODULE: ../../core/src/index.ts + 75 modules
123
+ var core_src = __webpack_require__(50679);
124
124
  ;// CONCATENATED MODULE: ../../../extensions/dicom-microscopy/src/components/ViewportOverlay/index.tsx
125
125
 
126
126
 
@@ -9,7 +9,7 @@ __webpack_require__.d(__webpack_exports__, {
9
9
  /* import */ var prop_types__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(prop_types__rspack_import_0);
10
10
  /* import */ var react__rspack_import_1 = __webpack_require__(86326);
11
11
  /* import */ var _ohif_ui_next__rspack_import_2 = __webpack_require__(39987);
12
- /* import */ var _ohif_extension_cornerstone__rspack_import_3 = __webpack_require__(84461);
12
+ /* import */ var _ohif_extension_cornerstone__rspack_import_3 = __webpack_require__(28772);
13
13
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
14
14
 
15
15