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