@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,706 @@
1
+ "use strict";
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[404],{
3
+
4
+ /***/ 92404:
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 */ tmtv_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/tmtv/src/initToolGroups.js
20
+ const toolGroupIds = {
21
+ CT: 'ctToolGroup',
22
+ PT: 'ptToolGroup',
23
+ Fusion: 'fusionToolGroup',
24
+ MIP: 'mipToolGroup',
25
+ default: 'default'
26
+ // MPR: 'mpr',
27
+ };
28
+
29
+ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
30
+ const tools = {
31
+ active: [{
32
+ toolName: toolNames.WindowLevel,
33
+ bindings: [{
34
+ mouseButton: Enums.MouseBindings.Primary
35
+ }]
36
+ }, {
37
+ toolName: toolNames.Pan,
38
+ bindings: [{
39
+ mouseButton: Enums.MouseBindings.Auxiliary
40
+ }]
41
+ }, {
42
+ toolName: toolNames.Zoom,
43
+ bindings: [{
44
+ mouseButton: Enums.MouseBindings.Secondary
45
+ }]
46
+ }, {
47
+ toolName: toolNames.StackScrollMouseWheel,
48
+ bindings: []
49
+ }],
50
+ passive: [{
51
+ toolName: toolNames.Length
52
+ }, {
53
+ toolName: toolNames.ArrowAnnotate
54
+ }, {
55
+ toolName: toolNames.Bidirectional
56
+ }, {
57
+ toolName: toolNames.DragProbe
58
+ }, {
59
+ toolName: toolNames.Probe
60
+ }, {
61
+ toolName: toolNames.EllipticalROI
62
+ }, {
63
+ toolName: toolNames.RectangleROI
64
+ }, {
65
+ toolName: toolNames.StackScroll
66
+ }, {
67
+ toolName: toolNames.Angle
68
+ }, {
69
+ toolName: toolNames.CobbAngle
70
+ }, {
71
+ toolName: toolNames.Magnify
72
+ }],
73
+ enabled: [{
74
+ toolName: toolNames.SegmentationDisplay
75
+ }],
76
+ disabled: [{
77
+ toolName: toolNames.Crosshairs
78
+ }]
79
+ };
80
+ const toolsConfig = {
81
+ [toolNames.Crosshairs]: {
82
+ viewportIndicators: false,
83
+ autoPan: {
84
+ enabled: false,
85
+ panSize: 10
86
+ }
87
+ },
88
+ [toolNames.ArrowAnnotate]: {
89
+ getTextCallback: (callback, eventDetails) => {
90
+ commandsManager.runCommand('arrowTextCallback', {
91
+ callback,
92
+ eventDetails
93
+ });
94
+ },
95
+ changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
96
+ callback,
97
+ data,
98
+ eventDetails
99
+ })
100
+ }
101
+ };
102
+ toolGroupService.createToolGroupAndAddTools(toolGroupIds.CT, tools, toolsConfig);
103
+ toolGroupService.createToolGroupAndAddTools(toolGroupIds.PT, {
104
+ active: tools.active,
105
+ passive: [...tools.passive, {
106
+ toolName: 'RectangleROIStartEndThreshold'
107
+ }],
108
+ enabled: tools.enabled,
109
+ disabled: tools.disabled
110
+ }, toolsConfig);
111
+ toolGroupService.createToolGroupAndAddTools(toolGroupIds.Fusion, tools, toolsConfig);
112
+ toolGroupService.createToolGroupAndAddTools(toolGroupIds.default, tools, toolsConfig);
113
+ const mipTools = {
114
+ active: [{
115
+ toolName: toolNames.VolumeRotateMouseWheel
116
+ }, {
117
+ toolName: toolNames.MipJumpToClick,
118
+ bindings: [{
119
+ mouseButton: Enums.MouseBindings.Primary
120
+ }]
121
+ }],
122
+ enabled: [{
123
+ toolName: toolNames.SegmentationDisplay
124
+ }]
125
+ };
126
+ const mipToolsConfig = {
127
+ [toolNames.VolumeRotateMouseWheel]: {
128
+ rotateIncrementDegrees: 0.1
129
+ },
130
+ [toolNames.MipJumpToClick]: {
131
+ targetViewportIds: ['ptAXIAL', 'ptCORONAL', 'ptSAGITTAL']
132
+ }
133
+ };
134
+ toolGroupService.createToolGroupAndAddTools(toolGroupIds.MIP, mipTools, mipToolsConfig);
135
+ }
136
+ function initMPRToolGroup(toolNames, Enums, toolGroupService, commandsManager) {
137
+ const tools = {
138
+ active: [{
139
+ toolName: toolNames.WindowLevel,
140
+ bindings: [{
141
+ mouseButton: Enums.MouseBindings.Primary
142
+ }]
143
+ }, {
144
+ toolName: toolNames.Pan,
145
+ bindings: [{
146
+ mouseButton: Enums.MouseBindings.Auxiliary
147
+ }]
148
+ }, {
149
+ toolName: toolNames.Zoom,
150
+ bindings: [{
151
+ mouseButton: Enums.MouseBindings.Secondary
152
+ }]
153
+ }, {
154
+ toolName: toolNames.StackScrollMouseWheel,
155
+ bindings: []
156
+ }],
157
+ passive: [{
158
+ toolName: toolNames.Length
159
+ }, {
160
+ toolName: toolNames.ArrowAnnotate
161
+ }, {
162
+ toolName: toolNames.Bidirectional
163
+ }, {
164
+ toolName: toolNames.DragProbe
165
+ }, {
166
+ toolName: toolNames.EllipticalROI
167
+ }, {
168
+ toolName: toolNames.RectangleROI
169
+ }, {
170
+ toolName: toolNames.StackScroll
171
+ }, {
172
+ toolName: toolNames.Angle
173
+ }, {
174
+ toolName: toolNames.CobbAngle
175
+ }, {
176
+ toolName: toolNames.SegmentationDisplay
177
+ }],
178
+ disabled: [{
179
+ toolName: toolNames.Crosshairs
180
+ }]
181
+
182
+ // enabled
183
+ // disabled
184
+ };
185
+
186
+ const toolsConfig = {
187
+ [toolNames.Crosshairs]: {
188
+ viewportIndicators: false,
189
+ autoPan: {
190
+ enabled: false,
191
+ panSize: 10
192
+ }
193
+ },
194
+ [toolNames.ArrowAnnotate]: {
195
+ getTextCallback: (callback, eventDetails) => commandsManager.runCommand('arrowTextCallback', {
196
+ callback,
197
+ eventDetails
198
+ }),
199
+ changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
200
+ callback,
201
+ data,
202
+ eventDetails
203
+ })
204
+ }
205
+ };
206
+ toolGroupService.createToolGroupAndAddTools('mpr', tools, toolsConfig);
207
+ }
208
+ function initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
209
+ _initToolGroups(toolNames, Enums, toolGroupService, commandsManager);
210
+ // initMPRToolGroup(toolNames, Enums, toolGroupService, commandsManager);
211
+ }
212
+
213
+ /* harmony default export */ const src_initToolGroups = (initToolGroups);
214
+ ;// CONCATENATED MODULE: ../../../modes/tmtv/src/toolbarButtons.js
215
+ // TODO: torn, can either bake this here; or have to create a whole new button type
216
+ // Only ways that you can pass in a custom React component for render :l
217
+
218
+
219
+
220
+ const {
221
+ windowLevelPresets
222
+ } = src.defaults;
223
+ /**
224
+ *
225
+ * @param {*} type - 'tool' | 'action' | 'toggle'
226
+ * @param {*} id
227
+ * @param {*} icon
228
+ * @param {*} label
229
+ */
230
+ function _createButton(type, id, icon, label, commands, tooltip) {
231
+ return {
232
+ id,
233
+ icon,
234
+ label,
235
+ type,
236
+ commands,
237
+ tooltip
238
+ };
239
+ }
240
+ function _createColormap(label, colormap) {
241
+ return {
242
+ id: label.toString(),
243
+ title: label,
244
+ subtitle: label,
245
+ type: 'action',
246
+ commands: [{
247
+ commandName: 'setFusionPTColormap',
248
+ commandOptions: {
249
+ toolGroupId: toolGroupIds.Fusion,
250
+ colormap
251
+ }
252
+ }, {
253
+ commandName: 'setFusionPTColormap',
254
+ commandOptions: {
255
+ toolGroupId: toolGroupIds.Fusion,
256
+ colormap
257
+ }
258
+ }]
259
+ };
260
+ }
261
+ const _createActionButton = _createButton.bind(null, 'action');
262
+ const _createToggleButton = _createButton.bind(null, 'toggle');
263
+ const _createToolButton = _createButton.bind(null, 'tool');
264
+
265
+ /**
266
+ *
267
+ * @param {*} preset - preset number (from above import)
268
+ * @param {*} title
269
+ * @param {*} subtitle
270
+ */
271
+ function _createWwwcPreset(preset, title, subtitle) {
272
+ return {
273
+ id: preset.toString(),
274
+ title,
275
+ subtitle,
276
+ type: 'action',
277
+ commands: [{
278
+ commandName: 'setWindowLevel',
279
+ commandOptions: {
280
+ ...windowLevelPresets[preset]
281
+ },
282
+ context: 'CORNERSTONE'
283
+ }]
284
+ };
285
+ }
286
+ function _createCommands(commandName, toolName, toolGroupIds) {
287
+ return toolGroupIds.map(toolGroupId => ({
288
+ /* It's a command that is being run when the button is clicked. */
289
+ commandName,
290
+ commandOptions: {
291
+ toolName,
292
+ toolGroupId
293
+ },
294
+ context: 'CORNERSTONE'
295
+ }));
296
+ }
297
+ const toolbarButtons = [
298
+ // Measurement
299
+ {
300
+ id: 'MeasurementTools',
301
+ type: 'ohif.splitButton',
302
+ props: {
303
+ groupId: 'MeasurementTools',
304
+ isRadio: true,
305
+ // ?
306
+ // Switch?
307
+ primary: _createToolButton('Length', 'tool-length', 'Length', [..._createCommands('setToolActive', 'Length', [toolGroupIds.CT, toolGroupIds.PT, toolGroupIds.Fusion
308
+ // toolGroupIds.MPR,
309
+ ])], 'Length'),
310
+ secondary: {
311
+ icon: 'chevron-down',
312
+ label: '',
313
+ isActive: true,
314
+ tooltip: 'More Measure Tools'
315
+ },
316
+ items: [_createToolButton('Length', 'tool-length', 'Length', [..._createCommands('setToolActive', 'Length', [toolGroupIds.CT, toolGroupIds.PT, toolGroupIds.Fusion
317
+ // toolGroupIds.MPR,
318
+ ])], 'Length Tool'), _createToolButton('Bidirectional', 'tool-bidirectional', 'Bidirectional', [..._createCommands('setToolActive', 'Bidirectional', [toolGroupIds.CT, toolGroupIds.PT, toolGroupIds.Fusion
319
+ // toolGroupIds.MPR,
320
+ ])], 'Bidirectional Tool'), _createToolButton('ArrowAnnotate', 'tool-annotate', 'Annotation', [..._createCommands('setToolActive', 'ArrowAnnotate', [toolGroupIds.CT, toolGroupIds.PT, toolGroupIds.Fusion
321
+ // toolGroupIds.MPR,
322
+ ])], 'Arrow Annotate'), _createToolButton('EllipticalROI', 'tool-elipse', 'Ellipse', [..._createCommands('setToolActive', 'EllipticalROI', [toolGroupIds.CT, toolGroupIds.PT, toolGroupIds.Fusion
323
+ // toolGroupIds.MPR,
324
+ ])], 'Ellipse Tool'), _createToolButton('CircleROI', 'tool-circle', 'Circle', [..._createCommands('setToolActive', 'CircleROI', [toolGroupIds.CT, toolGroupIds.PT, toolGroupIds.Fusion
325
+ // toolGroupIds.MPR,
326
+ ])], 'Circle Tool')]
327
+ }
328
+ },
329
+ // Zoom..
330
+ {
331
+ id: 'Zoom',
332
+ type: 'ohif.radioGroup',
333
+ props: {
334
+ type: 'tool',
335
+ icon: 'tool-zoom',
336
+ label: 'Zoom',
337
+ commands: [..._createCommands('setToolActive', 'Zoom', [toolGroupIds.CT, toolGroupIds.PT, toolGroupIds.Fusion
338
+ // toolGroupIds.MPR,
339
+ ])]
340
+ }
341
+ }, {
342
+ id: 'MPR',
343
+ type: 'ohif.action',
344
+ props: {
345
+ type: 'toggle',
346
+ icon: 'icon-mpr',
347
+ label: 'MPR',
348
+ commands: [{
349
+ commandName: 'toggleHangingProtocol',
350
+ commandOptions: {
351
+ protocolId: 'mpr'
352
+ },
353
+ context: 'DEFAULT'
354
+ }]
355
+ }
356
+ },
357
+ // Window Level + Presets...
358
+ {
359
+ id: 'WindowLevel',
360
+ type: 'ohif.splitButton',
361
+ props: {
362
+ groupId: 'WindowLevel',
363
+ primary: _createToolButton('WindowLevel', 'tool-window-level', 'Window Level', [..._createCommands('setToolActive', 'WindowLevel', [toolGroupIds.CT, toolGroupIds.PT, toolGroupIds.Fusion
364
+ // toolGroupIds.MPR,
365
+ ])], 'Window Level'),
366
+ secondary: {
367
+ icon: 'chevron-down',
368
+ label: 'W/L Manual',
369
+ isActive: true,
370
+ tooltip: 'W/L Presets'
371
+ },
372
+ isAction: true,
373
+ // ?
374
+ renderer: ui_src/* WindowLevelMenuItem */.eJ,
375
+ 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')]
376
+ }
377
+ }, {
378
+ id: 'Crosshairs',
379
+ type: 'ohif.radioGroup',
380
+ props: {
381
+ type: 'tool',
382
+ icon: 'tool-crosshair',
383
+ label: 'Crosshairs',
384
+ commands: [..._createCommands('setToolActive', 'Crosshairs', [toolGroupIds.CT, toolGroupIds.PT, toolGroupIds.Fusion
385
+ // toolGroupIds.MPR,
386
+ ])]
387
+ }
388
+ },
389
+ // Pan...
390
+ {
391
+ id: 'Pan',
392
+ type: 'ohif.radioGroup',
393
+ props: {
394
+ type: 'tool',
395
+ icon: 'tool-move',
396
+ label: 'Pan',
397
+ commands: [..._createCommands('setToolActive', 'Pan', [toolGroupIds.CT, toolGroupIds.PT, toolGroupIds.Fusion
398
+ // toolGroupIds.MPR,
399
+ ])]
400
+ }
401
+ }, {
402
+ id: 'RectangleROIStartEndThreshold',
403
+ type: 'ohif.radioGroup',
404
+ props: {
405
+ type: 'tool',
406
+ icon: 'tool-create-threshold',
407
+ label: 'Rectangle ROI Threshold',
408
+ commands: [..._createCommands('setToolActive', 'RectangleROIStartEndThreshold', [toolGroupIds.PT]), {
409
+ commandName: 'displayNotification',
410
+ commandOptions: {
411
+ title: 'RectangleROI Threshold Tip',
412
+ text: 'RectangleROI Threshold tool should be used on PT Axial Viewport',
413
+ type: 'info'
414
+ }
415
+ }, {
416
+ commandName: 'setViewportActive',
417
+ commandOptions: {
418
+ viewportId: 'ptAXIAL'
419
+ }
420
+ }]
421
+ }
422
+ }, {
423
+ id: 'fusionPTColormap',
424
+ type: 'ohif.splitButton',
425
+ props: {
426
+ groupId: 'fusionPTColormap',
427
+ primary: _createToolButton('fusionPTColormap', 'tool-fusion-color', 'Fusion PT Colormap', [], 'Fusion PT Colormap'),
428
+ secondary: {
429
+ icon: 'chevron-down',
430
+ label: 'PT Colormap',
431
+ isActive: true,
432
+ tooltip: 'PET Image Colormap'
433
+ },
434
+ isAction: true,
435
+ // ?
436
+ renderer: ui_src/* WindowLevelMenuItem */.eJ,
437
+ items: [_createColormap('HSV', 'hsv'), _createColormap('Hot Iron', 'hot_iron'), _createColormap('S PET', 's_pet'), _createColormap('Red Hot', 'red_hot'), _createColormap('Perfusion', 'perfusion'), _createColormap('Rainbow', 'rainbow_2'), _createColormap('SUV', 'suv'), _createColormap('GE 256', 'ge_256'), _createColormap('GE', 'ge'), _createColormap('Siemens', 'siemens')]
438
+ }
439
+ }];
440
+ /* harmony default export */ const src_toolbarButtons = (toolbarButtons);
441
+ ;// CONCATENATED MODULE: ../../../modes/tmtv/package.json
442
+ const package_namespaceObject = JSON.parse('{"u2":"@ohif/mode-tmtv"}');
443
+ ;// CONCATENATED MODULE: ../../../modes/tmtv/src/id.js
444
+
445
+ const id = package_namespaceObject.u2;
446
+
447
+ ;// CONCATENATED MODULE: ../../../modes/tmtv/src/utils/setCrosshairsConfiguration.js
448
+
449
+ function setCrosshairsConfiguration(matches, toolNames, toolGroupService, displaySetService) {
450
+ const matchDetails = matches.get('ctDisplaySet');
451
+ if (!matchDetails) {
452
+ return;
453
+ }
454
+ const {
455
+ SeriesInstanceUID
456
+ } = matchDetails;
457
+ const displaySets = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID);
458
+ const toolConfig = toolGroupService.getToolConfiguration(toolGroupIds.Fusion, toolNames.Crosshairs);
459
+ const crosshairsConfig = {
460
+ ...toolConfig,
461
+ filterActorUIDsToSetSlabThickness: [displaySets[0].displaySetInstanceUID]
462
+ };
463
+ toolGroupService.setToolConfiguration(toolGroupIds.Fusion, toolNames.Crosshairs, crosshairsConfig);
464
+ }
465
+ ;// CONCATENATED MODULE: ../../../modes/tmtv/src/utils/setFusionActiveVolume.js
466
+
467
+ function setFusionActiveVolume(matches, toolNames, toolGroupService, displaySetService) {
468
+ const matchDetails = matches.get('ptDisplaySet');
469
+ if (!matchDetails) {
470
+ return;
471
+ }
472
+ const {
473
+ SeriesInstanceUID
474
+ } = matchDetails;
475
+ const displaySets = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID);
476
+ if (!displaySets || displaySets.length === 0) {
477
+ return;
478
+ }
479
+ const wlToolConfig = toolGroupService.getToolConfiguration(toolGroupIds.Fusion, toolNames.WindowLevel);
480
+ const ellipticalToolConfig = toolGroupService.getToolConfiguration(toolGroupIds.Fusion, toolNames.EllipticalROI);
481
+
482
+ // Todo: this should not take into account the loader id
483
+ const volumeId = `cornerstoneStreamingImageVolume:${displaySets[0].displaySetInstanceUID}`;
484
+ const windowLevelConfig = {
485
+ ...wlToolConfig,
486
+ volumeId
487
+ };
488
+ const ellipticalROIConfig = {
489
+ ...ellipticalToolConfig,
490
+ volumeId
491
+ };
492
+ toolGroupService.setToolConfiguration(toolGroupIds.Fusion, toolNames.WindowLevel, windowLevelConfig);
493
+ toolGroupService.setToolConfiguration(toolGroupIds.Fusion, toolNames.EllipticalROI, ellipticalROIConfig);
494
+ }
495
+ ;// CONCATENATED MODULE: ../../../modes/tmtv/src/index.js
496
+
497
+
498
+
499
+
500
+
501
+
502
+ const {
503
+ MetadataProvider
504
+ } = src.classes;
505
+ const ohif = {
506
+ layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
507
+ sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
508
+ measurements: '@ohif/extension-default.panelModule.measure',
509
+ thumbnailList: '@ohif/extension-default.panelModule.seriesList'
510
+ };
511
+ const cs3d = {
512
+ viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone'
513
+ };
514
+ const tmtv = {
515
+ hangingProtocol: '@ohif/extension-tmtv.hangingProtocolModule.ptCT',
516
+ petSUV: '@ohif/extension-tmtv.panelModule.petSUV',
517
+ ROIThresholdPanel: '@ohif/extension-tmtv.panelModule.ROIThresholdSeg'
518
+ };
519
+ const extensionDependencies = {
520
+ // Can derive the versions at least process.env.from npm_package_version
521
+ '@ohif/extension-default': '^3.0.0',
522
+ '@ohif/extension-cornerstone': '^3.0.0',
523
+ '@ohif/extension-tmtv': '^3.0.0'
524
+ };
525
+ let unsubscriptions = [];
526
+ function modeFactory(_ref) {
527
+ let {
528
+ modeConfiguration
529
+ } = _ref;
530
+ return {
531
+ // TODO: We're using this as a route segment
532
+ // We should not be.
533
+ id: id,
534
+ routeName: 'tmtv',
535
+ displayName: 'Total Metabolic Tumor Volume',
536
+ /**
537
+ * Lifecycle hooks
538
+ */
539
+ onModeEnter: _ref2 => {
540
+ let {
541
+ servicesManager,
542
+ extensionManager,
543
+ commandsManager
544
+ } = _ref2;
545
+ const {
546
+ toolbarService,
547
+ toolGroupService,
548
+ hangingProtocolService,
549
+ displaySetService
550
+ } = servicesManager.services;
551
+ const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
552
+ const {
553
+ toolNames,
554
+ Enums
555
+ } = utilityModule.exports;
556
+
557
+ // Init Default and SR ToolGroups
558
+ src_initToolGroups(toolNames, Enums, toolGroupService, commandsManager);
559
+ const setWindowLevelActive = () => {
560
+ toolbarService.recordInteraction({
561
+ groupId: 'WindowLevel',
562
+ itemId: 'WindowLevel',
563
+ interactionType: 'tool',
564
+ commands: [{
565
+ commandName: 'setToolActive',
566
+ commandOptions: {
567
+ toolName: toolNames.WindowLevel,
568
+ toolGroupId: toolGroupIds.CT
569
+ },
570
+ context: 'CORNERSTONE'
571
+ }, {
572
+ commandName: 'setToolActive',
573
+ commandOptions: {
574
+ toolName: toolNames.WindowLevel,
575
+ toolGroupId: toolGroupIds.PT
576
+ },
577
+ context: 'CORNERSTONE'
578
+ }, {
579
+ commandName: 'setToolActive',
580
+ commandOptions: {
581
+ toolName: toolNames.WindowLevel,
582
+ toolGroupId: toolGroupIds.Fusion
583
+ },
584
+ context: 'CORNERSTONE'
585
+ }]
586
+ });
587
+ };
588
+ const {
589
+ unsubscribe
590
+ } = toolGroupService.subscribe(toolGroupService.EVENTS.VIEWPORT_ADDED, () => {
591
+ // For fusion toolGroup we need to add the volumeIds for the crosshairs
592
+ // since in the fusion viewport we don't want both PT and CT to render MIP
593
+ // when slabThickness is modified
594
+ const {
595
+ displaySetMatchDetails
596
+ } = hangingProtocolService.getMatchDetails();
597
+ setCrosshairsConfiguration(displaySetMatchDetails, toolNames, toolGroupService, displaySetService);
598
+ setFusionActiveVolume(displaySetMatchDetails, toolNames, toolGroupService, displaySetService);
599
+ setWindowLevelActive();
600
+ });
601
+ unsubscriptions.push(unsubscribe);
602
+ toolbarService.init(extensionManager);
603
+ toolbarService.addButtons(src_toolbarButtons);
604
+ toolbarService.createButtonSection('primary', ['MeasurementTools', 'Zoom', 'WindowLevel', 'Crosshairs', 'Pan', 'RectangleROIStartEndThreshold', 'fusionPTColormap']);
605
+
606
+ // For the hanging protocol we need to decide on the window level
607
+ // based on whether the SUV is corrected or not, hence we can't hard
608
+ // code the window level in the hanging protocol but we add a custom
609
+ // attribute to the hanging protocol that will be used to get the
610
+ // window level based on the metadata
611
+ hangingProtocolService.addCustomAttribute('getPTVOIRange', 'get PT VOI based on corrected or not', props => {
612
+ const ptDisplaySet = props.find(imageSet => imageSet.Modality === 'PT');
613
+ if (!ptDisplaySet) {
614
+ return;
615
+ }
616
+ const {
617
+ imageId
618
+ } = ptDisplaySet.images[0];
619
+ const imageIdScalingFactor = MetadataProvider.get('scalingModule', imageId);
620
+ const isSUVAvailable = imageIdScalingFactor && imageIdScalingFactor.suvbw;
621
+ if (isSUVAvailable) {
622
+ return {
623
+ windowWidth: 5,
624
+ windowCenter: 2.5
625
+ };
626
+ }
627
+ return;
628
+ });
629
+ },
630
+ onModeExit: _ref3 => {
631
+ let {
632
+ servicesManager
633
+ } = _ref3;
634
+ const {
635
+ toolGroupService,
636
+ syncGroupService,
637
+ segmentationService,
638
+ cornerstoneViewportService
639
+ } = servicesManager.services;
640
+ unsubscriptions.forEach(unsubscribe => unsubscribe());
641
+ toolGroupService.destroy();
642
+ syncGroupService.destroy();
643
+ segmentationService.destroy();
644
+ cornerstoneViewportService.destroy();
645
+ },
646
+ validationTags: {
647
+ study: [],
648
+ series: []
649
+ },
650
+ isValidMode: _ref4 => {
651
+ let {
652
+ modalities,
653
+ study
654
+ } = _ref4;
655
+ const modalities_list = modalities.split('\\');
656
+ const invalidModalities = ['SM'];
657
+ const isValid = modalities_list.includes('CT') && modalities_list.includes('PT') && !invalidModalities.some(modality => modalities_list.includes(modality)) &&
658
+ // This is study is a 4D study with PT and CT and not a 3D study for the tmtv
659
+ // mode, until we have a better way to identify 4D studies we will use the
660
+ // StudyInstanceUID to identify the study
661
+ // Todo: when we add the 4D mode which comes with a mechanism to identify
662
+ // 4D studies we can use that
663
+ study.studyInstanceUid !== '1.3.6.1.4.1.12842.1.1.14.3.20220915.105557.468.2963630849';
664
+
665
+ // there should be both CT and PT modalities and the modality should not be SM
666
+ return isValid;
667
+ },
668
+ routes: [{
669
+ path: 'tmtv',
670
+ /*init: ({ servicesManager, extensionManager }) => {
671
+ //defaultViewerRouteInit
672
+ },*/
673
+ layoutTemplate: _ref5 => {
674
+ let {
675
+ location,
676
+ servicesManager
677
+ } = _ref5;
678
+ return {
679
+ id: ohif.layout,
680
+ props: {
681
+ // leftPanels: [ohif.thumbnailList],
682
+ rightPanels: [tmtv.ROIThresholdPanel, tmtv.petSUV],
683
+ viewports: [{
684
+ namespace: cs3d.viewport,
685
+ displaySetsToDisplay: [ohif.sopClassHandler]
686
+ }]
687
+ }
688
+ };
689
+ }
690
+ }],
691
+ extensions: extensionDependencies,
692
+ hangingProtocol: tmtv.hangingProtocol,
693
+ sopClassHandlers: [ohif.sopClassHandler],
694
+ hotkeys: [...src/* hotkeys.defaults.hotkeyBindings */.dD.defaults.hotkeyBindings]
695
+ };
696
+ }
697
+ const mode = {
698
+ id: id,
699
+ modeFactory,
700
+ extensionDependencies
701
+ };
702
+ /* harmony default export */ const tmtv_src = (mode);
703
+
704
+ /***/ })
705
+
706
+ }]);