@ohif/app 3.12.0-beta.77 → 3.12.0-beta.78
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/{147.bundle.23cc8fbbd94c0b65d337.js → 147.bundle.53fe889b205dd91c245b.js} +2 -2
- package/dist/{1604.bundle.5d95724cde8a8c23f7d7.js → 1604.bundle.0d3b54b754c97de7aa88.js} +5 -5
- package/dist/{1919.bundle.9abab6d9c380f9ef6f0b.js → 1919.bundle.099a3ad4025e527284b0.js} +6 -6
- package/dist/{2701.bundle.4c715c1d9bb7828886d8.js → 2701.bundle.6418ae6e9e372ccae322.js} +4 -4
- package/dist/{9856.bundle.31827ec7e09a8978744c.js → 306.bundle.a2380c4b23436c127faf.js} +110 -1
- package/dist/{9892.bundle.a09d4f672f8a784971a2.js → 3190.bundle.cd955568fe4d80ab2e4b.js} +114 -1
- package/dist/{3613.bundle.4a3b2f819e9698e9b7b3.js → 3613.bundle.f5fceb4697407a89921b.js} +60 -105
- package/dist/{4019.bundle.ddfa6fc4ccf74563cd40.js → 4019.bundle.6505ff57ca48af03da8a.js} +2 -2
- package/dist/{7197.bundle.f3676c560bf394aafd45.js → 4092.bundle.48390d480273857e794e.js} +338 -7
- package/dist/{7197.css → 4092.css} +1 -0
- package/dist/{4113.bundle.87c1437c5d1452a0c08b.js → 4113.bundle.8e8cca0c8fbf690e7b93.js} +2 -2
- package/dist/{414.bundle.2f752ae2409c02c49f10.js → 414.bundle.597500ee9c214b0a7212.js} +8 -8
- package/dist/{4202.bundle.1cef28d8aec1155d35d1.js → 4202.bundle.1c5271f1cacf5794aba7.js} +2 -2
- package/dist/{5349.bundle.14d76a9cb0f587c90614.js → 5349.bundle.6bf58c3e9e9571fa8a7d.js} +4 -4
- package/dist/{5457.bundle.635f651e4719be983799.js → 5457.bundle.9758280deb7db83edb99.js} +0 -8
- package/dist/{5485.bundle.919876def56a45d73ab2.js → 5485.bundle.aafe4c0e2e9e2afd878d.js} +0 -8
- package/dist/{5802.bundle.48e7f1324fc9e4486603.js → 5802.bundle.8922caf16c088b10cdb0.js} +2 -2
- package/dist/{6201.bundle.9f04a5cc79aec668f347.js → 6201.bundle.b0a52e8b23e83d7820d6.js} +2 -2
- package/dist/{8815.bundle.75f4d45eedb9c28c2181.js → 6725.bundle.75f59fc21a7fbecb9bce.js} +468 -37
- package/dist/{6991.bundle.594d1a749b0e67bbedf9.js → 6991.bundle.500dbaf5bec95a3d49d2.js} +2 -2
- package/dist/{3409.bundle.0e1e8c8a894cea8bc17b.js → 7948.bundle.8c0bd83ffaacabc3dcbd.js} +889 -238
- package/dist/{810.bundle.fd0a60e4edaeff3cc7ff.js → 810.bundle.d31e9fd894cac5ec768a.js} +6 -6
- package/dist/{8558.bundle.ad2f1dac0b4b583d75db.js → 8558.bundle.83d96d728f9f186ea5ad.js} +1 -1
- package/dist/{934.bundle.a3ba7abd77061cfa2d32.js → 934.bundle.a25daa6ed5038a83faf8.js} +2 -2
- package/dist/{1447.bundle.0e0f2e950690447bfda1.js → 9548.bundle.9e723f4ad09b9c1b431a.js} +69 -43
- package/dist/{8740.bundle.39b40ee21a873e824ce8.js → 9845.bundle.6ee5ca8fe9f68cefd56d.js} +5 -5
- package/dist/{9862.bundle.dc627e5f01fc4698a00f.js → 9862.bundle.e2c4c129f7907500b840.js} +2 -2
- package/dist/{app.bundle.c1735280b1ffec7296cf.js → app.bundle.0cf7e86910258d22401b.js} +483 -146
- package/dist/app.bundle.css +1 -1
- package/dist/{compute.bundle.08b8136bed028bf71f58.js → compute.bundle.f6f1236073e2a486ddfb.js} +3 -3
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.a9790a5891bb286e7d4f.js → polySeg.bundle.d0ed88f3bfea700c211b.js} +3 -3
- package/dist/sw.js +1 -1
- package/package.json +20 -20
- package/dist/8740.css +0 -1
- /package/dist/{1459.bundle.84812caf93825d54325d.js → 1459.bundle.c878b794be71883de852.js} +0 -0
- /package/dist/{1807.bundle.48ef151b1f5c3a5e7e63.js → 1807.bundle.ade363b62ad3a0442a9c.js} +0 -0
- /package/dist/{213.bundle.9f5dbdcc51ecade9796c.js → 213.bundle.1cc1975ae90ca2eadfd5.js} +0 -0
- /package/dist/{2243.bundle.d485d2f4c40244af3599.js → 2243.bundle.a4c417be34f113e1fbc6.js} +0 -0
- /package/dist/{2424.bundle.dc021a7edf7f3a35176a.js → 2424.bundle.22082b8a1483bc47cbb1.js} +0 -0
- /package/dist/{2518.bundle.bdbd870da5355fdf502a.js → 2518.bundle.b21d8c66dc8deb8ba922.js} +0 -0
- /package/dist/{319.bundle.cd9383a345b9da2ba840.js → 319.bundle.f5adcbbef5767dedc45d.js} +0 -0
- /package/dist/{6027.bundle.5a2c33fa1eb3d810e7c1.js → 6027.bundle.5649e4e1fde732251102.js} +0 -0
- /package/dist/{7159.bundle.a472333e58e930b53e22.js → 7159.bundle.a5991a5d4f0dd8f1c95f.js} +0 -0
- /package/dist/{7412.bundle.0764ad3a00b3e9a044d9.js → 7412.bundle.94802a6a629f62daab88.js} +0 -0
- /package/dist/{7431.bundle.6dee1ec831da974a7433.js → 7431.bundle.ad1982d7c54a5931d409.js} +0 -0
- /package/dist/{7639.bundle.12fe44f68f57a135f9d8.js → 7639.bundle.c6ee8cf4672716943e89.js} +0 -0
- /package/dist/{85.bundle.38a0d049316b0e71f7d0.js → 85.bundle.b1586702f9300c017632.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[6725],{
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 46725:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6
6
|
|
|
7
7
|
// ESM COMPAT FLAG
|
|
@@ -176,16 +176,28 @@ const toolbarButtons = [{
|
|
|
176
176
|
buttonSection: true
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
|
-
// Section containers for the nested
|
|
179
|
+
// Section containers for the nested toolboxes and toolbars.
|
|
180
180
|
{
|
|
181
|
-
id: '
|
|
182
|
-
uiType: 'ohif.
|
|
181
|
+
id: 'LabelMapUtilities',
|
|
182
|
+
uiType: 'ohif.Toolbar',
|
|
183
183
|
props: {
|
|
184
184
|
buttonSection: true
|
|
185
185
|
}
|
|
186
186
|
}, {
|
|
187
|
-
id: '
|
|
188
|
-
uiType: 'ohif.
|
|
187
|
+
id: 'ContourUtilities',
|
|
188
|
+
uiType: 'ohif.Toolbar',
|
|
189
|
+
props: {
|
|
190
|
+
buttonSection: true
|
|
191
|
+
}
|
|
192
|
+
}, {
|
|
193
|
+
id: 'LabelMapTools',
|
|
194
|
+
uiType: 'ohif.toolBoxButtonGroup',
|
|
195
|
+
props: {
|
|
196
|
+
buttonSection: true
|
|
197
|
+
}
|
|
198
|
+
}, {
|
|
199
|
+
id: 'ContourTools',
|
|
200
|
+
uiType: 'ohif.toolBoxButtonGroup',
|
|
189
201
|
props: {
|
|
190
202
|
buttonSection: true
|
|
191
203
|
}
|
|
@@ -374,16 +386,212 @@ const toolbarButtons = [{
|
|
|
374
386
|
tooltip: i18next/* default */.A.t('Buttons:Dicom Tag Browser'),
|
|
375
387
|
commands: 'openDICOMTagViewer'
|
|
376
388
|
}
|
|
389
|
+
}, {
|
|
390
|
+
id: 'PlanarFreehandContourSegmentationTool',
|
|
391
|
+
uiType: 'ohif.toolBoxButton',
|
|
392
|
+
props: {
|
|
393
|
+
icon: 'icon-tool-freehand-roi',
|
|
394
|
+
label: 'Freehand Segmentation',
|
|
395
|
+
tooltip: 'Freehand Segmentation',
|
|
396
|
+
evaluate: [{
|
|
397
|
+
name: 'evaluate.cornerstone.segmentation',
|
|
398
|
+
toolNames: ['PlanarFreehandContourSegmentationTool'],
|
|
399
|
+
disabledText: 'Create new segmentation to enable this tool.'
|
|
400
|
+
}, {
|
|
401
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
402
|
+
segmentationRepresentationType: 'Contour'
|
|
403
|
+
}],
|
|
404
|
+
commands: [{
|
|
405
|
+
commandName: 'setToolActiveToolbar',
|
|
406
|
+
commandOptions: {
|
|
407
|
+
bindings: [{
|
|
408
|
+
mouseButton: 1 // Left Click
|
|
409
|
+
}, {
|
|
410
|
+
mouseButton: 1,
|
|
411
|
+
// Left Click+Shift to create a hole
|
|
412
|
+
modifierKey: 16 // Shift
|
|
413
|
+
}]
|
|
414
|
+
}
|
|
415
|
+
}, {
|
|
416
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
417
|
+
commandOptions: {
|
|
418
|
+
segmentationRepresentationType: 'Contour'
|
|
419
|
+
}
|
|
420
|
+
}],
|
|
421
|
+
options: [{
|
|
422
|
+
name: 'Interpolate Contours',
|
|
423
|
+
type: 'switch',
|
|
424
|
+
id: 'planarFreehandInterpolateContours',
|
|
425
|
+
value: false,
|
|
426
|
+
commands: {
|
|
427
|
+
commandName: 'setInterpolationToolConfiguration'
|
|
428
|
+
}
|
|
429
|
+
}]
|
|
430
|
+
}
|
|
431
|
+
}, {
|
|
432
|
+
id: 'LivewireContourSegmentationTool',
|
|
433
|
+
uiType: 'ohif.toolBoxButton',
|
|
434
|
+
props: {
|
|
435
|
+
icon: 'icon-tool-livewire',
|
|
436
|
+
label: 'Livewire Contour',
|
|
437
|
+
tooltip: 'Livewire Contour',
|
|
438
|
+
evaluate: [{
|
|
439
|
+
name: 'evaluate.cornerstone.segmentation',
|
|
440
|
+
toolNames: ['LivewireContourSegmentationTool'],
|
|
441
|
+
disabledText: 'Create new segmentation to enable this tool.'
|
|
442
|
+
}, {
|
|
443
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
444
|
+
segmentationRepresentationType: 'Contour'
|
|
445
|
+
}],
|
|
446
|
+
commands: [{
|
|
447
|
+
commandName: 'setToolActiveToolbar',
|
|
448
|
+
commandOptions: {
|
|
449
|
+
bindings: [{
|
|
450
|
+
mouseButton: 1 // Left Click
|
|
451
|
+
}, {
|
|
452
|
+
mouseButton: 1,
|
|
453
|
+
// Left Click+Shift to create a hole
|
|
454
|
+
modifierKey: 16 // Shift
|
|
455
|
+
}]
|
|
456
|
+
}
|
|
457
|
+
}, {
|
|
458
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
459
|
+
commandOptions: {
|
|
460
|
+
segmentationRepresentationType: 'Contour'
|
|
461
|
+
}
|
|
462
|
+
}],
|
|
463
|
+
options: [{
|
|
464
|
+
name: 'Interpolate Contours',
|
|
465
|
+
type: 'switch',
|
|
466
|
+
id: 'livewireInterpolateContours',
|
|
467
|
+
value: false,
|
|
468
|
+
commands: {
|
|
469
|
+
commandName: 'setInterpolationToolConfiguration'
|
|
470
|
+
}
|
|
471
|
+
}]
|
|
472
|
+
}
|
|
473
|
+
}, {
|
|
474
|
+
id: 'SplineContourSegmentationTool',
|
|
475
|
+
uiType: 'ohif.toolBoxButton',
|
|
476
|
+
props: {
|
|
477
|
+
icon: 'icon-tool-spline-roi',
|
|
478
|
+
label: 'Spline Contour Segmentation Tool',
|
|
479
|
+
tooltip: 'Spline Contour Segmentation Tool',
|
|
480
|
+
evaluate: [{
|
|
481
|
+
name: 'evaluate.cornerstone.segmentation',
|
|
482
|
+
toolNames: ['CatmullRomSplineROI', 'LinearSplineROI', 'BSplineROI'],
|
|
483
|
+
disabledText: 'Create new segmentation to enable this tool.'
|
|
484
|
+
}, {
|
|
485
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
486
|
+
segmentationRepresentationType: 'Contour'
|
|
487
|
+
}],
|
|
488
|
+
commands: [{
|
|
489
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
490
|
+
commandOptions: {
|
|
491
|
+
segmentationRepresentationType: 'Contour'
|
|
492
|
+
}
|
|
493
|
+
}],
|
|
494
|
+
options: [{
|
|
495
|
+
name: 'Spline Type',
|
|
496
|
+
type: 'select',
|
|
497
|
+
id: 'splineTypeSelect',
|
|
498
|
+
value: 'CatmullRomSplineROI',
|
|
499
|
+
values: [{
|
|
500
|
+
id: 'CatmullRomSplineROI',
|
|
501
|
+
value: 'CatmullRomSplineROI',
|
|
502
|
+
label: 'Catmull Rom Spline'
|
|
503
|
+
}, {
|
|
504
|
+
id: 'LinearSplineROI',
|
|
505
|
+
value: 'LinearSplineROI',
|
|
506
|
+
label: 'Linear Spline'
|
|
507
|
+
}, {
|
|
508
|
+
id: 'BSplineROI',
|
|
509
|
+
value: 'BSplineROI',
|
|
510
|
+
label: 'B-Spline'
|
|
511
|
+
}],
|
|
512
|
+
commands: {
|
|
513
|
+
commandName: 'setToolActiveToolbar',
|
|
514
|
+
commandOptions: {
|
|
515
|
+
bindings: [{
|
|
516
|
+
mouseButton: 1 // Left Click
|
|
517
|
+
}, {
|
|
518
|
+
mouseButton: 1,
|
|
519
|
+
// Left Click+Shift to create a hole
|
|
520
|
+
modifierKey: 16 // Shift
|
|
521
|
+
}]
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}, {
|
|
525
|
+
name: 'Simplified Spline',
|
|
526
|
+
type: 'switch',
|
|
527
|
+
id: 'simplifiedSpline',
|
|
528
|
+
value: true,
|
|
529
|
+
commands: {
|
|
530
|
+
commandName: 'setSimplifiedSplineForSplineContourSegmentationTool'
|
|
531
|
+
}
|
|
532
|
+
}, {
|
|
533
|
+
name: 'Interpolate Contours',
|
|
534
|
+
type: 'switch',
|
|
535
|
+
id: 'splineInterpolateContours',
|
|
536
|
+
value: false,
|
|
537
|
+
commands: {
|
|
538
|
+
commandName: 'setInterpolationToolConfiguration',
|
|
539
|
+
commandOptions: {
|
|
540
|
+
toolNames: ['CatmullRomSplineROI', 'LinearSplineROI', 'BSplineROI']
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}]
|
|
544
|
+
}
|
|
545
|
+
}, {
|
|
546
|
+
id: 'SculptorTool',
|
|
547
|
+
uiType: 'ohif.toolBoxButton',
|
|
548
|
+
props: {
|
|
549
|
+
icon: 'icon-tool-sculptor',
|
|
550
|
+
label: 'Sculptor Tool',
|
|
551
|
+
tooltip: 'Sculptor Tool',
|
|
552
|
+
evaluate: [{
|
|
553
|
+
name: 'evaluate.cornerstone.segmentation',
|
|
554
|
+
toolNames: ['SculptorTool'],
|
|
555
|
+
disabledText: 'Create new segmentation to enable this tool.'
|
|
556
|
+
}, {
|
|
557
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
558
|
+
segmentationRepresentationType: 'Contour'
|
|
559
|
+
}],
|
|
560
|
+
commands: ['setToolActiveToolbar', {
|
|
561
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
562
|
+
commandOptions: {
|
|
563
|
+
segmentationRepresentationType: 'Contour'
|
|
564
|
+
}
|
|
565
|
+
}],
|
|
566
|
+
options: [{
|
|
567
|
+
name: 'Dynamic Cursor Size',
|
|
568
|
+
type: 'switch',
|
|
569
|
+
id: 'dynamicCursorSize',
|
|
570
|
+
value: true,
|
|
571
|
+
commands: {
|
|
572
|
+
commandName: 'setDynamicCursorSizeForSculptorTool'
|
|
573
|
+
}
|
|
574
|
+
}]
|
|
575
|
+
}
|
|
377
576
|
}, {
|
|
378
577
|
id: 'Brush',
|
|
379
578
|
uiType: 'ohif.toolBoxButton',
|
|
380
579
|
props: {
|
|
381
580
|
icon: 'icon-tool-brush',
|
|
382
581
|
label: i18next/* default */.A.t('Buttons:Brush'),
|
|
383
|
-
evaluate: {
|
|
582
|
+
evaluate: [{
|
|
384
583
|
name: 'evaluate.cornerstone.segmentation',
|
|
385
584
|
toolNames: ['CircularBrush', 'SphereBrush'],
|
|
386
585
|
disabledText: i18next/* default */.A.t('Buttons:Create new segmentation to enable this tool.')
|
|
586
|
+
}, {
|
|
587
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
588
|
+
segmentationRepresentationType: 'Labelmap'
|
|
589
|
+
}],
|
|
590
|
+
commands: {
|
|
591
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
592
|
+
commandOptions: {
|
|
593
|
+
segmentationRepresentationType: 'Labelmap'
|
|
594
|
+
}
|
|
387
595
|
},
|
|
388
596
|
options: [{
|
|
389
597
|
name: 'Radius (mm)',
|
|
@@ -393,12 +601,12 @@ const toolbarButtons = [{
|
|
|
393
601
|
max: 99.5,
|
|
394
602
|
step: 0.5,
|
|
395
603
|
value: 25,
|
|
396
|
-
commands: {
|
|
604
|
+
commands: [{
|
|
397
605
|
commandName: 'setBrushSize',
|
|
398
606
|
commandOptions: {
|
|
399
607
|
toolNames: ['CircularBrush', 'SphereBrush']
|
|
400
608
|
}
|
|
401
|
-
}
|
|
609
|
+
}]
|
|
402
610
|
}, {
|
|
403
611
|
name: 'Shape',
|
|
404
612
|
type: 'radio',
|
|
@@ -411,34 +619,52 @@ const toolbarButtons = [{
|
|
|
411
619
|
value: 'SphereBrush',
|
|
412
620
|
label: 'Sphere'
|
|
413
621
|
}],
|
|
414
|
-
commands: 'setToolActiveToolbar'
|
|
622
|
+
commands: ['setToolActiveToolbar']
|
|
415
623
|
}]
|
|
416
624
|
}
|
|
417
625
|
}, {
|
|
418
626
|
id: 'InterpolateLabelmap',
|
|
419
|
-
uiType: 'ohif.
|
|
627
|
+
uiType: 'ohif.toolButton',
|
|
420
628
|
props: {
|
|
421
|
-
icon: '
|
|
629
|
+
icon: 'actions-interpolate',
|
|
422
630
|
label: i18next/* default */.A.t('Buttons:Interpolate Labelmap'),
|
|
423
631
|
tooltip: i18next/* default */.A.t('Buttons:Automatically fill in missing slices between drawn segments. Use brush or threshold tools on at least two slices, then click to interpolate across slices. Works in any direction. Volume must be reconstructable.'),
|
|
424
|
-
evaluate: [
|
|
632
|
+
evaluate: [{
|
|
633
|
+
name: 'evaluate.cornerstone.segmentation'
|
|
634
|
+
}, {
|
|
635
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
636
|
+
segmentationRepresentationType: 'Labelmap'
|
|
637
|
+
}, {
|
|
425
638
|
name: 'evaluate.displaySetIsReconstructable',
|
|
426
639
|
disabledText: i18next/* default */.A.t('Buttons:The current viewport cannot handle interpolation.')
|
|
427
640
|
}],
|
|
428
|
-
commands:
|
|
641
|
+
commands: [{
|
|
642
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
643
|
+
commandOptions: {
|
|
644
|
+
segmentationRepresentationType: 'Labelmap'
|
|
645
|
+
}
|
|
646
|
+
}, 'interpolateLabelmap']
|
|
429
647
|
}
|
|
430
648
|
}, {
|
|
431
649
|
id: 'SegmentBidirectional',
|
|
432
|
-
uiType: 'ohif.
|
|
650
|
+
uiType: 'ohif.toolButton',
|
|
433
651
|
props: {
|
|
434
|
-
icon: '
|
|
652
|
+
icon: 'actions-bidirectional',
|
|
435
653
|
label: i18next/* default */.A.t('Buttons:Segment Bidirectional'),
|
|
436
654
|
tooltip: i18next/* default */.A.t('Buttons:Automatically detects the largest length and width across slices for the selected segment and displays a bidirectional measurement.'),
|
|
437
|
-
evaluate: {
|
|
655
|
+
evaluate: [{
|
|
438
656
|
name: 'evaluate.cornerstone.segmentation',
|
|
439
657
|
disabledText: i18next/* default */.A.t('Buttons:Create new segmentation to enable this tool.')
|
|
440
|
-
},
|
|
441
|
-
|
|
658
|
+
}, {
|
|
659
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
660
|
+
segmentationRepresentationType: 'Labelmap'
|
|
661
|
+
}],
|
|
662
|
+
commands: [{
|
|
663
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
664
|
+
commandOptions: {
|
|
665
|
+
segmentationRepresentationType: 'Labelmap'
|
|
666
|
+
}
|
|
667
|
+
}, 'runSegmentBidirectional']
|
|
442
668
|
}
|
|
443
669
|
}, {
|
|
444
670
|
id: 'RegionSegmentPlus',
|
|
@@ -447,12 +673,20 @@ const toolbarButtons = [{
|
|
|
447
673
|
icon: 'icon-tool-click-segment',
|
|
448
674
|
label: i18next/* default */.A.t('Buttons:One Click Segment'),
|
|
449
675
|
tooltip: i18next/* default */.A.t('Buttons:Detects segmentable regions with one click. Hover for visual feedback—click when a plus sign appears to auto-segment the lesion.'),
|
|
450
|
-
evaluate: {
|
|
676
|
+
evaluate: [{
|
|
451
677
|
name: 'evaluate.cornerstone.segmentation',
|
|
452
678
|
toolNames: ['RegionSegmentPlus'],
|
|
453
679
|
disabledText: i18next/* default */.A.t('Buttons:Create new segmentation to enable this tool.')
|
|
454
|
-
},
|
|
455
|
-
|
|
680
|
+
}, {
|
|
681
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
682
|
+
segmentationRepresentationType: 'Labelmap'
|
|
683
|
+
}],
|
|
684
|
+
commands: ['setToolActiveToolbar', {
|
|
685
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
686
|
+
commandOptions: {
|
|
687
|
+
segmentationRepresentationType: 'Labelmap'
|
|
688
|
+
}
|
|
689
|
+
}]
|
|
456
690
|
}
|
|
457
691
|
}, {
|
|
458
692
|
id: 'LabelmapSlicePropagation',
|
|
@@ -462,13 +696,19 @@ const toolbarButtons = [{
|
|
|
462
696
|
label: i18next/* default */.A.t('Buttons:Labelmap Assist'),
|
|
463
697
|
tooltip: i18next/* default */.A.t('Buttons:Toggle AI assistance for segmenting nearby slices. After drawing on a slice, scroll to preview predictions. Press Enter to accept or Esc to skip.'),
|
|
464
698
|
evaluate: ['evaluate.cornerstoneTool.toggle', {
|
|
465
|
-
name: 'evaluate.cornerstone.
|
|
699
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
700
|
+
segmentationRepresentationType: 'Labelmap'
|
|
466
701
|
}],
|
|
467
702
|
listeners: {
|
|
468
703
|
[src/* ViewportGridService */.sI.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: callbacks('LabelmapSlicePropagation'),
|
|
469
704
|
[src/* ViewportGridService */.sI.EVENTS.VIEWPORTS_READY]: callbacks('LabelmapSlicePropagation')
|
|
470
705
|
},
|
|
471
|
-
commands:
|
|
706
|
+
commands: [{
|
|
707
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
708
|
+
commandOptions: {
|
|
709
|
+
segmentationRepresentationType: 'Labelmap'
|
|
710
|
+
}
|
|
711
|
+
}, 'toggleEnabledDisabledToolbar']
|
|
472
712
|
}
|
|
473
713
|
}, {
|
|
474
714
|
id: 'MarkerLabelmap',
|
|
@@ -480,8 +720,16 @@ const toolbarButtons = [{
|
|
|
480
720
|
evaluate: [{
|
|
481
721
|
name: 'evaluate.cornerstone.segmentation',
|
|
482
722
|
toolNames: ['MarkerLabelmap', 'MarkerInclude', 'MarkerExclude']
|
|
723
|
+
}, {
|
|
724
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
725
|
+
segmentationRepresentationType: 'Labelmap'
|
|
726
|
+
}],
|
|
727
|
+
commands: ['setToolActiveToolbar', {
|
|
728
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
729
|
+
commandOptions: {
|
|
730
|
+
segmentationRepresentationType: 'Labelmap'
|
|
731
|
+
}
|
|
483
732
|
}],
|
|
484
|
-
commands: 'setToolActiveToolbar',
|
|
485
733
|
listeners: {
|
|
486
734
|
[src/* ViewportGridService */.sI.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: callbacks('MarkerLabelmap'),
|
|
487
735
|
[src/* ViewportGridService */.sI.EVENTS.VIEWPORTS_READY]: callbacks('MarkerLabelmap')
|
|
@@ -526,10 +774,13 @@ const toolbarButtons = [{
|
|
|
526
774
|
props: {
|
|
527
775
|
icon: 'icon-tool-eraser',
|
|
528
776
|
label: i18next/* default */.A.t('Buttons:Eraser'),
|
|
529
|
-
evaluate: {
|
|
777
|
+
evaluate: [{
|
|
530
778
|
name: 'evaluate.cornerstone.segmentation',
|
|
531
779
|
toolNames: ['CircularEraser', 'SphereEraser']
|
|
532
|
-
},
|
|
780
|
+
}, {
|
|
781
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
782
|
+
segmentationRepresentationType: 'Labelmap'
|
|
783
|
+
}],
|
|
533
784
|
options: [{
|
|
534
785
|
name: 'Radius (mm)',
|
|
535
786
|
id: 'eraser-radius',
|
|
@@ -557,7 +808,13 @@ const toolbarButtons = [{
|
|
|
557
808
|
label: 'Sphere'
|
|
558
809
|
}],
|
|
559
810
|
commands: 'setToolActiveToolbar'
|
|
560
|
-
}]
|
|
811
|
+
}],
|
|
812
|
+
commands: {
|
|
813
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
814
|
+
commandOptions: {
|
|
815
|
+
segmentationRepresentationType: 'Labelmap'
|
|
816
|
+
}
|
|
817
|
+
}
|
|
561
818
|
}
|
|
562
819
|
}, {
|
|
563
820
|
id: 'Threshold',
|
|
@@ -565,9 +822,18 @@ const toolbarButtons = [{
|
|
|
565
822
|
props: {
|
|
566
823
|
icon: 'icon-tool-threshold',
|
|
567
824
|
label: 'Threshold Tool',
|
|
568
|
-
evaluate: {
|
|
825
|
+
evaluate: [{
|
|
569
826
|
name: 'evaluate.cornerstone.segmentation',
|
|
570
827
|
toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush', 'ThresholdCircularBrushDynamic', 'ThresholdSphereBrushDynamic']
|
|
828
|
+
}, {
|
|
829
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
830
|
+
segmentationRepresentationType: 'Labelmap'
|
|
831
|
+
}],
|
|
832
|
+
commands: {
|
|
833
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
834
|
+
commandOptions: {
|
|
835
|
+
segmentationRepresentationType: 'Labelmap'
|
|
836
|
+
}
|
|
571
837
|
},
|
|
572
838
|
options: [{
|
|
573
839
|
name: 'Radius (mm)',
|
|
@@ -669,10 +935,19 @@ const toolbarButtons = [{
|
|
|
669
935
|
props: {
|
|
670
936
|
icon: 'icon-tool-shape',
|
|
671
937
|
label: i18next/* default */.A.t('Buttons:Shapes'),
|
|
672
|
-
evaluate: {
|
|
938
|
+
evaluate: [{
|
|
673
939
|
name: 'evaluate.cornerstone.segmentation',
|
|
674
940
|
toolNames: ['CircleScissor', 'SphereScissor', 'RectangleScissor'],
|
|
675
941
|
disabledText: i18next/* default */.A.t('Buttons:Create new segmentation to enable shapes tool.')
|
|
942
|
+
}, {
|
|
943
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
944
|
+
segmentationRepresentationType: 'Labelmap'
|
|
945
|
+
}],
|
|
946
|
+
commands: {
|
|
947
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
948
|
+
commandOptions: {
|
|
949
|
+
segmentationRepresentationType: 'Labelmap'
|
|
950
|
+
}
|
|
676
951
|
},
|
|
677
952
|
options: [{
|
|
678
953
|
name: 'Shape',
|
|
@@ -692,6 +967,67 @@ const toolbarButtons = [{
|
|
|
692
967
|
commands: 'setToolActiveToolbar'
|
|
693
968
|
}]
|
|
694
969
|
}
|
|
970
|
+
}, {
|
|
971
|
+
id: 'SimplifyContours',
|
|
972
|
+
uiType: 'ohif.toolButton',
|
|
973
|
+
props: {
|
|
974
|
+
icon: 'actions-simplify',
|
|
975
|
+
label: 'Simplify Contours',
|
|
976
|
+
tooltip: 'Simplify Contours',
|
|
977
|
+
commands: ['toggleActiveSegmentationUtility'],
|
|
978
|
+
evaluate: [{
|
|
979
|
+
name: 'cornerstone.isActiveSegmentationUtility'
|
|
980
|
+
}],
|
|
981
|
+
options: 'cornerstone.SimplifyContourOptions'
|
|
982
|
+
}
|
|
983
|
+
}, {
|
|
984
|
+
id: 'SmoothContours',
|
|
985
|
+
uiType: 'ohif.toolButton',
|
|
986
|
+
props: {
|
|
987
|
+
icon: 'actions-smooth',
|
|
988
|
+
label: 'Smooth Contours',
|
|
989
|
+
tooltip: 'Smooth Contours',
|
|
990
|
+
commands: ['toggleActiveSegmentationUtility'],
|
|
991
|
+
evaluate: [{
|
|
992
|
+
name: 'cornerstone.isActiveSegmentationUtility'
|
|
993
|
+
}],
|
|
994
|
+
options: 'cornerstone.SmoothContoursOptions'
|
|
995
|
+
}
|
|
996
|
+
}, {
|
|
997
|
+
id: 'LogicalContourOperations',
|
|
998
|
+
uiType: 'ohif.toolButton',
|
|
999
|
+
props: {
|
|
1000
|
+
icon: 'actions-combine',
|
|
1001
|
+
label: 'Combine Contours',
|
|
1002
|
+
tooltip: 'Combine Contours',
|
|
1003
|
+
commands: ['toggleActiveSegmentationUtility'],
|
|
1004
|
+
evaluate: [{
|
|
1005
|
+
name: 'cornerstone.isActiveSegmentationUtility'
|
|
1006
|
+
}],
|
|
1007
|
+
options: 'cornerstone.LogicalContourOperationsOptions'
|
|
1008
|
+
}
|
|
1009
|
+
}, {
|
|
1010
|
+
id: 'LabelMapEditWithContour',
|
|
1011
|
+
uiType: 'ohif.toolBoxButton',
|
|
1012
|
+
props: {
|
|
1013
|
+
icon: 'tool-labelmap-edit-with-contour',
|
|
1014
|
+
label: 'Labelmap Edit with Contour Tool',
|
|
1015
|
+
tooltip: 'Labelmap Edit with Contour Tool',
|
|
1016
|
+
commands: ['setToolActiveToolbar', {
|
|
1017
|
+
commandName: 'activateSelectedSegmentationOfType',
|
|
1018
|
+
commandOptions: {
|
|
1019
|
+
segmentationRepresentationType: 'Labelmap'
|
|
1020
|
+
}
|
|
1021
|
+
}],
|
|
1022
|
+
evaluate: [{
|
|
1023
|
+
name: 'evaluate.cornerstone.segmentation',
|
|
1024
|
+
toolNames: ['LabelMapEditWithContour'],
|
|
1025
|
+
disabledText: 'Create new segmentation to enable this tool.'
|
|
1026
|
+
}, {
|
|
1027
|
+
name: 'evaluate.cornerstone.hasSegmentationOfType',
|
|
1028
|
+
segmentationRepresentationType: 'Labelmap'
|
|
1029
|
+
}]
|
|
1030
|
+
}
|
|
695
1031
|
}];
|
|
696
1032
|
/* harmony default export */ const src_toolbarButtons = (toolbarButtons);
|
|
697
1033
|
;// ../../../modes/segmentation/src/initToolGroups.ts
|
|
@@ -805,6 +1141,8 @@ function createTools({
|
|
|
805
1141
|
dynamicRadius: 3
|
|
806
1142
|
}
|
|
807
1143
|
}
|
|
1144
|
+
}, {
|
|
1145
|
+
toolName: toolNames.LabelMapEditWithContourTool
|
|
808
1146
|
}, {
|
|
809
1147
|
toolName: toolNames.CircleScissors
|
|
810
1148
|
}, {
|
|
@@ -819,6 +1157,41 @@ function createTools({
|
|
|
819
1157
|
toolName: toolNames.WindowLevelRegion
|
|
820
1158
|
}, {
|
|
821
1159
|
toolName: toolNames.UltrasoundDirectional
|
|
1160
|
+
}, {
|
|
1161
|
+
toolName: toolNames.PlanarFreehandContourSegmentation
|
|
1162
|
+
}, {
|
|
1163
|
+
toolName: toolNames.LivewireContourSegmentation
|
|
1164
|
+
}, {
|
|
1165
|
+
toolName: toolNames.SculptorTool
|
|
1166
|
+
}, {
|
|
1167
|
+
toolName: toolNames.PlanarFreehandROI
|
|
1168
|
+
}, {
|
|
1169
|
+
toolName: 'CatmullRomSplineROI',
|
|
1170
|
+
parentTool: toolNames.SplineContourSegmentation,
|
|
1171
|
+
configuration: {
|
|
1172
|
+
spline: {
|
|
1173
|
+
type: 'CATMULLROM',
|
|
1174
|
+
enableTwoPointPreview: true
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
}, {
|
|
1178
|
+
toolName: 'LinearSplineROI',
|
|
1179
|
+
parentTool: toolNames.SplineContourSegmentation,
|
|
1180
|
+
configuration: {
|
|
1181
|
+
spline: {
|
|
1182
|
+
type: 'LINEAR',
|
|
1183
|
+
enableTwoPointPreview: true
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
}, {
|
|
1187
|
+
toolName: 'BSplineROI',
|
|
1188
|
+
parentTool: toolNames.SplineContourSegmentation,
|
|
1189
|
+
configuration: {
|
|
1190
|
+
spline: {
|
|
1191
|
+
type: 'BSPLINE',
|
|
1192
|
+
enableTwoPointPreview: true
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
822
1195
|
}],
|
|
823
1196
|
disabled: [{
|
|
824
1197
|
toolName: toolNames.ReferenceLines
|
|
@@ -913,10 +1286,49 @@ function initToolGroups(extensionManager, toolGroupService, commandsManager) {
|
|
|
913
1286
|
initVolume3DToolGroup(extensionManager, toolGroupService);
|
|
914
1287
|
}
|
|
915
1288
|
/* harmony default export */ const src_initToolGroups = (initToolGroups);
|
|
1289
|
+
;// ../../../modes/segmentation/src/utils/setUpAutoTabSwitchHandler.ts
|
|
1290
|
+
/**
|
|
1291
|
+
* Sets up auto tab switching for when the first segmentation is added into the viewer.
|
|
1292
|
+
*/
|
|
1293
|
+
function setUpAutoTabSwitchHandler({
|
|
1294
|
+
segmentationService,
|
|
1295
|
+
viewportGridService,
|
|
1296
|
+
panelService
|
|
1297
|
+
}) {
|
|
1298
|
+
const autoTabSwitchEvents = [segmentationService.EVENTS.SEGMENTATION_MODIFIED, segmentationService.EVENTS.SEGMENTATION_REPRESENTATION_MODIFIED];
|
|
1299
|
+
|
|
1300
|
+
// Initially there are no segmentations, so we should switch the tab whenever the first segmentation is added.
|
|
1301
|
+
let shouldSwitchTab = true;
|
|
1302
|
+
const unsubscribeAutoTabSwitchEvents = autoTabSwitchEvents.map(eventName => segmentationService.subscribe(eventName, () => {
|
|
1303
|
+
const segmentations = segmentationService.getSegmentations();
|
|
1304
|
+
if (!segmentations.length) {
|
|
1305
|
+
// If all the segmentations are removed, then the next time a segmentation is added, we should switch the tab.
|
|
1306
|
+
shouldSwitchTab = true;
|
|
1307
|
+
return;
|
|
1308
|
+
}
|
|
1309
|
+
const activeViewportId = viewportGridService.getActiveViewportId();
|
|
1310
|
+
const activeRepresentation = segmentationService.getSegmentationRepresentations(activeViewportId)?.find(representation => representation.active);
|
|
1311
|
+
if (activeRepresentation && shouldSwitchTab) {
|
|
1312
|
+
shouldSwitchTab = false;
|
|
1313
|
+
switch (activeRepresentation.type) {
|
|
1314
|
+
case 'Labelmap':
|
|
1315
|
+
panelService.activatePanel('@ohif/extension-cornerstone.panelModule.panelSegmentationWithToolsLabelMap', true);
|
|
1316
|
+
break;
|
|
1317
|
+
case 'Contour':
|
|
1318
|
+
panelService.activatePanel('@ohif/extension-cornerstone.panelModule.panelSegmentationWithToolsContour', true);
|
|
1319
|
+
break;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
})).map(subscription => subscription.unsubscribe);
|
|
1323
|
+
return {
|
|
1324
|
+
unsubscribeAutoTabSwitchEvents
|
|
1325
|
+
};
|
|
1326
|
+
}
|
|
916
1327
|
;// ../../../modes/segmentation/src/index.tsx
|
|
917
1328
|
|
|
918
1329
|
|
|
919
1330
|
|
|
1331
|
+
|
|
920
1332
|
const ohif = {
|
|
921
1333
|
layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
|
|
922
1334
|
sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
|
|
@@ -925,7 +1337,8 @@ const ohif = {
|
|
|
925
1337
|
};
|
|
926
1338
|
const cornerstone = {
|
|
927
1339
|
viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone',
|
|
928
|
-
|
|
1340
|
+
labelMapSegmentationPanel: '@ohif/extension-cornerstone.panelModule.panelSegmentationWithToolsLabelMap',
|
|
1341
|
+
contourSegmentationPanel: '@ohif/extension-cornerstone.panelModule.panelSegmentationWithToolsContour',
|
|
929
1342
|
measurements: '@ohif/extension-cornerstone.panelModule.panelMeasurement'
|
|
930
1343
|
};
|
|
931
1344
|
const segmentation = {
|
|
@@ -949,6 +1362,7 @@ const extensionDependencies = {
|
|
|
949
1362
|
function modeFactory({
|
|
950
1363
|
modeConfiguration
|
|
951
1364
|
}) {
|
|
1365
|
+
const _unsubscriptions = [];
|
|
952
1366
|
return {
|
|
953
1367
|
/**
|
|
954
1368
|
* Mode ID, which should be unique among modes used by the viewer. This ID
|
|
@@ -974,7 +1388,9 @@ function modeFactory({
|
|
|
974
1388
|
measurementService,
|
|
975
1389
|
toolbarService,
|
|
976
1390
|
toolGroupService,
|
|
977
|
-
|
|
1391
|
+
segmentationService,
|
|
1392
|
+
viewportGridService,
|
|
1393
|
+
panelService
|
|
978
1394
|
} = servicesManager.services;
|
|
979
1395
|
measurementService.clearMeasurements();
|
|
980
1396
|
|
|
@@ -988,10 +1404,23 @@ function modeFactory({
|
|
|
988
1404
|
toolbarService.updateSection(toolbarService.sections.viewportActionMenu.topRight, ['modalityLoadBadge', 'trackingStatus', 'navigationComponent']);
|
|
989
1405
|
toolbarService.updateSection(toolbarService.sections.viewportActionMenu.bottomLeft, ['windowLevelMenu']);
|
|
990
1406
|
toolbarService.updateSection('MoreTools', ['Reset', 'rotate-right', 'flipHorizontal', 'ReferenceLines', 'ImageOverlayViewer', 'StackScroll', 'invert', 'Cine', 'Magnify', 'TagBrowser']);
|
|
991
|
-
toolbarService.updateSection(toolbarService.sections.
|
|
992
|
-
toolbarService.updateSection(
|
|
993
|
-
toolbarService.updateSection('
|
|
1407
|
+
toolbarService.updateSection(toolbarService.sections.labelMapSegmentationToolbox, ['LabelMapTools']);
|
|
1408
|
+
toolbarService.updateSection(toolbarService.sections.contourSegmentationToolbox, ['ContourTools']);
|
|
1409
|
+
toolbarService.updateSection('LabelMapTools', ['LabelmapSlicePropagation', 'BrushTools', 'MarkerLabelmap', 'RegionSegmentPlus', 'Shapes', 'LabelMapEditWithContour']);
|
|
1410
|
+
toolbarService.updateSection('ContourTools', ['PlanarFreehandContourSegmentationTool', 'SculptorTool', 'SplineContourSegmentationTool', 'LivewireContourSegmentationTool']);
|
|
1411
|
+
toolbarService.updateSection(toolbarService.sections.labelMapSegmentationUtilities, ['LabelMapUtilities']);
|
|
1412
|
+
toolbarService.updateSection(toolbarService.sections.contourSegmentationUtilities, ['ContourUtilities']);
|
|
1413
|
+
toolbarService.updateSection('LabelMapUtilities', ['InterpolateLabelmap', 'SegmentBidirectional']);
|
|
1414
|
+
toolbarService.updateSection('ContourUtilities', ['LogicalContourOperations', 'SimplifyContours', 'SmoothContours']);
|
|
994
1415
|
toolbarService.updateSection('BrushTools', ['Brush', 'Eraser', 'Threshold']);
|
|
1416
|
+
const {
|
|
1417
|
+
unsubscribeAutoTabSwitchEvents
|
|
1418
|
+
} = setUpAutoTabSwitchHandler({
|
|
1419
|
+
segmentationService,
|
|
1420
|
+
viewportGridService,
|
|
1421
|
+
panelService
|
|
1422
|
+
});
|
|
1423
|
+
_unsubscriptions.push(...unsubscribeAutoTabSwitchEvents);
|
|
995
1424
|
},
|
|
996
1425
|
onModeExit: ({
|
|
997
1426
|
servicesManager
|
|
@@ -1004,6 +1433,8 @@ function modeFactory({
|
|
|
1004
1433
|
uiDialogService,
|
|
1005
1434
|
uiModalService
|
|
1006
1435
|
} = servicesManager.services;
|
|
1436
|
+
_unsubscriptions.forEach(unsubscribe => unsubscribe());
|
|
1437
|
+
_unsubscriptions.length = 0;
|
|
1007
1438
|
uiDialogService.hideAll();
|
|
1008
1439
|
uiModalService.hide();
|
|
1009
1440
|
toolGroupService.destroy();
|
|
@@ -1055,7 +1486,7 @@ function modeFactory({
|
|
|
1055
1486
|
props: {
|
|
1056
1487
|
leftPanels: [ohif.leftPanel],
|
|
1057
1488
|
leftPanelResizable: true,
|
|
1058
|
-
rightPanels: [cornerstone.
|
|
1489
|
+
rightPanels: [cornerstone.contourSegmentationPanel, cornerstone.labelMapSegmentationPanel],
|
|
1059
1490
|
rightPanelResizable: true,
|
|
1060
1491
|
// leftPanelClosed: true,
|
|
1061
1492
|
viewports: [{
|