@ohif/app 3.8.0-beta.6 → 3.8.0-beta.61

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 (61) hide show
  1. package/dist/{220.bundle.f7e1c96c94245e70f2be.js → 109.bundle.b4fee2a22b622839baf5.js} +4466 -3715
  2. package/dist/{471.bundle.b3d77b83b1593c09a504.js → 121.bundle.ed23e7752a11005322e6.js} +47 -51
  3. package/dist/{19.bundle.f6ac71d29001b0db0ec0.js → 155.bundle.3879b7d76680473fa69f.js} +198 -207
  4. package/dist/{687.bundle.f87fb1a36ef1ca951690.js → 164.bundle.80b2977d58cd927397c2.js} +22 -38
  5. package/dist/17dd54813d5acc10bf8f.wasm +0 -0
  6. package/dist/{506.bundle.06f5c5620d0088ec0102.js → 188.bundle.eca333a03f6b311bf2e6.js} +23 -28
  7. package/dist/191.bundle.4850ab82949bb6f0eb73.js +30339 -0
  8. package/dist/20fc4c659b85ccd2a9c0.wasm +0 -0
  9. package/dist/{126.bundle.cefdf26c03a5ab8d60c8.js → 250.bundle.a02414ebc6fed29530e7.js} +63 -69
  10. package/dist/{236.bundle.3148dc4715c254801727.js → 270.bundle.94f5c172fb943bda1d03.js} +156 -178
  11. package/dist/290.bundle.8b4d7dfbc7cfe418a0f1.js +8883 -0
  12. package/dist/{451.bundle.9fd36f52ff69594f0669.js → 295.bundle.462f3328c716cbe6c613.js} +45 -59
  13. package/dist/{125.bundle.253395f320b72180da63.js → 297.bundle.81d63bb0b66d63df6d86.js} +7 -8
  14. package/dist/{613.bundle.a0eee4dc2d2764c2f7cd.js → 317.bundle.d51f1681f4bdc829be5b.js} +83 -57
  15. package/dist/{788.bundle.af903bf0598f0ad618e3.js → 339.bundle.5691c7bc4504f1e4c3b2.js} +190 -239
  16. package/dist/{202.bundle.d3490836f71e001dd30f.js → 342.bundle.a039c24e9f661f3b884d.js} +544 -860
  17. package/dist/{221.bundle.3f5f700b4c1ee8b1ce94.js → 50.bundle.d3eccf1a90cad61405c0.js} +199 -189
  18. package/dist/{957.bundle.9ea4506963ef8b2d84ba.js → 504.bundle.aa165082e2acc5ccf080.js} +14338 -27291
  19. package/dist/{886.bundle.d5116d9b8ea4964b68a0.js → 530.bundle.ce13c30b93a28cc85098.js} +40 -44
  20. package/dist/{250.bundle.8084960e3318cda37317.js → 544.bundle.3cf20da53f349abd8d67.js} +39 -44
  21. package/dist/{663.bundle.e3539f14edf9214e07eb.js → 559.bundle.146b02440e81f9fffea3.js} +149 -141
  22. package/dist/{410.bundle.5e16274b1082de6e127e.js → 594.bundle.76e05b71ad06361c9de9.js} +31 -35
  23. package/dist/{774.bundle.4b2dc46a35012b898e1a.js → 644.bundle.1e77691d2eeb96a423b0.js} +1852 -8945
  24. package/dist/{82.bundle.ae82f6434056c8d79fec.js → 68.bundle.ccbfa216e6d60ce3824f.js} +313 -324
  25. package/dist/{342.bundle.e485b92bd6d91bb7cc04.js → 704.bundle.042323b2cd8a9535050c.js} +1128 -737
  26. package/dist/{359.bundle.dedb5b782335939bdc52.js → 724.bundle.e821b6321fec63b9375a.js} +34 -37
  27. package/dist/{757.bundle.ec8301d8e70d2b990f65.js → 726.bundle.2bdb443d1b5620d74e6e.js} +512 -879
  28. package/dist/{530.bundle.a03b6f942ace3e1baa1e.js → 835.bundle.15aff0b7433bb0dd6d6d.js} +37 -30
  29. package/dist/{822.bundle.891f2e57b1b7bc2f4cb4.js → 862.bundle.e3fe2aae7903cc2ae8df.js} +27 -29
  30. package/dist/{181.bundle.2ddc6f90740895a3949c.js → 889.bundle.6850a0b8c412e3befab5.js} +135 -107
  31. package/dist/{181.css → 889.css} +1 -1
  32. package/dist/{281.bundle.e4c37762343dc03e4fa0.js → 905.bundle.806f0e8307eb1c9d1f6e.js} +29 -31
  33. package/dist/{814.bundle.98e400df965d000d78e6.js → 907.bundle.84dba9f6e90672071d82.js} +16 -18
  34. package/dist/{417.bundle.af0a207c29b109f84159.js → 931.bundle.d270a1fda9a2836c3cc5.js} +26 -26
  35. package/dist/{686.bundle.dccef1f36e4bc79bcc48.js → 939.bundle.84ee0b844023d924a22b.js} +7 -8
  36. package/dist/{12.bundle.75c761bd89ad782675c8.js → 961.bundle.80a864ec4e08ed7bb3b7.js} +16 -18
  37. package/dist/{776.bundle.08eb381dc3d06708eb0f.js → 963.bundle.f9511286d05982090a14.js} +1629 -845
  38. package/dist/987.bundle.e7c041a6dfb4ddb41813.js +122926 -0
  39. package/dist/{app.bundle.eeb94536f34535b1153f.js → app.bundle.2399e4eb1c8930ab9c5e.js} +142184 -60944
  40. package/dist/app.bundle.css +11 -11
  41. package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
  42. package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
  43. package/dist/{dicom-microscopy-viewer.bundle.2c146384eb9466d02ff8.js → dicom-microscopy-viewer.bundle.d3a56dc9f62df5e11019.js} +3 -3
  44. package/dist/index.html +1 -1
  45. package/dist/{index.worker.e62ecca63f1a2e124230.worker.js → index.worker.64c896c4316fcd506666.worker.js} +2 -2
  46. package/dist/index.worker.64c896c4316fcd506666.worker.js.map +1 -0
  47. package/dist/polySeg.bundle.99be036bab9b7f011b0c.js +252 -0
  48. package/dist/serve.json +12 -0
  49. package/dist/sw.js +1 -1
  50. package/package.json +25 -22
  51. package/dist/23.bundle.e008ad788170f2ed5569.js +0 -900
  52. package/dist/604.bundle.a51f83e64004bca5f497.js +0 -1848
  53. package/dist/743.bundle.489f7df3a089d4d374e1.js +0 -78007
  54. package/dist/75788f12450d4c5ed494.wasm +0 -0
  55. package/dist/775.bundle.2285e7e0e67878948c0d.js +0 -1009
  56. package/dist/index.worker.e62ecca63f1a2e124230.worker.js.map +0 -1
  57. /package/dist/{19.css → 155.css} +0 -0
  58. /package/dist/{579.css → 481.css} +0 -0
  59. /package/dist/{221.css → 50.css} +0 -0
  60. /package/dist/{250.css → 544.css} +0 -0
  61. /package/dist/{776.css → 963.css} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- (self["webpackChunk"] = self["webpackChunk"] || []).push([[451],{
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[295],{
3
3
 
4
- /***/ 4451:
4
+ /***/ 58295:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
6
 
7
7
  // ESM COMPAT FLAG
@@ -13,16 +13,16 @@ __webpack_require__.d(__webpack_exports__, {
13
13
  });
14
14
 
15
15
  // EXTERNAL MODULE: ../../../node_modules/prop-types/index.js
16
- var prop_types = __webpack_require__(3827);
16
+ var prop_types = __webpack_require__(11374);
17
17
  var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
18
18
  // EXTERNAL MODULE: ../../../node_modules/react/index.js
19
- var react = __webpack_require__(43001);
19
+ var react = __webpack_require__(41766);
20
20
  // EXTERNAL MODULE: ../../../node_modules/react-i18next/dist/es/index.js + 15 modules
21
- var es = __webpack_require__(69190);
22
- // EXTERNAL MODULE: ../../core/src/index.ts + 65 modules
23
- var src = __webpack_require__(71771);
24
- // EXTERNAL MODULE: ../../ui/src/index.js + 485 modules
25
- var ui_src = __webpack_require__(71783);
21
+ var es = __webpack_require__(80619);
22
+ // EXTERNAL MODULE: ../../core/src/index.ts + 66 modules
23
+ var src = __webpack_require__(14283);
24
+ // EXTERNAL MODULE: ../../ui/src/index.js + 487 modules
25
+ var ui_src = __webpack_require__(55395);
26
26
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-seg/src/utils/initSEGToolGroup.ts
27
27
  function createSEGToolGroupAndAddTools(ToolGroupService, customizationService, toolGroupId) {
28
28
  const {
@@ -38,14 +38,13 @@ const RESPONSE = {
38
38
  CANCEL: 0,
39
39
  HYDRATE_SEG: 5
40
40
  };
41
- function promptHydrateSEG(_ref) {
42
- let {
43
- servicesManager,
44
- segDisplaySet,
45
- viewportId,
46
- preHydrateCallbacks,
47
- hydrateSEGDisplaySet
48
- } = _ref;
41
+ function promptHydrateSEG({
42
+ servicesManager,
43
+ segDisplaySet,
44
+ viewportId,
45
+ preHydrateCallbacks,
46
+ hydrateSEGDisplaySet
47
+ }) {
49
48
  const {
50
49
  uiViewportDialogService
51
50
  } = servicesManager.services;
@@ -67,11 +66,11 @@ function _askHydrate(uiViewportDialogService, viewportId) {
67
66
  return new Promise(function (resolve, reject) {
68
67
  const message = 'Do you want to open this Segmentation?';
69
68
  const actions = [{
70
- type: ui_src/* ButtonEnums.type */.LZ.dt.secondary,
69
+ type: ui_src/* ButtonEnums.type */.Ny.NW.secondary,
71
70
  text: 'No',
72
71
  value: RESPONSE.CANCEL
73
72
  }, {
74
- type: ui_src/* ButtonEnums.type */.LZ.dt.primary,
73
+ type: ui_src/* ButtonEnums.type */.Ny.NW.primary,
75
74
  text: 'Yes',
76
75
  value: RESPONSE.HYDRATE_SEG
77
76
  }];
@@ -97,26 +96,25 @@ function _askHydrate(uiViewportDialogService, viewportId) {
97
96
 
98
97
 
99
98
 
100
- function _getStatusComponent(_ref) {
101
- let {
102
- isHydrated,
103
- onStatusClick
104
- } = _ref;
99
+ function _getStatusComponent({
100
+ isHydrated,
101
+ onStatusClick
102
+ }) {
105
103
  let ToolTipMessage = null;
106
104
  let StatusIcon = null;
107
105
  const {
108
106
  t
109
- } = (0,es/* useTranslation */.$G)('Common');
107
+ } = (0,es/* useTranslation */.Bd)('Common');
110
108
  const loadStr = t('LOAD');
111
109
  switch (isHydrated) {
112
110
  case true:
113
- StatusIcon = () => /*#__PURE__*/react.createElement(ui_src/* Icon */.JO, {
111
+ StatusIcon = () => /*#__PURE__*/react.createElement(ui_src/* Icon */.In, {
114
112
  name: "status-alert"
115
113
  });
116
114
  ToolTipMessage = () => /*#__PURE__*/react.createElement("div", null, "This Segmentation is loaded in the segmentation panel");
117
115
  break;
118
116
  case false:
119
- StatusIcon = () => /*#__PURE__*/react.createElement(ui_src/* Icon */.JO, {
117
+ StatusIcon = () => /*#__PURE__*/react.createElement(ui_src/* Icon */.In, {
120
118
  className: "text-aqua-pale",
121
119
  name: "status-untracked"
122
120
  });
@@ -134,7 +132,7 @@ function _getStatusComponent(_ref) {
134
132
  ,
135
133
  onMouseUp: onStatusClick
136
134
  }, loadStr));
137
- return /*#__PURE__*/react.createElement(react.Fragment, null, ToolTipMessage && /*#__PURE__*/react.createElement(ui_src/* Tooltip */.u, {
135
+ return /*#__PURE__*/react.createElement(react.Fragment, null, ToolTipMessage && /*#__PURE__*/react.createElement(ui_src/* Tooltip */.m_, {
138
136
  content: /*#__PURE__*/react.createElement(ToolTipMessage, null),
139
137
  position: "bottom-left"
140
138
  }, /*#__PURE__*/react.createElement(StatusArea, null)), !ToolTipMessage && /*#__PURE__*/react.createElement(StatusArea, null));
@@ -165,7 +163,7 @@ function OHIFCornerstoneSEGViewport(props) {
165
163
  } = props;
166
164
  const {
167
165
  t
168
- } = (0,es/* useTranslation */.$G)('SEGViewport');
166
+ } = (0,es/* useTranslation */.Bd)('SEGViewport');
169
167
  const viewportId = viewportOptions.viewportId;
170
168
  const {
171
169
  displaySetService,
@@ -181,7 +179,7 @@ function OHIFCornerstoneSEGViewport(props) {
181
179
  throw new Error('SEG viewport should only have a single display set');
182
180
  }
183
181
  const segDisplaySet = displaySets[0];
184
- const [viewportGrid, viewportGridService] = (0,ui_src/* useViewportGrid */.O_)();
182
+ const [viewportGrid, viewportGridService] = (0,ui_src/* useViewportGrid */.ih)();
185
183
 
186
184
  // States
187
185
  const [selectedSegment, setSelectedSegment] = (0,react.useState)(1);
@@ -224,10 +222,9 @@ function OHIFCornerstoneSEGViewport(props) {
224
222
  setElement(null);
225
223
  };
226
224
  const storePresentationState = (0,react.useCallback)(() => {
227
- viewportGrid?.viewports.forEach(_ref => {
228
- let {
229
- viewportId
230
- } = _ref;
225
+ viewportGrid?.viewports.forEach(({
226
+ viewportId
227
+ }) => {
231
228
  commandsManager.runCommand('storePresentation', {
232
229
  viewportId
233
230
  });
@@ -252,7 +249,6 @@ function OHIFCornerstoneSEGViewport(props) {
252
249
  },
253
250
  onElementEnabled: onElementEnabled,
254
251
  onElementDisabled: onElementDisabled
255
- // initialImageIndex={initialImageIndex}
256
252
  }));
257
253
  }, [viewportId, segDisplaySet, toolGroupId]);
258
254
  const onSegmentChange = (0,react.useCallback)(direction => {
@@ -298,13 +294,6 @@ function OHIFCornerstoneSEGViewport(props) {
298
294
  if (evt.segDisplaySet.displaySetInstanceUID === segDisplaySet.displaySetInstanceUID) {
299
295
  setSegIsLoading(false);
300
296
  }
301
- if (evt.overlappingSegments) {
302
- uiNotificationService.show({
303
- title: 'Overlapping Segments',
304
- message: 'Overlapping segments detected which is not currently supported',
305
- type: 'warning'
306
- });
307
- }
308
297
  });
309
298
  return () => {
310
299
  unsubscribe();
@@ -313,11 +302,10 @@ function OHIFCornerstoneSEGViewport(props) {
313
302
  (0,react.useEffect)(() => {
314
303
  const {
315
304
  unsubscribe
316
- } = segmentationService.subscribe(segmentationService.EVENTS.SEGMENT_LOADING_COMPLETE, _ref2 => {
317
- let {
318
- percentComplete,
319
- numSegments
320
- } = _ref2;
305
+ } = segmentationService.subscribe(segmentationService.EVENTS.SEGMENT_LOADING_COMPLETE, ({
306
+ percentComplete,
307
+ numSegments
308
+ }) => {
321
309
  setProcessingProgress({
322
310
  percentComplete,
323
311
  totalSegments: numSegments
@@ -332,10 +320,9 @@ function OHIFCornerstoneSEGViewport(props) {
332
320
  Cleanup the SEG viewport when the viewport is destroyed
333
321
  */
334
322
  (0,react.useEffect)(() => {
335
- const onDisplaySetsRemovedSubscription = displaySetService.subscribe(displaySetService.EVENTS.DISPLAY_SETS_REMOVED, _ref3 => {
336
- let {
337
- displaySetInstanceUIDs
338
- } = _ref3;
323
+ const onDisplaySetsRemovedSubscription = displaySetService.subscribe(displaySetService.EVENTS.DISPLAY_SETS_REMOVED, ({
324
+ displaySetInstanceUIDs
325
+ }) => {
339
326
  const activeViewport = viewports.get(activeViewportId);
340
327
  if (displaySetInstanceUIDs.includes(activeViewport.displaySetInstanceUID)) {
341
328
  viewportGridService.setDisplaySetsForViewport({
@@ -398,11 +385,10 @@ function OHIFCornerstoneSEGViewport(props) {
398
385
  SeriesDescription,
399
386
  SpacingBetweenSlices
400
387
  } = referencedDisplaySetRef.current.metadata;
401
- const hydrateSEGDisplaySet = _ref4 => {
402
- let {
403
- segDisplaySet,
404
- viewportId
405
- } = _ref4;
388
+ const hydrateSEGDisplaySet = ({
389
+ segDisplaySet,
390
+ viewportId
391
+ }) => {
406
392
  commandsManager.runCommand('loadSegmentationDisplaySetsForViewport', {
407
393
  displaySets: [segDisplaySet],
408
394
  viewportId
@@ -422,7 +408,7 @@ function OHIFCornerstoneSEGViewport(props) {
422
408
  });
423
409
  setIsHydrated(isHydrated);
424
410
  };
425
- return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(ui_src/* ViewportActionBar */.uY, {
411
+ return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(ui_src/* ViewportActionBar */.cS, {
426
412
  onDoubleClick: evt => {
427
413
  evt.stopPropagation();
428
414
  evt.preventDefault();
@@ -440,7 +426,7 @@ function OHIFCornerstoneSEGViewport(props) {
440
426
  studyDate: formatDate(StudyDate),
441
427
  seriesDescription: `SEG Viewport ${SeriesDescription}`,
442
428
  patientInformation: {
443
- patientName: PatientName ? src["default"].utils.formatPN(PatientName.Alphabetic) : '',
429
+ patientName: PatientName ? src/* default.utils */.Ay.utils.formatPN(PatientName.Alphabetic) : '',
444
430
  patientSex: PatientSex || '',
445
431
  patientAge: PatientAge || '',
446
432
  MRN: PatientID || '',
@@ -452,7 +438,7 @@ function OHIFCornerstoneSEGViewport(props) {
452
438
  }
453
439
  }), /*#__PURE__*/react.createElement("div", {
454
440
  className: "relative flex h-full w-full flex-row overflow-hidden"
455
- }, segIsLoading && /*#__PURE__*/react.createElement(ui_src/* LoadingIndicatorTotalPercent */.bk, {
441
+ }, segIsLoading && /*#__PURE__*/react.createElement(ui_src/* LoadingIndicatorTotalPercent */.pT, {
456
442
  className: "h-full w-full",
457
443
  totalNumbers: processingProgress.totalSegments,
458
444
  percentComplete: processingProgress.percentComplete,
@@ -1,22 +1,21 @@
1
1
  "use strict";
2
- (self["webpackChunk"] = self["webpackChunk"] || []).push([[125],{
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[297],{
3
3
 
4
- /***/ 39125:
4
+ /***/ 46297:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
6
 
7
7
  __webpack_require__.r(__webpack_exports__);
8
8
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
9
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
10
10
  /* harmony export */ });
11
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43001);
12
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3827);
11
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41766);
12
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11374);
13
13
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
14
14
 
15
15
 
16
- function OHIFCornerstonePdfViewport(_ref) {
17
- let {
18
- displaySets
19
- } = _ref;
16
+ function OHIFCornerstonePdfViewport({
17
+ displaySets
18
+ }) {
20
19
  const [url, setUrl] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
21
20
  if (displaySets && displaySets.length > 1) {
22
21
  throw new Error('OHIFCornerstonePdfViewport: only one display set is supported for dicom pdf right now');
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- (self["webpackChunk"] = self["webpackChunk"] || []).push([[613],{
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[317],{
3
3
 
4
- /***/ 32613:
4
+ /***/ 55317:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
6
 
7
7
  // ESM COMPAT FLAG
@@ -12,16 +12,16 @@ __webpack_require__.d(__webpack_exports__, {
12
12
  "default": () => (/* binding */ segmentation_src)
13
13
  });
14
14
 
15
- // EXTERNAL MODULE: ../../core/src/index.ts + 65 modules
16
- var src = __webpack_require__(71771);
15
+ // EXTERNAL MODULE: ../../core/src/index.ts + 66 modules
16
+ var src = __webpack_require__(14283);
17
17
  ;// CONCATENATED MODULE: ../../../modes/segmentation/package.json
18
- const package_namespaceObject = JSON.parse('{"u2":"@ohif/mode-segmentation"}');
18
+ const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/mode-segmentation"}');
19
19
  ;// CONCATENATED MODULE: ../../../modes/segmentation/src/id.js
20
20
 
21
- const id = package_namespaceObject.u2;
21
+ const id = package_namespaceObject.UU;
22
22
 
23
- // EXTERNAL MODULE: ../../ui/src/index.js + 485 modules
24
- var ui_src = __webpack_require__(71783);
23
+ // EXTERNAL MODULE: ../../ui/src/index.js + 487 modules
24
+ var ui_src = __webpack_require__(55395);
25
25
  ;// CONCATENATED MODULE: ../../../modes/segmentation/src/toolbarButtons.ts
26
26
 
27
27
 
@@ -123,7 +123,7 @@ const toolbarButtons = [
123
123
  },
124
124
  isAction: true,
125
125
  // ?
126
- renderer: ui_src/* WindowLevelMenuItem */.eJ,
126
+ renderer: ui_src/* WindowLevelMenuItem */.d4,
127
127
  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')]
128
128
  }
129
129
  },
@@ -220,8 +220,8 @@ const toolbarButtons = [
220
220
  commandName: 'flipViewportHorizontal',
221
221
  commandOptions: {},
222
222
  context: 'CORNERSTONE'
223
- }], 'Flip Horizontal'), _createToggleButton('StackImageSync', 'link', 'Stack Image Sync', [{
224
- commandName: 'toggleStackImageSync',
223
+ }], 'Flip Horizontal'), _createToggleButton('ImageSliceSync', 'link', 'Stack Image Sync', [{
224
+ commandName: 'toggleImageSliceSync',
225
225
  commandOptions: {},
226
226
  context: 'CORNERSTONE'
227
227
  }]), _createToggleButton('ReferenceLines', 'tool-referenceLines',
@@ -258,22 +258,6 @@ const toolbarButtons = [
258
258
  }];
259
259
  /* harmony default export */ const src_toolbarButtons = (toolbarButtons);
260
260
  ;// CONCATENATED MODULE: ../../../modes/segmentation/src/initToolGroups.ts
261
- const brushInstanceNames = {
262
- CircularBrush: 'CircularBrush',
263
- CircularEraser: 'CircularEraser',
264
- SphereBrush: 'SphereBrush',
265
- SphereEraser: 'SphereEraser',
266
- ThresholdCircularBrush: 'ThresholdCircularBrush',
267
- ThresholdSphereBrush: 'ThresholdSphereBrush'
268
- };
269
- const brushStrategies = {
270
- CircularBrush: 'FILL_INSIDE_CIRCLE',
271
- CircularEraser: 'ERASE_INSIDE_CIRCLE',
272
- SphereBrush: 'FILL_INSIDE_SPHERE',
273
- SphereEraser: 'ERASE_INSIDE_SPHERE',
274
- ThresholdCircularBrush: 'THRESHOLD_INSIDE_CIRCLE',
275
- ThresholdSphereBrush: 'THRESHOLD_INSIDE_SPHERE'
276
- };
277
261
  function createTools(utilityModule) {
278
262
  const {
279
263
  toolNames,
@@ -299,13 +283,53 @@ function createTools(utilityModule) {
299
283
  toolName: toolNames.StackScrollMouseWheel,
300
284
  bindings: []
301
285
  }],
302
- passive: Object.keys(brushInstanceNames).map(brushName => ({
303
- toolName: brushName,
286
+ passive: [{
287
+ toolName: 'CircularBrush',
288
+ parentTool: 'Brush',
289
+ configuration: {
290
+ activeStrategy: 'FILL_INSIDE_CIRCLE'
291
+ }
292
+ }, {
293
+ toolName: 'CircularEraser',
304
294
  parentTool: 'Brush',
305
295
  configuration: {
306
- activeStrategy: brushStrategies[brushName]
296
+ activeStrategy: 'ERASE_INSIDE_CIRCLE'
307
297
  }
308
- })).concat([{
298
+ }, {
299
+ toolName: 'SphereBrush',
300
+ parentTool: 'Brush',
301
+ configuration: {
302
+ activeStrategy: 'FILL_INSIDE_SPHERE'
303
+ }
304
+ }, {
305
+ toolName: 'SphereEraser',
306
+ parentTool: 'Brush',
307
+ configuration: {
308
+ activeStrategy: 'ERASE_INSIDE_SPHERE'
309
+ }
310
+ }, {
311
+ toolName: 'ThresholdCircularBrush',
312
+ parentTool: 'Brush',
313
+ configuration: {
314
+ activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',
315
+ strategySpecificConfiguration: {
316
+ THRESHOLD: {
317
+ threshold: [-500, 500]
318
+ }
319
+ }
320
+ }
321
+ }, {
322
+ toolName: 'ThresholdSphereBrush',
323
+ parentTool: 'Brush',
324
+ configuration: {
325
+ activeStrategy: 'THRESHOLD_INSIDE_SPHERE',
326
+ strategySpecificConfiguration: {
327
+ THRESHOLD: {
328
+ threshold: [-500, 500]
329
+ }
330
+ }
331
+ }
332
+ }, {
309
333
  toolName: toolNames.CircleScissors
310
334
  }, {
311
335
  toolName: toolNames.RectangleScissors
@@ -317,7 +341,7 @@ function createTools(utilityModule) {
317
341
  toolName: toolNames.Magnify
318
342
  }, {
319
343
  toolName: toolNames.SegmentationDisplay
320
- }]),
344
+ }],
321
345
  disabled: [{
322
346
  toolName: toolNames.ReferenceLines
323
347
  }]
@@ -381,10 +405,9 @@ const extensionDependencies = {
381
405
  '@ohif/extension-cornerstone': '^3.0.0',
382
406
  '@ohif/extension-cornerstone-dicom-seg': '^3.0.0'
383
407
  };
384
- function modeFactory(_ref) {
385
- let {
386
- modeConfiguration
387
- } = _ref;
408
+ function modeFactory({
409
+ modeConfiguration
410
+ }) {
388
411
  return {
389
412
  /**
390
413
  * Mode ID, which should be unique among modes used by the viewer. This ID
@@ -401,12 +424,11 @@ function modeFactory(_ref) {
401
424
  * Runs when the Mode Route is mounted to the DOM. Usually used to initialize
402
425
  * Services and other resources.
403
426
  */
404
- onModeEnter: _ref2 => {
405
- let {
406
- servicesManager,
407
- extensionManager,
408
- commandsManager
409
- } = _ref2;
427
+ onModeEnter: ({
428
+ servicesManager,
429
+ extensionManager,
430
+ commandsManager
431
+ }) => {
410
432
  const {
411
433
  measurementService,
412
434
  toolbarService,
@@ -444,10 +466,9 @@ function modeFactory(_ref) {
444
466
  toolbarService.addButtons(src_toolbarButtons);
445
467
  toolbarService.createButtonSection('primary', ['Zoom', 'WindowLevel', 'Pan', 'Capture', 'Layout', 'MPR', 'Crosshairs', 'MoreTools']);
446
468
  },
447
- onModeExit: _ref3 => {
448
- let {
449
- servicesManager
450
- } = _ref3;
469
+ onModeExit: ({
470
+ servicesManager
471
+ }) => {
451
472
  const {
452
473
  toolGroupService,
453
474
  syncGroupService,
@@ -467,12 +488,18 @@ function modeFactory(_ref) {
467
488
  },
468
489
  /**
469
490
  * A boolean return value that indicates whether the mode is valid for the
470
- * modalities of the selected studies. For instance a PET/CT mode should be
491
+ * modalities of the selected studies. Currently we don't have stack viewport
492
+ * segmentations and we should exclude them
471
493
  */
472
- isValidMode: _ref4 => {
473
- let {
474
- modalities
475
- } = _ref4;
494
+ isValidMode: ({
495
+ modalities
496
+ }) => {
497
+ // Don't show the mode if the selected studies have only one modality
498
+ // that is not supported by the mode
499
+ const modalitiesArray = modalities.split('\\');
500
+ if (modalitiesArray.length === 1) {
501
+ return !['SM', 'US', 'MG', 'OT', 'DOC', 'CR'].includes(modalitiesArray[0]);
502
+ }
476
503
  return true;
477
504
  },
478
505
  /**
@@ -489,11 +516,10 @@ function modeFactory(_ref) {
489
516
  */
490
517
  routes: [{
491
518
  path: 'template',
492
- layoutTemplate: _ref5 => {
493
- let {
494
- location,
495
- servicesManager
496
- } = _ref5;
519
+ layoutTemplate: ({
520
+ location,
521
+ servicesManager
522
+ }) => {
497
523
  return {
498
524
  id: ohif.layout,
499
525
  props: {
@@ -517,7 +543,7 @@ function modeFactory(_ref) {
517
543
  /** SopClassHandlers used by the mode */
518
544
  sopClassHandlers: [ohif.sopClassHandler, segmentation.sopClassHandler],
519
545
  /** hotkeys for mode */
520
- hotkeys: [...src/* hotkeys */.dD.defaults.hotkeyBindings]
546
+ hotkeys: [...src/* hotkeys */.ot.defaults.hotkeyBindings]
521
547
  };
522
548
  }
523
549
  const mode = {