@ohif/app 3.0.0 → 3.5.0

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 (125) hide show
  1. package/dist/151.bundle.07bac9172580a60fae7a.js +2579 -0
  2. package/dist/192.bundle.62be5f0ef9705a485071.js +894 -0
  3. package/dist/199.bundle.2286f24cf0a068e7f50c.js +480 -0
  4. package/dist/205.bundle.39e6c847d618ad2b1b7a.js +62 -0
  5. package/dist/208.bundle.23748a85dfdc79c05d3a.js +864 -0
  6. package/dist/270.bundle.abbdb5348274bae3e8bc.js +23906 -0
  7. package/dist/283.bundle.33f99a75a5e2d9333da2.js +2939 -0
  8. package/dist/295.bundle.5105ce962be15c92484d.js +48 -0
  9. package/dist/331.bundle.7ac7b142d249d14fd99e.js +73034 -0
  10. package/dist/351.bundle.c5d7279ef42e30f61e08.js +1471 -0
  11. package/dist/351.css +3 -0
  12. package/dist/36785fbd89b0e17f6099.wasm +0 -0
  13. package/dist/381.bundle.0905e683605fcbc0895f.js +1009 -0
  14. package/dist/404.bundle.0f7a500421f246153d89.js +706 -0
  15. package/dist/50.bundle.4cb103cd20f5ffccf927.js +324 -0
  16. package/dist/5004fdc02f329ce53b69.wasm +0 -0
  17. package/dist/531.bundle.1bc152c87c7e2e987d2b.js +5935 -0
  18. package/dist/55.bundle.a5a215e13a8511f7aee7.js +685 -0
  19. package/dist/55.css +3 -0
  20. package/dist/569.bundle.d147c0aa0604f8ea2094.js +514 -0
  21. package/dist/581.bundle.646c89c5c3e3ee096363.js +508 -0
  22. package/dist/606.bundle.5d876f5f3dd8287f0a28.js +4939 -0
  23. package/dist/610.min.worker.js +2 -0
  24. package/dist/610.min.worker.js.map +1 -0
  25. package/dist/616.bundle.bec4736d8c9513e62856.js +686 -0
  26. package/dist/62ab5d58a2bea7b5a1dc.wasm +0 -0
  27. package/dist/642.bundle.030d908e22c8ff5611f3.js +169 -0
  28. package/dist/65916ef3def695744bda.wasm +0 -0
  29. package/dist/664.bundle.4792c88ae0d6d4b5ed13.js +901 -0
  30. package/dist/707.bundle.0a74aa3e61ed002eb3c6.js +9049 -0
  31. package/dist/707.css +1 -0
  32. package/dist/728.bundle.d13856835357400fef82.js +26221 -0
  33. package/dist/744.bundle.53b07e48e07a11e920ac.js +2355 -0
  34. package/dist/75788f12450d4c5ed494.wasm +0 -0
  35. package/dist/75a0c2dfe07b824c7d21.wasm +0 -0
  36. package/dist/780.bundle.f60ac1906e0ae080dee8.js +4769 -0
  37. package/dist/790.bundle.b4df2c5d78a2a565b150.js +454 -0
  38. package/dist/799.bundle.3fff638815e355b0bdfd.js +271 -0
  39. package/dist/806.css +1 -0
  40. package/dist/82.bundle.a24015533196e05d190e.js +6104 -0
  41. package/dist/917.bundle.a094ae9e9de6df4119ae.js +196 -0
  42. package/dist/926.bundle.dbc9d0e591cb9217fda2.js +72552 -0
  43. package/dist/935.bundle.deeffff0e4f7b528e3c3.js +1849 -0
  44. package/dist/945.min.worker.js +2 -0
  45. package/dist/945.min.worker.js.map +1 -0
  46. package/dist/953.bundle.c14d9eb6400f697019ee.js +449 -0
  47. package/dist/973.bundle.4100cf103686b64938d1.js +261 -0
  48. package/dist/976.bundle.2720eb892514e1818018.js +2725 -0
  49. package/dist/984.bundle.157fc66ea5040e1364af.js +1842 -0
  50. package/dist/_headers +6 -0
  51. package/dist/_redirects +6 -0
  52. package/dist/app-config.js +215 -0
  53. package/dist/app.bundle.253eeb2a7ee986e89c50.js +154621 -0
  54. package/dist/app.bundle.css +21 -0
  55. package/dist/assets/android-chrome-144x144.png +0 -0
  56. package/dist/assets/android-chrome-192x192.png +0 -0
  57. package/dist/assets/android-chrome-256x256.png +0 -0
  58. package/dist/assets/android-chrome-36x36.png +0 -0
  59. package/dist/assets/android-chrome-384x384.png +0 -0
  60. package/dist/assets/android-chrome-48x48.png +0 -0
  61. package/dist/assets/android-chrome-512x512.png +0 -0
  62. package/dist/assets/android-chrome-72x72.png +0 -0
  63. package/dist/assets/android-chrome-96x96.png +0 -0
  64. package/dist/assets/apple-touch-icon-1024x1024.png +0 -0
  65. package/dist/assets/apple-touch-icon-114x114.png +0 -0
  66. package/dist/assets/apple-touch-icon-120x120.png +0 -0
  67. package/dist/assets/apple-touch-icon-144x144.png +0 -0
  68. package/dist/assets/apple-touch-icon-152x152.png +0 -0
  69. package/dist/assets/apple-touch-icon-167x167.png +0 -0
  70. package/dist/assets/apple-touch-icon-180x180.png +0 -0
  71. package/dist/assets/apple-touch-icon-57x57.png +0 -0
  72. package/dist/assets/apple-touch-icon-60x60.png +0 -0
  73. package/dist/assets/apple-touch-icon-72x72.png +0 -0
  74. package/dist/assets/apple-touch-icon-76x76.png +0 -0
  75. package/dist/assets/apple-touch-icon-precomposed.png +0 -0
  76. package/dist/assets/apple-touch-icon.png +0 -0
  77. package/dist/assets/apple-touch-startup-image-1182x2208.png +0 -0
  78. package/dist/assets/apple-touch-startup-image-1242x2148.png +0 -0
  79. package/dist/assets/apple-touch-startup-image-1496x2048.png +0 -0
  80. package/dist/assets/apple-touch-startup-image-1536x2008.png +0 -0
  81. package/dist/assets/apple-touch-startup-image-320x460.png +0 -0
  82. package/dist/assets/apple-touch-startup-image-640x1096.png +0 -0
  83. package/dist/assets/apple-touch-startup-image-640x920.png +0 -0
  84. package/dist/assets/apple-touch-startup-image-748x1024.png +0 -0
  85. package/dist/assets/apple-touch-startup-image-750x1294.png +0 -0
  86. package/dist/assets/apple-touch-startup-image-768x1004.png +0 -0
  87. package/dist/assets/browserconfig.xml +12 -0
  88. package/dist/assets/coast-228x228.png +0 -0
  89. package/dist/assets/favicon-16x16.png +0 -0
  90. package/dist/assets/favicon-32x32.png +0 -0
  91. package/dist/assets/favicon.ico +0 -0
  92. package/dist/assets/firefox_app_128x128.png +0 -0
  93. package/dist/assets/firefox_app_512x512.png +0 -0
  94. package/dist/assets/firefox_app_60x60.png +0 -0
  95. package/dist/assets/manifest.webapp +14 -0
  96. package/dist/assets/mstile-144x144.png +0 -0
  97. package/dist/assets/mstile-150x150.png +0 -0
  98. package/dist/assets/mstile-310x150.png +0 -0
  99. package/dist/assets/mstile-310x310.png +0 -0
  100. package/dist/assets/mstile-70x70.png +0 -0
  101. package/dist/assets/yandex-browser-50x50.png +0 -0
  102. package/dist/assets/yandex-browser-manifest.json +9 -0
  103. package/dist/b6b803111e2d06a825bd.wasm +0 -0
  104. package/dist/c22b37c3488e1d6c3aa4.wasm +0 -0
  105. package/dist/cornerstoneDICOMImageLoader.min.js +2 -0
  106. package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -0
  107. package/dist/dicom-microscopy-viewer.bundle.aa60bdf008c32c39cfd7.js +12 -0
  108. package/dist/dicomMicroscopyViewer.min.js +3 -0
  109. package/dist/dicomMicroscopyViewer.min.js.LICENSE.txt +29 -0
  110. package/dist/es6-shim.min.js +12 -0
  111. package/dist/google.js +75 -0
  112. package/dist/index.html +1 -0
  113. package/dist/index.worker.ea71efba2ce63c499055.worker.js +2 -0
  114. package/dist/index.worker.ea71efba2ce63c499055.worker.js.map +1 -0
  115. package/dist/index.worker.min.worker.js +2 -0
  116. package/dist/index.worker.min.worker.js.map +1 -0
  117. package/dist/init-service-worker.js +59 -0
  118. package/dist/manifest.json +59 -0
  119. package/dist/ohif-logo-light.svg +15 -0
  120. package/dist/ohif-logo.svg +15 -0
  121. package/dist/oidc-client.min.js +46 -0
  122. package/dist/polyfill.min.js +1 -0
  123. package/dist/silent-refresh.html +16 -0
  124. package/dist/sw.js +56 -0
  125. package/package.json +24 -23
@@ -0,0 +1,864 @@
1
+ "use strict";
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[208],{
3
+
4
+ /***/ 9208:
5
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
+
7
+ // ESM COMPAT FLAG
8
+ __webpack_require__.r(__webpack_exports__);
9
+
10
+ // EXPORTS
11
+ __webpack_require__.d(__webpack_exports__, {
12
+ "default": () => (/* binding */ basic_test_mode_src)
13
+ });
14
+
15
+ // EXTERNAL MODULE: ../../core/src/index.ts + 101 modules
16
+ var src = __webpack_require__(48501);
17
+ // EXTERNAL MODULE: ../../ui/src/index.js + 449 modules
18
+ var ui_src = __webpack_require__(43803);
19
+ ;// CONCATENATED MODULE: ../../../modes/basic-test-mode/src/toolbarButtons.js
20
+ // TODO: torn, can either bake this here; or have to create a whole new button type
21
+ // Only ways that you can pass in a custom React component for render :l
22
+
23
+
24
+ const {
25
+ windowLevelPresets
26
+ } = src.defaults;
27
+ /**
28
+ *
29
+ * @param {*} type - 'tool' | 'action' | 'toggle'
30
+ * @param {*} id
31
+ * @param {*} icon
32
+ * @param {*} label
33
+ */
34
+ function _createButton(type, id, icon, label, commands, tooltip, uiType) {
35
+ return {
36
+ id,
37
+ icon,
38
+ label,
39
+ type,
40
+ commands,
41
+ tooltip,
42
+ uiType
43
+ };
44
+ }
45
+ function _createCommands(commandName, toolName, toolGroupIds) {
46
+ return toolGroupIds.map(toolGroupId => ({
47
+ /* It's a command that is being run when the button is clicked. */
48
+ commandName,
49
+ commandOptions: {
50
+ toolName,
51
+ toolGroupId
52
+ },
53
+ context: 'CORNERSTONE'
54
+ }));
55
+ }
56
+ const _createActionButton = _createButton.bind(null, 'action');
57
+ const _createToggleButton = _createButton.bind(null, 'toggle');
58
+ const _createToolButton = _createButton.bind(null, 'tool');
59
+
60
+ /**
61
+ *
62
+ * @param {*} preset - preset number (from above import)
63
+ * @param {*} title
64
+ * @param {*} subtitle
65
+ */
66
+ function _createWwwcPreset(preset, title, subtitle) {
67
+ return {
68
+ id: preset.toString(),
69
+ title,
70
+ subtitle,
71
+ type: 'action',
72
+ commands: [{
73
+ commandName: 'setWindowLevel',
74
+ commandOptions: {
75
+ ...windowLevelPresets[preset]
76
+ },
77
+ context: 'CORNERSTONE'
78
+ }]
79
+ };
80
+ }
81
+ const toolbarButtons = [
82
+ // Measurement
83
+ {
84
+ id: 'MeasurementTools',
85
+ type: 'ohif.splitButton',
86
+ props: {
87
+ groupId: 'MeasurementTools',
88
+ isRadio: true,
89
+ // ?
90
+ // Switch?
91
+ primary: _createToolButton('Length', 'tool-length', 'Length', [{
92
+ commandName: 'setToolActive',
93
+ commandOptions: {
94
+ toolName: 'Length'
95
+ },
96
+ context: 'CORNERSTONE'
97
+ }, {
98
+ commandName: 'setToolActive',
99
+ commandOptions: {
100
+ toolName: 'SRLength',
101
+ toolGroupId: 'SRToolGroup'
102
+ },
103
+ // we can use the setToolActive command for this from Cornerstone commandsModule
104
+ context: 'CORNERSTONE'
105
+ }], 'Length'),
106
+ secondary: {
107
+ icon: 'chevron-down',
108
+ label: '',
109
+ isActive: true,
110
+ tooltip: 'More Measure Tools'
111
+ },
112
+ items: [_createToolButton('Length', 'tool-length', 'Length', [{
113
+ commandName: 'setToolActive',
114
+ commandOptions: {
115
+ toolName: 'Length'
116
+ },
117
+ context: 'CORNERSTONE'
118
+ }, {
119
+ commandName: 'setToolActive',
120
+ commandOptions: {
121
+ toolName: 'SRLength',
122
+ toolGroupId: 'SRToolGroup'
123
+ },
124
+ // we can use the setToolActive command for this from Cornerstone commandsModule
125
+ context: 'CORNERSTONE'
126
+ }], 'Length Tool'), _createToolButton('Bidirectional', 'tool-bidirectional', 'Bidirectional', [{
127
+ commandName: 'setToolActive',
128
+ commandOptions: {
129
+ toolName: 'Bidirectional'
130
+ },
131
+ context: 'CORNERSTONE'
132
+ }, {
133
+ commandName: 'setToolActive',
134
+ commandOptions: {
135
+ toolName: 'SRBidirectional',
136
+ toolGroupId: 'SRToolGroup'
137
+ },
138
+ context: 'CORNERSTONE'
139
+ }], 'Bidirectional Tool'), _createToolButton('ArrowAnnotate', 'tool-annotate', 'Annotation', [{
140
+ commandName: 'setToolActive',
141
+ commandOptions: {
142
+ toolName: 'ArrowAnnotate'
143
+ },
144
+ context: 'CORNERSTONE'
145
+ }, {
146
+ commandName: 'setToolActive',
147
+ commandOptions: {
148
+ toolName: 'SRArrowAnnotate',
149
+ toolGroupId: 'SRToolGroup'
150
+ },
151
+ context: 'CORNERSTONE'
152
+ }], 'Arrow Annotate'), _createToolButton('EllipticalROI', 'tool-elipse', 'Ellipse', [{
153
+ commandName: 'setToolActive',
154
+ commandOptions: {
155
+ toolName: 'EllipticalROI'
156
+ },
157
+ context: 'CORNERSTONE'
158
+ }, {
159
+ commandName: 'setToolActive',
160
+ commandOptions: {
161
+ toolName: 'SREllipticalROI',
162
+ toolGroupId: 'SRToolGroup'
163
+ },
164
+ context: 'CORNERSTONE'
165
+ }], 'Ellipse Tool'), _createToolButton('CircleROI', 'tool-circle', 'Circle', [{
166
+ commandName: 'setToolActive',
167
+ commandOptions: {
168
+ toolName: 'CircleROI'
169
+ },
170
+ context: 'CORNERSTONE'
171
+ }, {
172
+ commandName: 'setToolActive',
173
+ commandOptions: {
174
+ toolName: 'SRCircleROI',
175
+ toolGroupId: 'SRToolGroup'
176
+ },
177
+ context: 'CORNERSTONE'
178
+ }], 'Circle Tool')]
179
+ }
180
+ },
181
+ // Zoom..
182
+ {
183
+ id: 'Zoom',
184
+ type: 'ohif.radioGroup',
185
+ props: {
186
+ type: 'tool',
187
+ icon: 'tool-zoom',
188
+ label: 'Zoom',
189
+ commands: [{
190
+ commandName: 'setToolActive',
191
+ commandOptions: {
192
+ toolName: 'Zoom'
193
+ },
194
+ context: 'CORNERSTONE'
195
+ }]
196
+ }
197
+ },
198
+ // Window Level + Presets...
199
+ {
200
+ id: 'WindowLevel',
201
+ type: 'ohif.splitButton',
202
+ props: {
203
+ groupId: 'WindowLevel',
204
+ primary: _createToolButton('WindowLevel', 'tool-window-level', 'Window Level', [{
205
+ commandName: 'setToolActive',
206
+ commandOptions: {
207
+ toolName: 'WindowLevel'
208
+ },
209
+ context: 'CORNERSTONE'
210
+ }], 'Window Level'),
211
+ secondary: {
212
+ icon: 'chevron-down',
213
+ label: 'W/L Manual',
214
+ isActive: true,
215
+ tooltip: 'W/L Presets'
216
+ },
217
+ isAction: true,
218
+ // ?
219
+ renderer: ui_src/* WindowLevelMenuItem */.eJ,
220
+ 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')]
221
+ }
222
+ },
223
+ // Pan...
224
+ {
225
+ id: 'Pan',
226
+ type: 'ohif.radioGroup',
227
+ props: {
228
+ type: 'tool',
229
+ icon: 'tool-move',
230
+ label: 'Pan',
231
+ commands: [{
232
+ commandName: 'setToolActive',
233
+ commandOptions: {
234
+ toolName: 'Pan'
235
+ },
236
+ context: 'CORNERSTONE'
237
+ }]
238
+ }
239
+ }, {
240
+ id: 'Capture',
241
+ type: 'ohif.action',
242
+ props: {
243
+ icon: 'tool-capture',
244
+ label: 'Capture',
245
+ type: 'action',
246
+ commands: [{
247
+ commandName: 'showDownloadViewportModal',
248
+ commandOptions: {},
249
+ context: 'CORNERSTONE'
250
+ }]
251
+ }
252
+ }, {
253
+ id: 'Layout',
254
+ type: 'ohif.splitButton',
255
+ props: {
256
+ groupId: 'LayoutTools',
257
+ isRadio: false,
258
+ primary: {
259
+ id: 'Layout',
260
+ type: 'action',
261
+ uiType: 'ohif.layoutSelector',
262
+ icon: 'tool-layout',
263
+ label: 'Grid Layout',
264
+ props: {
265
+ rows: 4,
266
+ columns: 4,
267
+ commands: [{
268
+ commandName: 'setLayout',
269
+ commandOptions: {},
270
+ context: 'CORNERSTONE'
271
+ }]
272
+ }
273
+ },
274
+ secondary: {
275
+ icon: 'chevron-down',
276
+ label: '',
277
+ isActive: true,
278
+ tooltip: 'Hanging Protocols'
279
+ },
280
+ items: [{
281
+ id: '2x2',
282
+ type: 'action',
283
+ label: '2x2',
284
+ commands: [{
285
+ commandName: 'setHangingProtocol',
286
+ commandOptions: {
287
+ protocolId: '@ohif/mnGrid',
288
+ stageId: '2x2'
289
+ },
290
+ context: 'DEFAULT'
291
+ }]
292
+ }, {
293
+ id: '3x1',
294
+ type: 'action',
295
+ label: '3x1',
296
+ commands: [{
297
+ commandName: 'setHangingProtocol',
298
+ commandOptions: {
299
+ protocolId: '@ohif/mnGrid',
300
+ stageId: '3x1'
301
+ },
302
+ context: 'DEFAULT'
303
+ }]
304
+ }, {
305
+ id: '2x1',
306
+ type: 'action',
307
+ label: '2x1',
308
+ commands: [{
309
+ commandName: 'setHangingProtocol',
310
+ commandOptions: {
311
+ protocolId: '@ohif/mnGrid',
312
+ stageId: '2x1'
313
+ },
314
+ context: 'DEFAULT'
315
+ }]
316
+ }, {
317
+ id: '1x1',
318
+ type: 'action',
319
+ label: '1x1',
320
+ commands: [{
321
+ commandName: 'setHangingProtocol',
322
+ commandOptions: {
323
+ protocolId: '@ohif/mnGrid',
324
+ stageId: '1x1'
325
+ },
326
+ context: 'DEFAULT'
327
+ }]
328
+ }]
329
+ }
330
+ }, {
331
+ id: 'MPR',
332
+ type: 'ohif.action',
333
+ props: {
334
+ type: 'toggle',
335
+ icon: 'icon-mpr',
336
+ label: 'MPR',
337
+ commands: [{
338
+ commandName: 'toggleHangingProtocol',
339
+ commandOptions: {
340
+ protocolId: 'mpr'
341
+ },
342
+ context: 'DEFAULT'
343
+ }]
344
+ }
345
+ }, {
346
+ id: 'Crosshairs',
347
+ type: 'ohif.radioGroup',
348
+ props: {
349
+ type: 'tool',
350
+ icon: 'tool-crosshair',
351
+ label: 'Crosshairs',
352
+ commands: [{
353
+ commandName: 'setToolActive',
354
+ commandOptions: {
355
+ toolGroupId: 'mpr',
356
+ toolName: 'Crosshairs'
357
+ },
358
+ context: 'CORNERSTONE'
359
+ }]
360
+ }
361
+ },
362
+ // More...
363
+ {
364
+ id: 'MoreTools',
365
+ type: 'ohif.splitButton',
366
+ props: {
367
+ isRadio: true,
368
+ // ?
369
+ groupId: 'MoreTools',
370
+ primary: _createActionButton('Reset', 'tool-reset', 'Reset View', [{
371
+ commandName: 'resetViewport',
372
+ commandOptions: {},
373
+ context: 'CORNERSTONE'
374
+ }], 'Reset'),
375
+ secondary: {
376
+ icon: 'chevron-down',
377
+ label: '',
378
+ isActive: true,
379
+ tooltip: 'More Tools'
380
+ },
381
+ items: [_createActionButton('Reset', 'tool-reset', 'Reset View', [{
382
+ commandName: 'resetViewport',
383
+ commandOptions: {},
384
+ context: 'CORNERSTONE'
385
+ }], 'Reset'), _createActionButton('rotate-right', 'tool-rotate-right', 'Rotate Right', [{
386
+ commandName: 'rotateViewportCW',
387
+ commandOptions: {},
388
+ context: 'CORNERSTONE'
389
+ }], 'Rotate +90'), _createActionButton('flip-horizontal', 'tool-flip-horizontal', 'Flip Horizontally', [{
390
+ commandName: 'flipViewportHorizontal',
391
+ commandOptions: {},
392
+ context: 'CORNERSTONE'
393
+ }], 'Flip Horizontal'), _createToggleButton('StackImageSync', 'link', 'Stack Image Sync', [{
394
+ commandName: 'toggleStackImageSync',
395
+ commandOptions: {},
396
+ context: 'CORNERSTONE'
397
+ }]), _createToggleButton('ReferenceLines', 'tool-referenceLines',
398
+ // change this with the new icon
399
+ 'Reference Lines', [{
400
+ commandName: 'toggleReferenceLines',
401
+ commandOptions: {},
402
+ context: 'CORNERSTONE'
403
+ }]), _createToolButton('StackScroll', 'tool-stack-scroll', 'Stack Scroll', [{
404
+ commandName: 'setToolActive',
405
+ commandOptions: {
406
+ toolName: 'StackScroll'
407
+ },
408
+ context: 'CORNERSTONE'
409
+ }], 'Stack Scroll'), _createActionButton('invert', 'tool-invert', 'Invert', [{
410
+ commandName: 'invertViewport',
411
+ commandOptions: {},
412
+ context: 'CORNERSTONE'
413
+ }], 'Invert Colors'), _createToolButton('Probe', 'tool-probe', 'Probe', [{
414
+ commandName: 'setToolActive',
415
+ commandOptions: {
416
+ toolName: 'DragProbe'
417
+ },
418
+ context: 'CORNERSTONE'
419
+ }], 'Probe'), _createToggleButton('cine', 'tool-cine', 'Cine', [{
420
+ commandName: 'toggleCine',
421
+ context: 'CORNERSTONE'
422
+ }], 'Cine'), _createToolButton('Angle', 'tool-angle', 'Angle', [{
423
+ commandName: 'setToolActive',
424
+ commandOptions: {
425
+ toolName: 'Angle'
426
+ },
427
+ context: 'CORNERSTONE'
428
+ }], 'Angle'), _createToolButton('Magnify', 'tool-magnify', 'Magnify', [{
429
+ commandName: 'setToolActive',
430
+ commandOptions: {
431
+ toolName: 'Magnify'
432
+ },
433
+ context: 'CORNERSTONE'
434
+ }], 'Magnify'), _createToolButton('Rectangle', 'tool-rectangle', 'Rectangle', [{
435
+ commandName: 'setToolActive',
436
+ commandOptions: {
437
+ toolName: 'RectangleROI'
438
+ },
439
+ context: 'CORNERSTONE'
440
+ }], 'Rectangle'), _createActionButton('TagBrowser', 'list-bullets', 'Dicom Tag Browser', [{
441
+ commandName: 'openDICOMTagViewer',
442
+ commandOptions: {},
443
+ context: 'DEFAULT'
444
+ }], 'Dicom Tag Browser')]
445
+ }
446
+ }];
447
+ /* harmony default export */ const src_toolbarButtons = (toolbarButtons);
448
+ ;// CONCATENATED MODULE: ../../../modes/basic-test-mode/package.json
449
+ const package_namespaceObject = JSON.parse('{"u2":"@ohif/mode-test"}');
450
+ ;// CONCATENATED MODULE: ../../../modes/basic-test-mode/src/id.js
451
+
452
+ const id = package_namespaceObject.u2;
453
+
454
+ ;// CONCATENATED MODULE: ../../../modes/basic-test-mode/src/initToolGroups.js
455
+ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, toolGroupId) {
456
+ const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
457
+ const {
458
+ toolNames,
459
+ Enums
460
+ } = utilityModule.exports;
461
+ const tools = {
462
+ active: [{
463
+ toolName: toolNames.WindowLevel,
464
+ bindings: [{
465
+ mouseButton: Enums.MouseBindings.Primary
466
+ }]
467
+ }, {
468
+ toolName: toolNames.Pan,
469
+ bindings: [{
470
+ mouseButton: Enums.MouseBindings.Auxiliary
471
+ }]
472
+ }, {
473
+ toolName: toolNames.Zoom,
474
+ bindings: [{
475
+ mouseButton: Enums.MouseBindings.Secondary
476
+ }]
477
+ }, {
478
+ toolName: toolNames.StackScrollMouseWheel,
479
+ bindings: []
480
+ }],
481
+ passive: [{
482
+ toolName: toolNames.Length
483
+ }, {
484
+ toolName: toolNames.ArrowAnnotate
485
+ }, {
486
+ toolName: toolNames.Bidirectional
487
+ }, {
488
+ toolName: toolNames.DragProbe
489
+ }, {
490
+ toolName: toolNames.EllipticalROI
491
+ }, {
492
+ toolName: toolNames.CircleROI
493
+ }, {
494
+ toolName: toolNames.RectangleROI
495
+ }, {
496
+ toolName: toolNames.StackScroll
497
+ }, {
498
+ toolName: toolNames.Angle
499
+ }, {
500
+ toolName: toolNames.Magnify
501
+ }, {
502
+ toolName: toolNames.SegmentationDisplay
503
+ }],
504
+ // enabled
505
+ // disabled
506
+ disabled: [{
507
+ toolName: toolNames.ReferenceLines
508
+ }]
509
+ };
510
+ const toolsConfig = {
511
+ [toolNames.ArrowAnnotate]: {
512
+ getTextCallback: (callback, eventDetails) => commandsManager.runCommand('arrowTextCallback', {
513
+ callback,
514
+ eventDetails
515
+ }),
516
+ changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
517
+ callback,
518
+ data,
519
+ eventDetails
520
+ })
521
+ }
522
+ };
523
+ toolGroupService.createToolGroupAndAddTools(toolGroupId, tools, toolsConfig);
524
+ }
525
+ function initSRToolGroup(extensionManager, toolGroupService, commandsManager) {
526
+ const SRUtilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone-dicom-sr.utilityModule.tools');
527
+ const CS3DUtilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
528
+ const {
529
+ toolNames: SRToolNames
530
+ } = SRUtilityModule.exports;
531
+ const {
532
+ toolNames,
533
+ Enums
534
+ } = CS3DUtilityModule.exports;
535
+ const tools = {
536
+ active: [{
537
+ toolName: toolNames.WindowLevel,
538
+ bindings: [{
539
+ mouseButton: Enums.MouseBindings.Primary
540
+ }]
541
+ }, {
542
+ toolName: toolNames.Pan,
543
+ bindings: [{
544
+ mouseButton: Enums.MouseBindings.Auxiliary
545
+ }]
546
+ }, {
547
+ toolName: toolNames.Zoom,
548
+ bindings: [{
549
+ mouseButton: Enums.MouseBindings.Secondary
550
+ }]
551
+ }, {
552
+ toolName: toolNames.StackScrollMouseWheel,
553
+ bindings: []
554
+ }],
555
+ passive: [{
556
+ toolName: SRToolNames.SRLength
557
+ }, {
558
+ toolName: SRToolNames.SRArrowAnnotate
559
+ }, {
560
+ toolName: SRToolNames.SRBidirectional
561
+ }, {
562
+ toolName: SRToolNames.SREllipticalROI
563
+ }, {
564
+ toolName: SRToolNames.SRCircleROI
565
+ }],
566
+ enabled: [{
567
+ toolName: SRToolNames.DICOMSRDisplay,
568
+ bindings: []
569
+ }]
570
+ // disabled
571
+ };
572
+
573
+ const toolsConfig = {
574
+ [toolNames.ArrowAnnotate]: {
575
+ getTextCallback: (callback, eventDetails) => commandsManager.runCommand('arrowTextCallback', {
576
+ callback,
577
+ eventDetails
578
+ }),
579
+ changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
580
+ callback,
581
+ data,
582
+ eventDetails
583
+ })
584
+ }
585
+ };
586
+ const toolGroupId = 'SRToolGroup';
587
+ toolGroupService.createToolGroupAndAddTools(toolGroupId, tools, toolsConfig);
588
+ }
589
+ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
590
+ const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
591
+ const {
592
+ toolNames,
593
+ Enums
594
+ } = utilityModule.exports;
595
+ const tools = {
596
+ active: [{
597
+ toolName: toolNames.WindowLevel,
598
+ bindings: [{
599
+ mouseButton: Enums.MouseBindings.Primary
600
+ }]
601
+ }, {
602
+ toolName: toolNames.Pan,
603
+ bindings: [{
604
+ mouseButton: Enums.MouseBindings.Auxiliary
605
+ }]
606
+ }, {
607
+ toolName: toolNames.Zoom,
608
+ bindings: [{
609
+ mouseButton: Enums.MouseBindings.Secondary
610
+ }]
611
+ }, {
612
+ toolName: toolNames.StackScrollMouseWheel,
613
+ bindings: []
614
+ }],
615
+ passive: [{
616
+ toolName: toolNames.Length
617
+ }, {
618
+ toolName: toolNames.ArrowAnnotate
619
+ }, {
620
+ toolName: toolNames.Bidirectional
621
+ }, {
622
+ toolName: toolNames.DragProbe
623
+ }, {
624
+ toolName: toolNames.EllipticalROI
625
+ }, {
626
+ toolName: toolNames.CircleROI
627
+ }, {
628
+ toolName: toolNames.RectangleROI
629
+ }, {
630
+ toolName: toolNames.StackScroll
631
+ }, {
632
+ toolName: toolNames.Angle
633
+ }, {
634
+ toolName: toolNames.SegmentationDisplay
635
+ }],
636
+ disabled: [{
637
+ toolName: toolNames.Crosshairs
638
+ }, {
639
+ toolName: toolNames.ReferenceLines
640
+ }]
641
+
642
+ // enabled
643
+ // disabled
644
+ };
645
+
646
+ const toolsConfig = {
647
+ [toolNames.Crosshairs]: {
648
+ viewportIndicators: false,
649
+ autoPan: {
650
+ enabled: false,
651
+ panSize: 10
652
+ }
653
+ },
654
+ [toolNames.ArrowAnnotate]: {
655
+ getTextCallback: (callback, eventDetails) => commandsManager.runCommand('arrowTextCallback', {
656
+ callback,
657
+ eventDetails
658
+ }),
659
+ changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
660
+ callback,
661
+ data,
662
+ eventDetails
663
+ })
664
+ }
665
+ };
666
+ toolGroupService.createToolGroupAndAddTools('mpr', tools, toolsConfig);
667
+ }
668
+ function initToolGroups(extensionManager, toolGroupService, commandsManager) {
669
+ initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, 'default');
670
+ initSRToolGroup(extensionManager, toolGroupService, commandsManager);
671
+ initMPRToolGroup(extensionManager, toolGroupService, commandsManager);
672
+ }
673
+ /* harmony default export */ const src_initToolGroups = (initToolGroups);
674
+ ;// CONCATENATED MODULE: ../../../modes/basic-test-mode/src/index.js
675
+
676
+
677
+
678
+
679
+
680
+ // Allow this mode by excluding non-imaging modalities such as SR, SEG
681
+ // Also, SM is not a simple imaging modalities, so exclude it.
682
+ const NON_IMAGE_MODALITIES = ['SM', 'ECG', 'SR', 'SEG'];
683
+ const ohif = {
684
+ layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
685
+ sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
686
+ thumbnailList: '@ohif/extension-default.panelModule.seriesList'
687
+ };
688
+ const tracked = {
689
+ measurements: '@ohif/extension-measurement-tracking.panelModule.trackedMeasurements',
690
+ thumbnailList: '@ohif/extension-measurement-tracking.panelModule.seriesList',
691
+ viewport: '@ohif/extension-measurement-tracking.viewportModule.cornerstone-tracked'
692
+ };
693
+ const dicomsr = {
694
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr',
695
+ viewport: '@ohif/extension-cornerstone-dicom-sr.viewportModule.dicom-sr'
696
+ };
697
+ const dicomvideo = {
698
+ sopClassHandler: '@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video',
699
+ viewport: '@ohif/extension-dicom-video.viewportModule.dicom-video'
700
+ };
701
+ const dicompdf = {
702
+ sopClassHandler: '@ohif/extension-dicom-pdf.sopClassHandlerModule.dicom-pdf',
703
+ viewport: '@ohif/extension-dicom-pdf.viewportModule.dicom-pdf'
704
+ };
705
+ const dicomSeg = {
706
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
707
+ viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg',
708
+ panel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation'
709
+ };
710
+ const extensionDependencies = {
711
+ // Can derive the versions at least process.env.from npm_package_version
712
+ '@ohif/extension-default': '^3.0.0',
713
+ '@ohif/extension-cornerstone': '^3.0.0',
714
+ '@ohif/extension-measurement-tracking': '^3.0.0',
715
+ '@ohif/extension-cornerstone-dicom-sr': '^3.0.0',
716
+ '@ohif/extension-cornerstone-dicom-seg': '^3.0.0',
717
+ '@ohif/extension-dicom-pdf': '^3.0.1',
718
+ '@ohif/extension-dicom-video': '^3.0.1',
719
+ '@ohif/extension-test': '^0.0.1'
720
+ };
721
+ function modeFactory() {
722
+ return {
723
+ // TODO: We're using this as a route segment
724
+ // We should not be.
725
+ id: id,
726
+ routeName: 'basic-test',
727
+ displayName: 'Basic Test Mode',
728
+ /**
729
+ * Lifecycle hooks
730
+ */
731
+ onModeEnter: _ref => {
732
+ let {
733
+ servicesManager,
734
+ extensionManager,
735
+ commandsManager
736
+ } = _ref;
737
+ const {
738
+ measurementService,
739
+ toolbarService,
740
+ toolGroupService,
741
+ customizationService
742
+ } = servicesManager.services;
743
+ measurementService.clearMeasurements();
744
+
745
+ // Init Default and SR ToolGroups
746
+ src_initToolGroups(extensionManager, toolGroupService, commandsManager);
747
+
748
+ // init customizations
749
+ customizationService.addModeCustomizations(['@ohif/extension-test.customizationModule.custom-context-menu']);
750
+ let unsubscribe;
751
+ const activateTool = () => {
752
+ toolbarService.recordInteraction({
753
+ groupId: 'WindowLevel',
754
+ itemId: 'WindowLevel',
755
+ interactionType: 'tool',
756
+ commands: [{
757
+ commandName: 'setToolActive',
758
+ commandOptions: {
759
+ toolName: 'WindowLevel'
760
+ },
761
+ context: 'CORNERSTONE'
762
+ }]
763
+ });
764
+
765
+ // We don't need to reset the active tool whenever a viewport is getting
766
+ // added to the toolGroup.
767
+ unsubscribe();
768
+ };
769
+
770
+ // Since we only have one viewport for the basic cs3d mode and it has
771
+ // only one hanging protocol, we can just use the first viewport
772
+ ({
773
+ unsubscribe
774
+ } = toolGroupService.subscribe(toolGroupService.EVENTS.VIEWPORT_ADDED, activateTool));
775
+ toolbarService.init(extensionManager);
776
+ toolbarService.addButtons(src_toolbarButtons);
777
+ toolbarService.createButtonSection('primary', ['MeasurementTools', 'Zoom', 'WindowLevel', 'Pan', 'Capture', 'Layout', 'MPR', 'Crosshairs', 'MoreTools']);
778
+ },
779
+ onModeExit: _ref2 => {
780
+ let {
781
+ servicesManager
782
+ } = _ref2;
783
+ const {
784
+ toolGroupService,
785
+ syncGroupService,
786
+ segmentationService,
787
+ cornerstoneViewportService
788
+ } = servicesManager.services;
789
+ toolGroupService.destroy();
790
+ syncGroupService.destroy();
791
+ segmentationService.destroy();
792
+ cornerstoneViewportService.destroy();
793
+ },
794
+ validationTags: {
795
+ study: [],
796
+ series: []
797
+ },
798
+ isValidMode: function (_ref3) {
799
+ let {
800
+ modalities
801
+ } = _ref3;
802
+ const modalities_list = modalities.split('\\');
803
+
804
+ // Exclude non-image modalities
805
+ return !!modalities_list.filter(modality => NON_IMAGE_MODALITIES.indexOf(modality) === -1).length;
806
+ },
807
+ routes: [{
808
+ path: 'basic-test',
809
+ /*init: ({ servicesManager, extensionManager }) => {
810
+ //defaultViewerRouteInit
811
+ },*/
812
+ layoutTemplate: () => {
813
+ return {
814
+ id: ohif.layout,
815
+ props: {
816
+ leftPanels: [tracked.thumbnailList],
817
+ rightPanels: [dicomSeg.panel, tracked.measurements],
818
+ // rightPanelDefaultClosed: true, // optional prop to start with collapse panels
819
+ viewports: [{
820
+ namespace: tracked.viewport,
821
+ displaySetsToDisplay: [ohif.sopClassHandler]
822
+ }, {
823
+ namespace: dicomsr.viewport,
824
+ displaySetsToDisplay: [dicomsr.sopClassHandler]
825
+ }, {
826
+ namespace: dicomvideo.viewport,
827
+ displaySetsToDisplay: [dicomvideo.sopClassHandler]
828
+ }, {
829
+ namespace: dicompdf.viewport,
830
+ displaySetsToDisplay: [dicompdf.sopClassHandler]
831
+ }, {
832
+ namespace: dicomSeg.viewport,
833
+ displaySetsToDisplay: [dicomSeg.sopClassHandler]
834
+ }]
835
+ }
836
+ };
837
+ }
838
+ }],
839
+ extensions: extensionDependencies,
840
+ // Default protocol gets self-registered by default in the init
841
+ hangingProtocol: 'default',
842
+ // Order is important in sop class handlers when two handlers both use
843
+ // the same sop class under different situations. In that case, the more
844
+ // general handler needs to come last. For this case, the dicomvideo must
845
+ // come first to remove video transfer syntax before ohif uses images
846
+ sopClassHandlers: [dicomvideo.sopClassHandler, dicomSeg.sopClassHandler, ohif.sopClassHandler, dicompdf.sopClassHandler, dicomsr.sopClassHandler],
847
+ hotkeys: {
848
+ // Don't store the hotkeys for basic-test-mode under the same key
849
+ // because they get customized by tests
850
+ name: 'basic-test-hotkeys',
851
+ hotkeys: [...src/* hotkeys.defaults.hotkeyBindings */.dD.defaults.hotkeyBindings]
852
+ }
853
+ };
854
+ }
855
+ const mode = {
856
+ id: id,
857
+ modeFactory,
858
+ extensionDependencies
859
+ };
860
+ /* harmony default export */ const basic_test_mode_src = (mode);
861
+
862
+ /***/ })
863
+
864
+ }]);