@ohif/app 3.8.0-beta.62 → 3.8.0-beta.64

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 (32) hide show
  1. package/dist/{121.bundle.ed23e7752a11005322e6.js → 121.bundle.5399d807995157d368b7.js} +4 -4
  2. package/dist/{155.bundle.19e63774cdf16306b5b6.js → 155.bundle.55fa02bfc411cc91e261.js} +12 -7
  3. package/dist/{188.bundle.7e085b90e138357e6789.js → 188.bundle.ec979013d89d90831c58.js} +2 -2
  4. package/dist/{270.bundle.36c4e95efb89ad8bd8ae.js → 270.bundle.58c74e58ad67b5069718.js} +51 -28
  5. package/dist/{295.bundle.462f3328c716cbe6c613.js → 295.bundle.c0a29ff64d86f707fc20.js} +4 -4
  6. package/dist/{339.bundle.2271a993c53d0728c816.js → 339.bundle.e31c81c7179d3d24f3dd.js} +27 -69
  7. package/dist/{68.bundle.0420d25b4736f20b15b2.js → 41.bundle.0696b28613c7d47833c9.js} +276 -486
  8. package/dist/{250.bundle.a064577944a0691bc77d.js → 448.bundle.e856d2b2bd979c7d9ac0.js} +238 -382
  9. package/dist/{530.bundle.ce13c30b93a28cc85098.js → 530.bundle.f00fd953dcd9d0afd10b.js} +2 -2
  10. package/dist/{544.bundle.3cf20da53f349abd8d67.js → 544.bundle.adfe5764f59b5fe0eba7.js} +5 -17
  11. package/dist/{559.bundle.42a8edafa1c7df761194.js → 559.bundle.4f55f5df04c418b2854e.js} +6 -10
  12. package/dist/{594.bundle.6667c5cc14b924d7bee6.js → 594.bundle.924cdc10e7435cf3e199.js} +147 -188
  13. package/dist/{50.bundle.a18826e121bdd0c2a707.js → 638.bundle.62f8f8ada74bd900abfc.js} +158 -394
  14. package/dist/{317.bundle.7ef949a52571bc04e7e1.js → 699.bundle.b3b25017819be681ef3d.js} +323 -186
  15. package/dist/{963.bundle.3daa5c08231526d905fb.js → 701.bundle.b7ebc1629fc121e13c58.js} +520 -210
  16. package/dist/{724.bundle.941cd2a3b43a84d5893f.js → 724.bundle.cd011bc1838a2bde1d66.js} +89 -152
  17. package/dist/{862.bundle.e3fe2aae7903cc2ae8df.js → 862.bundle.d2e78b70286b59569e83.js} +2 -2
  18. package/dist/{889.bundle.6850a0b8c412e3befab5.js → 889.bundle.2aefa0a3eb114db0de3f.js} +180 -207
  19. package/dist/{704.bundle.242ba4e0b0be7d1fec94.js → 90.bundle.7a9258532111121b5ee3.js} +228 -338
  20. package/dist/{905.bundle.eb7bdaec4276399e5bef.js → 905.bundle.d4bdcbd451de59b2191b.js} +119 -89
  21. package/dist/{907.bundle.fc8115500a085ab2bbec.js → 907.bundle.ca236b83967a8459b778.js} +2 -14
  22. package/dist/{961.bundle.f5d9e73fa771ce7e73f3.js → 961.bundle.a5541d8090cb8b22f7e6.js} +2 -15
  23. package/dist/{987.bundle.e7c041a6dfb4ddb41813.js → 987.bundle.91d4867efedd5b4d84cb.js} +5 -1
  24. package/dist/{app.bundle.a78a51e39321426c5460.js → app.bundle.039c4dc99821370f330d.js} +1991 -931
  25. package/dist/app.bundle.css +1 -1
  26. package/dist/index.html +1 -1
  27. package/dist/{polySeg.bundle.99be036bab9b7f011b0c.js → polySeg.bundle.c1cec6312eb6c6dc3701.js} +1 -1
  28. package/dist/sw.js +1 -1
  29. package/package.json +17 -17
  30. /package/dist/{164.bundle.0b17fced9916487eb49f.js → 164.bundle.0cfa2edabf8ef222f3ea.js} +0 -0
  31. /package/dist/{50.css → 638.css} +0 -0
  32. /package/dist/{963.css → 701.css} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[68],{
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[41],{
3
3
 
4
- /***/ 76068:
4
+ /***/ 97041:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
6
 
7
7
  // ESM COMPAT FLAG
@@ -15,8 +15,8 @@ __webpack_require__.d(__webpack_exports__, {
15
15
  toolbarButtons: () => (/* reexport */ src_toolbarButtons)
16
16
  });
17
17
 
18
- // EXTERNAL MODULE: ../../core/src/index.ts + 66 modules
19
- var src = __webpack_require__(14283);
18
+ // EXTERNAL MODULE: ../../core/src/index.ts + 67 modules
19
+ var src = __webpack_require__(78198);
20
20
  // EXTERNAL MODULE: ../../../node_modules/i18next/dist/esm/i18next.js
21
21
  var i18next = __webpack_require__(92344);
22
22
  ;// CONCATENATED MODULE: ../../../modes/longitudinal/package.json
@@ -95,15 +95,13 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage
95
95
  // enabled
96
96
  enabled: [{
97
97
  toolName: toolNames.ImageOverlayViewer
98
- }],
99
- // disabled
100
- disabled: [{
98
+ }, {
101
99
  toolName: toolNames.ReferenceLines
102
100
  }]
103
101
  };
104
102
  toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
105
103
  }
106
- function initSRToolGroup(extensionManager, toolGroupService, commandsManager) {
104
+ function initSRToolGroup(extensionManager, toolGroupService) {
107
105
  const SRUtilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone-dicom-sr.utilityModule.tools');
108
106
  if (!SRUtilityModule) {
109
107
  return;
@@ -222,6 +220,7 @@ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
222
220
  toolName: toolNames.Crosshairs,
223
221
  configuration: {
224
222
  viewportIndicators: false,
223
+ disableOnPassive: true,
225
224
  autoPan: {
226
225
  enabled: false,
227
226
  panSize: 10
@@ -264,299 +263,13 @@ function initVolume3DToolGroup(extensionManager, toolGroupService) {
264
263
  }
265
264
  function initToolGroups(extensionManager, toolGroupService, commandsManager) {
266
265
  initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, 'default');
267
- initSRToolGroup(extensionManager, toolGroupService, commandsManager);
266
+ initSRToolGroup(extensionManager, toolGroupService);
268
267
  initMPRToolGroup(extensionManager, toolGroupService, commandsManager);
269
268
  initVolume3DToolGroup(extensionManager, toolGroupService);
270
269
  }
271
270
  /* harmony default export */ const src_initToolGroups = (initToolGroups);
272
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
273
- var esm = __webpack_require__(50719);
274
- ;// CONCATENATED MODULE: ../../../modes/longitudinal/src/moreTools.ts
275
-
276
-
277
- const ReferenceLinesCommands = [{
278
- commandName: 'setSourceViewportForReferenceLinesTool',
279
- context: 'CORNERSTONE'
280
- }, {
281
- commandName: 'setToolActive',
282
- commandOptions: {
283
- toolName: 'ReferenceLines'
284
- },
285
- context: 'CORNERSTONE'
286
- }];
287
- const moreTools = [{
288
- id: 'MoreTools',
289
- type: 'ohif.splitButton',
290
- props: {
291
- isRadio: true,
292
- // ?
293
- groupId: 'MoreTools',
294
- primary: src/* ToolbarService */.hx._createActionButton('Reset', 'tool-reset', 'Reset View', [{
295
- commandName: 'resetViewport',
296
- commandOptions: {},
297
- context: 'CORNERSTONE'
298
- }], 'Reset'),
299
- secondary: {
300
- icon: 'chevron-down',
301
- label: '',
302
- isActive: true,
303
- tooltip: 'More Tools'
304
- },
305
- items: [src/* ToolbarService */.hx._createActionButton('Reset', 'tool-reset', 'Reset View', [{
306
- commandName: 'resetViewport',
307
- commandOptions: {},
308
- context: 'CORNERSTONE'
309
- }], 'Reset'), src/* ToolbarService */.hx._createActionButton('rotate-right', 'tool-rotate-right', 'Rotate Right', [{
310
- commandName: 'rotateViewportCW',
311
- commandOptions: {},
312
- context: 'CORNERSTONE'
313
- }], 'Rotate +90'), src/* ToolbarService */.hx._createActionButton('flip-horizontal', 'tool-flip-horizontal', 'Flip Horizontally', [{
314
- commandName: 'flipViewportHorizontal',
315
- commandOptions: {},
316
- context: 'CORNERSTONE'
317
- }], 'Flip Horizontal'), src/* ToolbarService */.hx._createToggleButton('ImageSliceSync', 'link', 'Image Slice Sync', [{
318
- commandName: 'toggleImageSliceSync'
319
- }], 'Enable position synchronization on stack viewports', {
320
- listeners: {
321
- [esm.EVENTS.STACK_VIEWPORT_NEW_STACK]: {
322
- commandName: 'toggleImageSliceSync',
323
- commandOptions: {
324
- toggledState: true
325
- }
326
- }
327
- }
328
- }), src/* ToolbarService */.hx._createToggleButton('ReferenceLines', 'tool-referenceLines',
329
- // change this with the new icon
330
- 'Reference Lines', ReferenceLinesCommands, 'Show Reference Lines', {
331
- listeners: {
332
- [esm.EVENTS.STACK_VIEWPORT_NEW_STACK]: ReferenceLinesCommands,
333
- [esm.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: ReferenceLinesCommands
334
- }
335
- }), src/* ToolbarService */.hx._createToggleButton('ImageOverlayViewer', 'toggle-dicom-overlay', 'Image Overlay', [{
336
- commandName: 'setToolActive',
337
- commandOptions: {
338
- toolName: 'ImageOverlayViewer'
339
- },
340
- context: 'CORNERSTONE'
341
- }], 'Image Overlay', {
342
- isActive: true
343
- }), src/* ToolbarService */.hx._createToolButton('StackScroll', 'tool-stack-scroll', 'Stack Scroll', [{
344
- commandName: 'setToolActive',
345
- commandOptions: {
346
- toolName: 'StackScroll'
347
- },
348
- context: 'CORNERSTONE'
349
- }], 'Stack Scroll'), src/* ToolbarService */.hx._createActionButton('invert', 'tool-invert', 'Invert', [{
350
- commandName: 'invertViewport',
351
- commandOptions: {},
352
- context: 'CORNERSTONE'
353
- }], 'Invert Colors'), src/* ToolbarService */.hx._createToolButton('Probe', 'tool-probe', 'Probe', [{
354
- commandName: 'setToolActive',
355
- commandOptions: {
356
- toolName: 'DragProbe'
357
- },
358
- context: 'CORNERSTONE'
359
- }], 'Probe'), src/* ToolbarService */.hx._createToggleButton('cine', 'tool-cine', 'Cine', [{
360
- commandName: 'toggleCine',
361
- context: 'CORNERSTONE'
362
- }], 'Cine'), src/* ToolbarService */.hx._createToolButton('Angle', 'tool-angle', 'Angle', [{
363
- commandName: 'setToolActive',
364
- commandOptions: {
365
- toolName: 'Angle'
366
- },
367
- context: 'CORNERSTONE'
368
- }], 'Angle'),
369
- // Next two tools can be added once icons are added
370
- // ToolbarService._createToolButton(
371
- // 'Cobb Angle',
372
- // 'tool-cobb-angle',
373
- // 'Cobb Angle',
374
- // [
375
- // {
376
- // commandName: 'setToolActive',
377
- // commandOptions: {
378
- // toolName: 'CobbAngle',
379
- // },
380
- // context: 'CORNERSTONE',
381
- // },
382
- // ],
383
- // 'Cobb Angle'
384
- // ),
385
- // ToolbarService._createToolButton(
386
- // 'Planar Freehand ROI',
387
- // 'tool-freehand',
388
- // 'PlanarFreehandROI',
389
- // [
390
- // {
391
- // commandName: 'setToolActive',
392
- // commandOptions: {
393
- // toolName: 'PlanarFreehandROI',
394
- // },
395
- // context: 'CORNERSTONE',
396
- // },
397
- // ],
398
- // 'Planar Freehand ROI'
399
- // ),
400
- src/* ToolbarService */.hx._createToolButton('Magnify', 'tool-magnify', 'Magnify', [{
401
- commandName: 'setToolActive',
402
- commandOptions: {
403
- toolName: 'Magnify'
404
- },
405
- context: 'CORNERSTONE'
406
- }], 'Magnify'), src/* ToolbarService */.hx._createToolButton('Rectangle', 'tool-rectangle', 'Rectangle', [{
407
- commandName: 'setToolActive',
408
- commandOptions: {
409
- toolName: 'RectangleROI'
410
- },
411
- context: 'CORNERSTONE'
412
- }], 'Rectangle'), src/* ToolbarService */.hx._createToolButton('CalibrationLine', 'tool-calibration', 'Calibration', [{
413
- commandName: 'setToolActive',
414
- commandOptions: {
415
- toolName: 'CalibrationLine'
416
- },
417
- context: 'CORNERSTONE'
418
- }], 'Calibration Line'), src/* ToolbarService */.hx._createActionButton('TagBrowser', 'list-bullets', 'Dicom Tag Browser', [{
419
- commandName: 'openDICOMTagViewer',
420
- commandOptions: {},
421
- context: 'DEFAULT'
422
- }], 'Dicom Tag Browser')]
423
- }
424
- }];
425
- /* harmony default export */ const src_moreTools = (moreTools);
426
- ;// CONCATENATED MODULE: ../../../modes/longitudinal/src/moreToolsMpr.ts
427
-
428
-
429
- const moreToolsMpr_ReferenceLinesCommands = [{
430
- commandName: 'setSourceViewportForReferenceLinesTool',
431
- context: 'CORNERSTONE'
432
- }, {
433
- commandName: 'setToolActive',
434
- commandOptions: {
435
- toolName: 'ReferenceLines'
436
- },
437
- context: 'CORNERSTONE'
438
- }];
439
- const moreToolsMpr = [{
440
- id: 'MoreToolsMpr',
441
- type: 'ohif.splitButton',
442
- props: {
443
- isRadio: true,
444
- // ?
445
- groupId: 'MoreTools',
446
- primary: src/* ToolbarService */.hx._createActionButton('Reset', 'tool-reset', 'Reset View', [{
447
- commandName: 'resetViewport',
448
- commandOptions: {},
449
- context: 'CORNERSTONE'
450
- }], 'Reset'),
451
- secondary: {
452
- icon: 'chevron-down',
453
- label: '',
454
- isActive: true,
455
- tooltip: 'More Tools'
456
- },
457
- items: [src/* ToolbarService */.hx._createActionButton('Reset', 'tool-reset', 'Reset View', [{
458
- commandName: 'resetViewport',
459
- commandOptions: {},
460
- context: 'CORNERSTONE'
461
- }], 'Reset'), src/* ToolbarService */.hx._createToggleButton('ImageSliceSync', 'link', 'Image Slice Sync', [{
462
- commandName: 'toggleImageSliceSync'
463
- }], 'Enable position synchronization on stack viewports', {
464
- listeners: {
465
- [esm.EVENTS.STACK_VIEWPORT_NEW_STACK]: {
466
- commandName: 'toggleImageSliceSync',
467
- commandOptions: {
468
- toggledState: true
469
- }
470
- }
471
- }
472
- }), src/* ToolbarService */.hx._createToggleButton('ReferenceLines', 'tool-referenceLines',
473
- // change this with the new icon
474
- 'Reference Lines', moreToolsMpr_ReferenceLinesCommands, 'Show Reference Lines', {
475
- listeners: {
476
- [esm.EVENTS.STACK_VIEWPORT_NEW_STACK]: moreToolsMpr_ReferenceLinesCommands,
477
- [esm.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: moreToolsMpr_ReferenceLinesCommands
478
- }
479
- }), src/* ToolbarService */.hx._createToggleButton('ImageOverlayViewer', 'toggle-dicom-overlay', 'Image Overlay', [{
480
- commandName: 'setToolActive',
481
- commandOptions: {
482
- toolName: 'ImageOverlayViewer'
483
- },
484
- context: 'CORNERSTONE'
485
- }], 'Image Overlay', {
486
- isActive: true
487
- }), src/* ToolbarService */.hx._createToolButton('StackScroll', 'tool-stack-scroll', 'Stack Scroll', [{
488
- commandName: 'setToolActive',
489
- commandOptions: {
490
- toolName: 'StackScroll'
491
- },
492
- context: 'CORNERSTONE'
493
- }], 'Stack Scroll'), src/* ToolbarService */.hx._createActionButton('invert', 'tool-invert', 'Invert', [{
494
- commandName: 'invertViewport',
495
- commandOptions: {},
496
- context: 'CORNERSTONE'
497
- }], 'Invert Colors'), src/* ToolbarService */.hx._createToolButton('Probe', 'tool-probe', 'Probe', [{
498
- commandName: 'setToolActive',
499
- commandOptions: {
500
- toolName: 'DragProbe'
501
- },
502
- context: 'CORNERSTONE'
503
- }], 'Probe'), src/* ToolbarService */.hx._createToggleButton('cine', 'tool-cine', 'Cine', [{
504
- commandName: 'toggleCine',
505
- context: 'CORNERSTONE'
506
- }], 'Cine'), src/* ToolbarService */.hx._createToolButton('Angle', 'tool-angle', 'Angle', [{
507
- commandName: 'setToolActive',
508
- commandOptions: {
509
- toolName: 'Angle'
510
- },
511
- context: 'CORNERSTONE'
512
- }], 'Angle'),
513
- // Next two tools can be added once icons are added
514
- // ToolbarService._createToolButton(
515
- // 'Cobb Angle',
516
- // 'tool-cobb-angle',
517
- // 'Cobb Angle',
518
- // [
519
- // {
520
- // commandName: 'setToolActive',
521
- // commandOptions: {
522
- // toolName: 'CobbAngle',
523
- // },
524
- // context: 'CORNERSTONE',
525
- // },
526
- // ],
527
- // 'Cobb Angle'
528
- // ),
529
- // ToolbarService._createToolButton(
530
- // 'Planar Freehand ROI',
531
- // 'tool-freehand',
532
- // 'PlanarFreehandROI',
533
- // [
534
- // {
535
- // commandName: 'setToolActive',
536
- // commandOptions: {
537
- // toolName: 'PlanarFreehandROI',
538
- // },
539
- // context: 'CORNERSTONE',
540
- // },
541
- // ],
542
- // 'Planar Freehand ROI'
543
- // ),
544
- src/* ToolbarService */.hx._createToolButton('Rectangle', 'tool-rectangle', 'Rectangle', [{
545
- commandName: 'setToolActive',
546
- commandOptions: {
547
- toolName: 'RectangleROI'
548
- },
549
- context: 'CORNERSTONE'
550
- }], 'Rectangle'), src/* ToolbarService */.hx._createActionButton('TagBrowser', 'list-bullets', 'Dicom Tag Browser', [{
551
- commandName: 'openDICOMTagViewer',
552
- commandOptions: {},
553
- context: 'DEFAULT'
554
- }], 'Dicom Tag Browser')]
555
- }
556
- }];
557
- /* harmony default export */ const src_moreToolsMpr = (moreToolsMpr);
558
- // EXTERNAL MODULE: ../../ui/src/index.js + 487 modules
559
- var ui_src = __webpack_require__(55395);
271
+ // EXTERNAL MODULE: ../../ui/src/index.js + 495 modules
272
+ var ui_src = __webpack_require__(65967);
560
273
  ;// CONCATENATED MODULE: ../../../modes/longitudinal/src/toolbarButtons.ts
561
274
  // TODO: torn, can either bake this here; or have to create a whole new button type
562
275
  // Only ways that you can pass in a custom React component for render :l
@@ -565,6 +278,9 @@ var ui_src = __webpack_require__(55395);
565
278
  const {
566
279
  windowLevelPresets
567
280
  } = src.defaults;
281
+ const {
282
+ createButton
283
+ } = src.ToolbarService;
568
284
 
569
285
  /**
570
286
  *
@@ -577,7 +293,6 @@ function _createWwwcPreset(preset, title, subtitle) {
577
293
  id: preset.toString(),
578
294
  title,
579
295
  subtitle,
580
- type: 'action',
581
296
  commands: [{
582
297
  commandName: 'setWindowLevel',
583
298
  commandOptions: {
@@ -587,157 +302,97 @@ function _createWwwcPreset(preset, title, subtitle) {
587
302
  }]
588
303
  };
589
304
  }
590
- const toolGroupIds = ['default', 'mpr', 'SRToolGroup'];
591
-
592
- /**
593
- * Creates an array of 'setToolActive' commands for the given toolName - one for
594
- * each toolGroupId specified in toolGroupIds.
595
- * @param {string} toolName
596
- * @returns {Array} an array of 'setToolActive' commands
597
- */
598
- function _createSetToolActiveCommands(toolName) {
599
- const temp = toolGroupIds.map(toolGroupId => ({
600
- commandName: 'setToolActive',
601
- commandOptions: {
602
- toolGroupId,
603
- toolName
604
- },
605
- context: 'CORNERSTONE'
606
- }));
607
- return temp;
608
- }
609
- const toolbarButtons = [
610
- // Measurement
611
- {
305
+ const setToolActiveToolbar = {
306
+ commandName: 'setToolActiveToolbar',
307
+ commandOptions: {
308
+ toolGroupIds: ['default', 'mpr', 'SRToolGroup']
309
+ }
310
+ };
311
+ const toolbarButtons = [{
612
312
  id: 'MeasurementTools',
613
- type: 'ohif.splitButton',
313
+ uiType: 'ohif.splitButton',
614
314
  props: {
615
315
  groupId: 'MeasurementTools',
616
- isRadio: true,
617
- // ?
618
- // Switch?
619
- primary: src/* ToolbarService */.hx._createToolButton('Length', 'tool-length', 'Length', [{
620
- commandName: 'setToolActive',
621
- commandOptions: {
622
- toolName: 'Length'
623
- },
624
- context: 'CORNERSTONE'
625
- }, {
626
- commandName: 'setToolActive',
627
- commandOptions: {
628
- toolName: 'SRLength',
629
- toolGroupId: 'SRToolGroup'
630
- },
631
- // we can use the setToolActive command for this from Cornerstone commandsModule
632
- context: 'CORNERSTONE'
633
- }], 'Length'),
316
+ // group evaluate to determine which item should move to the top
317
+ evaluate: 'evaluate.group.promoteToPrimaryIfCornerstoneToolNotActiveInTheList',
318
+ primary: createButton({
319
+ id: 'Length',
320
+ icon: 'tool-length',
321
+ label: 'Length',
322
+ tooltip: 'Length Tool',
323
+ commands: setToolActiveToolbar,
324
+ evaluate: 'evaluate.cornerstoneTool'
325
+ }),
634
326
  secondary: {
635
327
  icon: 'chevron-down',
636
- label: '',
637
- isActive: true,
638
328
  tooltip: 'More Measure Tools'
639
329
  },
640
- items: [src/* ToolbarService */.hx._createToolButton('Length', 'tool-length', 'Length', [{
641
- commandName: 'setToolActive',
642
- commandOptions: {
643
- toolName: 'Length'
644
- },
645
- context: 'CORNERSTONE'
646
- }, {
647
- commandName: 'setToolActive',
648
- commandOptions: {
649
- toolName: 'SRLength',
650
- toolGroupId: 'SRToolGroup'
651
- },
652
- // we can use the setToolActive command for this from Cornerstone commandsModule
653
- context: 'CORNERSTONE'
654
- }], 'Length Tool'), src/* ToolbarService */.hx._createToolButton('Bidirectional', 'tool-bidirectional', 'Bidirectional', [{
655
- commandName: 'setToolActive',
656
- commandOptions: {
657
- toolName: 'Bidirectional'
658
- },
659
- context: 'CORNERSTONE'
660
- }, {
661
- commandName: 'setToolActive',
662
- commandOptions: {
663
- toolName: 'SRBidirectional',
664
- toolGroupId: 'SRToolGroup'
665
- },
666
- context: 'CORNERSTONE'
667
- }], 'Bidirectional Tool'), src/* ToolbarService */.hx._createToolButton('ArrowAnnotate', 'tool-annotate', 'Annotation', [{
668
- commandName: 'setToolActive',
669
- commandOptions: {
670
- toolName: 'ArrowAnnotate'
671
- },
672
- context: 'CORNERSTONE'
673
- }, {
674
- commandName: 'setToolActive',
675
- commandOptions: {
676
- toolName: 'SRArrowAnnotate',
677
- toolGroupId: 'SRToolGroup'
678
- },
679
- context: 'CORNERSTONE'
680
- }], 'Arrow Annotate'), src/* ToolbarService */.hx._createToolButton('EllipticalROI', 'tool-elipse', 'Ellipse', [{
681
- commandName: 'setToolActive',
682
- commandOptions: {
683
- toolName: 'EllipticalROI'
684
- },
685
- context: 'CORNERSTONE'
686
- }, {
687
- commandName: 'setToolActive',
688
- commandOptions: {
689
- toolName: 'SREllipticalROI',
690
- toolGroupId: 'SRToolGroup'
691
- },
692
- context: 'CORNERSTONE'
693
- }], 'Ellipse Tool'), src/* ToolbarService */.hx._createToolButton('CircleROI', 'tool-circle', 'Circle', [{
694
- commandName: 'setToolActive',
695
- commandOptions: {
696
- toolName: 'CircleROI'
697
- },
698
- context: 'CORNERSTONE'
699
- }, {
700
- commandName: 'setToolActive',
701
- commandOptions: {
702
- toolName: 'SRCircleROI',
703
- toolGroupId: 'SRToolGroup'
704
- },
705
- context: 'CORNERSTONE'
706
- }], 'Circle Tool')]
330
+ items: [createButton({
331
+ id: 'Length',
332
+ icon: 'tool-length',
333
+ label: 'Length',
334
+ tooltip: 'Length Tool',
335
+ commands: setToolActiveToolbar,
336
+ evaluate: 'evaluate.cornerstoneTool'
337
+ }), createButton({
338
+ id: 'Bidirectional',
339
+ icon: 'tool-bidirectional',
340
+ label: 'Bidirectional',
341
+ tooltip: 'Bidirectional Tool',
342
+ commands: setToolActiveToolbar,
343
+ evaluate: 'evaluate.cornerstoneTool'
344
+ }), createButton({
345
+ id: 'ArrowAnnotate',
346
+ icon: 'tool-annotate',
347
+ label: 'Annotation',
348
+ tooltip: 'Arrow Annotate',
349
+ commands: setToolActiveToolbar,
350
+ evaluate: 'evaluate.cornerstoneTool'
351
+ }), createButton({
352
+ id: 'EllipticalROI',
353
+ icon: 'tool-ellipse',
354
+ label: 'Ellipse',
355
+ tooltip: 'Ellipse ROI',
356
+ commands: setToolActiveToolbar,
357
+ evaluate: 'evaluate.cornerstoneTool'
358
+ }), createButton({
359
+ id: 'CircleROI',
360
+ icon: 'tool-circle',
361
+ label: 'Circle',
362
+ tooltip: 'Circle Tool',
363
+ commands: setToolActiveToolbar,
364
+ evaluate: 'evaluate.cornerstoneTool'
365
+ })]
707
366
  }
708
- },
709
- // Zoom..
710
- {
367
+ }, {
711
368
  id: 'Zoom',
712
- type: 'ohif.radioGroup',
369
+ uiType: 'ohif.radioGroup',
713
370
  props: {
714
- type: 'tool',
715
371
  icon: 'tool-zoom',
716
372
  label: 'Zoom',
717
- commands: _createSetToolActiveCommands('Zoom')
373
+ commands: setToolActiveToolbar,
374
+ evaluate: 'evaluate.cornerstoneTool'
718
375
  }
719
376
  },
720
377
  // Window Level + Presets...
721
378
  {
722
379
  id: 'WindowLevel',
723
- type: 'ohif.splitButton',
380
+ uiType: 'ohif.splitButton',
724
381
  props: {
725
382
  groupId: 'WindowLevel',
726
- primary: src/* ToolbarService */.hx._createToolButton('WindowLevel', 'tool-window-level', 'Window Level', [{
727
- commandName: 'setToolActive',
728
- commandOptions: {
729
- toolName: 'WindowLevel'
730
- },
731
- context: 'CORNERSTONE'
732
- }], 'Window Level'),
383
+ primary: createButton({
384
+ id: 'WindowLevel',
385
+ icon: 'tool-window-level',
386
+ label: 'Window Level',
387
+ tooltip: 'Window Level',
388
+ commands: setToolActiveToolbar,
389
+ evaluate: 'evaluate.cornerstoneTool'
390
+ }),
733
391
  secondary: {
734
392
  icon: 'chevron-down',
735
393
  label: 'W/L Manual',
736
- isActive: true,
737
394
  tooltip: 'W/L Presets'
738
395
  },
739
- isAction: true,
740
- // ?
741
396
  renderer: ui_src/* WindowLevelMenuItem */.d4,
742
397
  items: [_createWwwcPreset(1, 'Soft tissue', '400 / 40'), _createWwwcPreset(2, 'Lung', '1500 / -600'), _createWwwcPreset(3, 'Liver', '150 / 90'), _createWwwcPreset(4, 'Bone', '2500 / 480'), _createWwwcPreset(5, 'Brain', '80 / 40')]
743
398
  }
@@ -745,72 +400,239 @@ const toolbarButtons = [
745
400
  // Pan...
746
401
  {
747
402
  id: 'Pan',
748
- type: 'ohif.radioGroup',
403
+ uiType: 'ohif.radioGroup',
749
404
  props: {
750
405
  type: 'tool',
751
406
  icon: 'tool-move',
752
407
  label: 'Pan',
753
- commands: _createSetToolActiveCommands('Pan')
408
+ commands: setToolActiveToolbar,
409
+ evaluate: 'evaluate.cornerstoneTool'
754
410
  }
755
411
  }, {
756
412
  id: 'Capture',
757
- type: 'ohif.action',
413
+ uiType: 'ohif.radioGroup',
758
414
  props: {
759
415
  icon: 'tool-capture',
760
416
  label: 'Capture',
761
- type: 'action',
762
417
  commands: [{
763
- commandName: 'showDownloadViewportModal',
764
- commandOptions: {},
765
- context: 'CORNERSTONE'
766
- }]
418
+ commandName: 'showDownloadViewportModal'
419
+ }],
420
+ evaluate: 'evaluate.action'
767
421
  }
768
422
  }, {
769
423
  id: 'Layout',
770
- type: 'ohif.layoutSelector',
424
+ uiType: 'ohif.layoutSelector',
771
425
  props: {
772
426
  rows: 3,
773
- columns: 3
427
+ columns: 3,
428
+ evaluate: 'evaluate.action',
429
+ commands: [{
430
+ commandName: 'setViewportGridLayout'
431
+ }]
774
432
  }
775
433
  }, {
776
434
  id: 'MPR',
777
- type: 'ohif.action',
435
+ uiType: 'ohif.radioGroup',
778
436
  props: {
779
- type: 'toggle',
780
437
  icon: 'icon-mpr',
781
438
  label: 'MPR',
782
439
  commands: [{
783
440
  commandName: 'toggleHangingProtocol',
784
441
  commandOptions: {
785
442
  protocolId: 'mpr'
786
- },
787
- context: 'DEFAULT'
788
- }]
443
+ }
444
+ }],
445
+ evaluate: 'evaluate.mpr'
789
446
  }
790
447
  }, {
791
448
  id: 'Crosshairs',
792
- type: 'ohif.radioGroup',
449
+ uiType: 'ohif.radioGroup',
793
450
  props: {
794
451
  type: 'tool',
795
452
  icon: 'tool-crosshair',
796
453
  label: 'Crosshairs',
797
- commands: [{
798
- commandName: 'setToolActive',
454
+ commands: {
455
+ commandName: 'setToolActiveToolbar',
799
456
  commandOptions: {
800
- toolName: 'Crosshairs',
801
- toolGroupId: 'mpr'
802
- },
803
- context: 'CORNERSTONE'
804
- }]
457
+ toolGroupIds: ['mpr']
458
+ }
459
+ },
460
+ evaluate: 'evaluate.cornerstoneTool'
805
461
  }
806
- }
807
- // More...
808
- ];
462
+ }];
809
463
  /* harmony default export */ const src_toolbarButtons = (toolbarButtons);
810
- ;// CONCATENATED MODULE: ../../../modes/longitudinal/src/index.js
464
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
465
+ var esm = __webpack_require__(50719);
466
+ ;// CONCATENATED MODULE: ../../../modes/longitudinal/src/moreTools.ts
811
467
 
812
468
 
813
469
 
470
+ const {
471
+ createButton: moreTools_createButton
472
+ } = src.ToolbarService;
473
+ const ReferenceLinesListeners = [{
474
+ commandName: 'setSourceViewportForReferenceLinesTool',
475
+ context: 'CORNERSTONE'
476
+ }];
477
+ const moreTools = [{
478
+ id: 'MoreTools',
479
+ uiType: 'ohif.splitButton',
480
+ props: {
481
+ groupId: 'MoreTools',
482
+ evaluate: 'evaluate.group.promoteToPrimaryIfCornerstoneToolNotActiveInTheList',
483
+ primary: moreTools_createButton({
484
+ id: 'Reset',
485
+ icon: 'tool-reset',
486
+ tooltip: 'Reset View',
487
+ label: 'Reset',
488
+ commands: 'resetViewport',
489
+ evaluate: 'evaluate.action'
490
+ }),
491
+ secondary: {
492
+ icon: 'chevron-down',
493
+ label: '',
494
+ tooltip: 'More Tools'
495
+ },
496
+ items: [moreTools_createButton({
497
+ id: 'Reset',
498
+ icon: 'tool-reset',
499
+ label: 'Reset View',
500
+ tooltip: 'Reset View',
501
+ commands: 'resetViewport',
502
+ evaluate: 'evaluate.action'
503
+ }), moreTools_createButton({
504
+ id: 'rotate-right',
505
+ icon: 'tool-rotate-right',
506
+ label: 'Rotate Right',
507
+ tooltip: 'Rotate +90',
508
+ commands: 'rotateViewportCW',
509
+ evaluate: 'evaluate.action'
510
+ }), moreTools_createButton({
511
+ id: 'flipHorizontal',
512
+ icon: 'tool-flip-horizontal',
513
+ label: 'Flip Horizontal',
514
+ tooltip: 'Flip Horizontally',
515
+ commands: 'flipViewportHorizontal',
516
+ evaluate: 'evaluate.viewportProperties.toggle'
517
+ }), moreTools_createButton({
518
+ id: 'ImageSliceSync',
519
+ icon: 'link',
520
+ label: 'Image Slice Sync',
521
+ tooltip: 'Enable position synchronization on stack viewports',
522
+ commands: {
523
+ commandName: 'toggleSynchronizer',
524
+ commandOptions: {
525
+ type: 'imageSlice'
526
+ }
527
+ },
528
+ listeners: {
529
+ [esm.EVENTS.STACK_VIEWPORT_NEW_STACK]: {
530
+ commandName: 'toggleImageSliceSync',
531
+ commandOptions: {
532
+ toggledState: true
533
+ }
534
+ }
535
+ },
536
+ evaluate: 'evaluate.cornerstone.synchronizer'
537
+ }), moreTools_createButton({
538
+ id: 'ReferenceLines',
539
+ icon: 'tool-referenceLines',
540
+ label: 'Reference Lines',
541
+ tooltip: 'Show Reference Lines',
542
+ commands: {
543
+ commandName: 'setToolEnabled',
544
+ commandOptions: {
545
+ toolName: 'ReferenceLines',
546
+ toggle: true // Toggle the tool on/off upon click
547
+ }
548
+ },
549
+ listeners: {
550
+ [src/* ViewportGridService */.sI.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: ReferenceLinesListeners,
551
+ [src/* ViewportGridService */.sI.EVENTS.VIEWPORTS_READY]: ReferenceLinesListeners
552
+ },
553
+ evaluate: 'evaluate.cornerstoneTool.toggle'
554
+ }), moreTools_createButton({
555
+ id: 'ImageOverlay',
556
+ icon: 'toggle-dicom-overlay',
557
+ label: 'Image Overlay',
558
+ tooltip: 'Toggle Image Overlay',
559
+ commands: {
560
+ commandName: 'setToolEnabled',
561
+ commandOptions: {
562
+ toolName: 'ImageOverlayViewer',
563
+ toggle: true // Toggle the tool on/off upon click
564
+ }
565
+ },
566
+ evaluate: 'evaluate.cornerstoneTool.toggle'
567
+ }), moreTools_createButton({
568
+ id: 'StackScroll',
569
+ icon: 'tool-stack-scroll',
570
+ label: 'Stack Scroll',
571
+ tooltip: 'Stack Scroll',
572
+ commands: setToolActiveToolbar,
573
+ evaluate: 'evaluate.cornerstoneTool'
574
+ }), moreTools_createButton({
575
+ id: 'invert',
576
+ icon: 'tool-invert',
577
+ label: 'Invert',
578
+ tooltip: 'Invert Colors',
579
+ commands: 'invertViewport',
580
+ evaluate: 'evaluate.viewportProperties.toggle'
581
+ }), moreTools_createButton({
582
+ id: 'Probe',
583
+ icon: 'tool-probe',
584
+ label: 'Probe',
585
+ tooltip: 'Probe',
586
+ commands: setToolActiveToolbar,
587
+ evaluate: 'evaluate.cornerstoneTool'
588
+ }), moreTools_createButton({
589
+ id: 'Cine',
590
+ icon: 'tool-cine',
591
+ label: 'Cine',
592
+ tooltip: 'Cine',
593
+ commands: 'toggleCine',
594
+ evaluate: 'evaluate.cine'
595
+ }), moreTools_createButton({
596
+ id: 'Angle',
597
+ icon: 'tool-angle',
598
+ label: 'Angle',
599
+ tooltip: 'Angle',
600
+ commands: setToolActiveToolbar,
601
+ evaluate: 'evaluate.cornerstoneTool'
602
+ }), moreTools_createButton({
603
+ id: 'Magnify',
604
+ icon: 'tool-magnify',
605
+ label: 'Magnify',
606
+ tooltip: 'Magnify',
607
+ commands: setToolActiveToolbar,
608
+ evaluate: 'evaluate.cornerstoneTool'
609
+ }), moreTools_createButton({
610
+ id: 'RectangleROI',
611
+ icon: 'tool-rectangle',
612
+ label: 'Rectangle',
613
+ tooltip: 'Rectangle',
614
+ commands: setToolActiveToolbar,
615
+ evaluate: 'evaluate.cornerstoneTool'
616
+ }), moreTools_createButton({
617
+ id: 'CalibrationLine',
618
+ icon: 'tool-calibration',
619
+ label: 'Calibration',
620
+ tooltip: 'Calibration Line',
621
+ commands: setToolActiveToolbar,
622
+ evaluate: 'evaluate.cornerstoneTool'
623
+ }), moreTools_createButton({
624
+ id: 'TagBrowser',
625
+ icon: 'list-bullets',
626
+ label: 'Dicom Tag Browser',
627
+ tooltip: 'Dicom Tag Browser',
628
+ commands: 'openDICOMTagViewer'
629
+ })]
630
+ }
631
+ }];
632
+ /* harmony default export */ const src_moreTools = (moreTools);
633
+ ;// CONCATENATED MODULE: ../../../modes/longitudinal/src/index.js
634
+
635
+
814
636
 
815
637
 
816
638
 
@@ -819,8 +641,6 @@ const toolbarButtons = [
819
641
  // Allow this mode by excluding non-imaging modalities such as SR, SEG
820
642
  // Also, SM is not a simple imaging modalities, so exclude it.
821
643
  const NON_IMAGE_MODALITIES = ['SM', 'ECG', 'SR', 'SEG', 'RTSTRUCT'];
822
- const DEFAULT_TOOL_GROUP_ID = 'default';
823
- const MPR_TOOL_GROUP_ID = 'mpr';
824
644
  const ohif = {
825
645
  layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
826
646
  sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
@@ -885,43 +705,14 @@ function modeFactory({
885
705
  measurementService,
886
706
  toolbarService,
887
707
  toolGroupService,
888
- panelService,
889
708
  customizationService
890
709
  } = servicesManager.services;
891
710
  measurementService.clearMeasurements();
892
711
 
893
712
  // Init Default and SR ToolGroups
894
713
  src_initToolGroups(extensionManager, toolGroupService, commandsManager);
895
- let unsubscribe;
896
- toolbarService.setDefaultTool({
897
- groupId: 'WindowLevel',
898
- itemId: 'WindowLevel',
899
- interactionType: 'tool',
900
- commands: [{
901
- commandName: 'setToolActive',
902
- commandOptions: {
903
- toolName: 'WindowLevel'
904
- },
905
- context: 'CORNERSTONE'
906
- }]
907
- });
908
- const activateTool = () => {
909
- toolbarService.recordInteraction(toolbarService.getDefaultTool());
910
-
911
- // We don't need to reset the active tool whenever a viewport is getting
912
- // added to the toolGroup.
913
- unsubscribe();
914
- };
915
-
916
- // Since we only have one viewport for the basic cs3d mode and it has
917
- // only one hanging protocol, we can just use the first viewport
918
- ({
919
- unsubscribe
920
- } = toolGroupService.subscribe(toolGroupService.EVENTS.VIEWPORT_ADDED, activateTool));
921
- toolbarService.init(extensionManager);
922
- toolbarService.addButtons([...src_toolbarButtons, ...src_moreTools, ...src_moreToolsMpr]);
923
- toolbarService.createButtonSection(DEFAULT_TOOL_GROUP_ID, ['MeasurementTools', 'Zoom', 'WindowLevel', 'Pan', 'Capture', 'Layout', 'MPR', 'MoreTools']);
924
- toolbarService.createButtonSection(MPR_TOOL_GROUP_ID, ['MeasurementTools', 'Zoom', 'WindowLevel', 'Pan', 'Capture', 'Layout', 'MPR', 'Crosshairs', 'MoreToolsMpr']);
714
+ toolbarService.addButtons([...src_toolbarButtons, ...src_moreTools]);
715
+ toolbarService.createButtonSection('primary', ['MeasurementTools', 'Zoom', 'WindowLevel', 'Pan', 'Capture', 'Layout', 'MPR', 'Crosshairs', 'MoreTools']);
925
716
  customizationService.addModeCustomizations([{
926
717
  id: 'segmentation.disableEditing',
927
718
  value: true
@@ -955,7 +746,6 @@ function modeFactory({
955
746
  const {
956
747
  toolGroupService,
957
748
  syncGroupService,
958
- toolbarService,
959
749
  segmentationService,
960
750
  cornerstoneViewportService,
961
751
  uiDialogService,