@ohif/app 3.8.0-beta.37 → 3.8.0-beta.39
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/{19.bundle.dd04549651e5cf57faed.js → 19.bundle.33fd95908f3b721c5df4.js} +9 -3
- package/dist/{359.bundle.e2368d3803386a523fdb.js → 359.bundle.cd6f117669dc171d3594.js} +1 -1
- package/dist/{661.bundle.28ef6d8cd035876bd8e2.js → 661.bundle.949c984fe2f9f753b65c.js} +117 -43
- package/dist/{738.bundle.ccf62a32b25fdb42cc74.js → 738.bundle.1d4070228c07ca2c465d.js} +33 -7
- package/dist/{app.bundle.9d88d2da0b6190c77cc2.js → app.bundle.462a078e34c4fa6d0f1f.js} +60094 -18128
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +18 -18
- package/dist/514.bundle.e89082f91e5a7ef3e039.js +0 -41957
- /package/dist/{12.bundle.2292b15e4b7b5d86fb84.js → 12.bundle.4b3110a689ec79192d6a.js} +0 -0
- /package/dist/{170.bundle.39279a2336dc1daf7ae8.js → 170.bundle.8197beb652e1b49504f4.js} +0 -0
- /package/dist/{185.bundle.9ef3f123beed05ecd804.js → 185.bundle.7977eec2efc72741c93e.js} +0 -0
- /package/dist/{199.bundle.0a3a63176033a4de78bc.js → 199.bundle.48505ca7325c21027606.js} +0 -0
- /package/dist/{281.bundle.be4a3502af6da1981a28.js → 281.bundle.33686de9a8be4084b885.js} +0 -0
- /package/dist/{410.bundle.d3746ff102c01e870023.js → 410.bundle.fd6217a2341a37c35528.js} +0 -0
- /package/dist/{456.bundle.9faecbda28164b9d242b.js → 456.bundle.7f302122e9cbc677477b.js} +0 -0
- /package/dist/{466.bundle.1f21dd37d195915ed82e.js → 466.bundle.b1d56c6d1e3c69009345.js} +0 -0
- /package/dist/{483.bundle.1ce43855923cbb2760ec.js → 483.bundle.88dc538b3d8efa30a8ca.js} +0 -0
- /package/dist/{506.bundle.2dc71df132ed0676a555.js → 506.bundle.921cdf8c0ddda93372f0.js} +0 -0
- /package/dist/{613.bundle.879cb01a1c9130dfcb36.js → 613.bundle.2e115244ce9f20220265.js} +0 -0
- /package/dist/{687.bundle.5fc1658132ba988e9ec1.js → 687.bundle.8a4bd5f7c8edb909d14a.js} +0 -0
- /package/dist/{814.bundle.8012c51e5c3cf651453e.js → 814.bundle.8fab55069b24cc76b791.js} +0 -0
- /package/dist/{965.bundle.a189da0561277f4d46db.js → 965.bundle.0aac4893d9ef59b9daae.js} +0 -0
|
@@ -804,7 +804,8 @@ function promptHydrateStructuredReport_askTrackMeasurements(uiViewportDialogServ
|
|
|
804
804
|
|
|
805
805
|
function hydrateStructuredReport({
|
|
806
806
|
servicesManager,
|
|
807
|
-
extensionManager
|
|
807
|
+
extensionManager,
|
|
808
|
+
appConfig
|
|
808
809
|
}, ctx, evt) {
|
|
809
810
|
const {
|
|
810
811
|
displaySetService
|
|
@@ -817,7 +818,8 @@ function hydrateStructuredReport({
|
|
|
817
818
|
return new Promise((resolve, reject) => {
|
|
818
819
|
const hydrationResult = (0,cornerstone_dicom_sr_src.hydrateStructuredReport)({
|
|
819
820
|
servicesManager,
|
|
820
|
-
extensionManager
|
|
821
|
+
extensionManager,
|
|
822
|
+
appConfig
|
|
821
823
|
}, displaySetInstanceUID);
|
|
822
824
|
const StudyInstanceUID = hydrationResult.StudyInstanceUID;
|
|
823
825
|
const SeriesInstanceUIDs = hydrationResult.SeriesInstanceUIDs;
|
|
@@ -1739,6 +1741,8 @@ WrappedPanelStudyBrowserTracking.propTypes = {
|
|
|
1739
1741
|
/* harmony default export */ const panels_PanelStudyBrowserTracking = (WrappedPanelStudyBrowserTracking);
|
|
1740
1742
|
// EXTERNAL MODULE: ./hooks/index.js + 1 modules
|
|
1741
1743
|
var hooks = __webpack_require__(10800);
|
|
1744
|
+
// EXTERNAL MODULE: ./state/index.js + 1 modules
|
|
1745
|
+
var state = __webpack_require__(62657);
|
|
1742
1746
|
;// CONCATENATED MODULE: ../../../extensions/measurement-tracking/src/panels/PanelMeasurementTableTracking/ActionButtons.tsx
|
|
1743
1747
|
|
|
1744
1748
|
|
|
@@ -1788,6 +1792,7 @@ var lodash_debounce_default = /*#__PURE__*/__webpack_require__.n(lodash_debounce
|
|
|
1788
1792
|
|
|
1789
1793
|
|
|
1790
1794
|
|
|
1795
|
+
|
|
1791
1796
|
const {
|
|
1792
1797
|
downloadCSVReport
|
|
1793
1798
|
} = src.utils;
|
|
@@ -1823,6 +1828,7 @@ function PanelMeasurementTableTracking({
|
|
|
1823
1828
|
const [displayStudySummary, setDisplayStudySummary] = (0,react.useState)(DISPLAY_STUDY_SUMMARY_INITIAL_VALUE);
|
|
1824
1829
|
const [displayMeasurements, setDisplayMeasurements] = (0,react.useState)([]);
|
|
1825
1830
|
const measurementsPanelRef = (0,react.useRef)(null);
|
|
1831
|
+
const [appConfig] = (0,state/* useAppConfig */.M)();
|
|
1826
1832
|
(0,react.useEffect)(() => {
|
|
1827
1833
|
const measurements = measurementService.getMeasurements();
|
|
1828
1834
|
const filteredMeasurements = measurements.filter(m => trackedStudy === m.referenceStudyUID && trackedSeries.includes(m.referenceSeriesUID));
|
|
@@ -2026,7 +2032,7 @@ function PanelMeasurementTableTracking({
|
|
|
2026
2032
|
servicesManager: servicesManager,
|
|
2027
2033
|
onClick: jumpToImage,
|
|
2028
2034
|
onEdit: onMeasurementItemEditHandler
|
|
2029
|
-
})), /*#__PURE__*/react.createElement("div", {
|
|
2035
|
+
})), !appConfig?.disableEditing && /*#__PURE__*/react.createElement("div", {
|
|
2030
2036
|
className: "flex justify-center p-4"
|
|
2031
2037
|
}, /*#__PURE__*/react.createElement(PanelMeasurementTableTracking_ActionButtons, {
|
|
2032
2038
|
onExportClick: exportReport,
|
|
@@ -111,7 +111,7 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
|
|
|
111
111
|
active: [{
|
|
112
112
|
toolName: toolNames.VolumeRotateMouseWheel,
|
|
113
113
|
configuration: {
|
|
114
|
-
rotateIncrementDegrees:
|
|
114
|
+
rotateIncrementDegrees: 5
|
|
115
115
|
}
|
|
116
116
|
}, {
|
|
117
117
|
toolName: toolNames.MipJumpToClick,
|
|
@@ -39,6 +39,31 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
39
39
|
});
|
|
40
40
|
return Constructor;
|
|
41
41
|
}
|
|
42
|
+
function _toConsumableArray(arr) {
|
|
43
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
44
|
+
}
|
|
45
|
+
function _arrayWithoutHoles(arr) {
|
|
46
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
47
|
+
}
|
|
48
|
+
function _iterableToArray(iter) {
|
|
49
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
50
|
+
}
|
|
51
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
52
|
+
if (!o) return;
|
|
53
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
54
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
55
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
56
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
57
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
58
|
+
}
|
|
59
|
+
function _arrayLikeToArray(arr, len) {
|
|
60
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
61
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
62
|
+
return arr2;
|
|
63
|
+
}
|
|
64
|
+
function _nonIterableSpread() {
|
|
65
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
66
|
+
}
|
|
42
67
|
function _toPrimitive(input, hint) {
|
|
43
68
|
if (typeof input !== "object" || input === null) return input;
|
|
44
69
|
var prim = input[Symbol.toPrimitive];
|
|
@@ -311,6 +336,12 @@ var MEDIATYPES = {
|
|
|
311
336
|
PNG: 'image/png'
|
|
312
337
|
};
|
|
313
338
|
|
|
339
|
+
/**
|
|
340
|
+
* debugLog is a function that can be called with console.log arguments, and will
|
|
341
|
+
* be conditionally displayed, only when debug logging is enabled.
|
|
342
|
+
*/
|
|
343
|
+
var debugLog = function debugLog() {};
|
|
344
|
+
|
|
314
345
|
/**
|
|
315
346
|
* @typedef { import("../types/types").InstanceMetadata } InstanceMetadata
|
|
316
347
|
*/
|
|
@@ -340,6 +371,7 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
340
371
|
* @param {Object=} options.headers - HTTP headers
|
|
341
372
|
* @param {Array.<RequestHook>=} options.requestHooks - Request hooks.
|
|
342
373
|
* @param {Object=} options.verbose - print to console request warnings and errors, default true
|
|
374
|
+
* @param {Object=} options.debug - print to the console debug level information/status updates.
|
|
343
375
|
* @param {boolean|String} options.singlepart - retrieve singlepart for the named types.
|
|
344
376
|
* The available types are: bulkdata, video, image. true means all.
|
|
345
377
|
*/
|
|
@@ -357,25 +389,25 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
357
389
|
this.password = options.password;
|
|
358
390
|
}
|
|
359
391
|
if ('qidoURLPrefix' in options) {
|
|
360
|
-
|
|
392
|
+
debugLog("use URL prefix for QIDO-RS: ".concat(options.qidoURLPrefix));
|
|
361
393
|
this.qidoURL = "".concat(this.baseURL, "/").concat(options.qidoURLPrefix);
|
|
362
394
|
} else {
|
|
363
395
|
this.qidoURL = this.baseURL;
|
|
364
396
|
}
|
|
365
397
|
if ('wadoURLPrefix' in options) {
|
|
366
|
-
|
|
398
|
+
debugLog("use URL prefix for WADO-RS: ".concat(options.wadoURLPrefix));
|
|
367
399
|
this.wadoURL = "".concat(this.baseURL, "/").concat(options.wadoURLPrefix);
|
|
368
400
|
} else {
|
|
369
401
|
this.wadoURL = this.baseURL;
|
|
370
402
|
}
|
|
371
403
|
if ('stowURLPrefix' in options) {
|
|
372
|
-
|
|
404
|
+
debugLog("use URL prefix for STOW-RS: ".concat(options.stowURLPrefix));
|
|
373
405
|
this.stowURL = "".concat(this.baseURL, "/").concat(options.stowURLPrefix);
|
|
374
406
|
} else {
|
|
375
407
|
this.stowURL = this.baseURL;
|
|
376
408
|
}
|
|
377
409
|
if (options.singlepart) {
|
|
378
|
-
|
|
410
|
+
debugLog('use singlepart', options.singlepart);
|
|
379
411
|
this.singlepart = options.singlepart === true ? 'bulkdata,video,image' : options.singlepart;
|
|
380
412
|
} else {
|
|
381
413
|
this.singlepart = '';
|
|
@@ -394,14 +426,40 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
394
426
|
|
|
395
427
|
// Verbose - print to console request warnings and errors, default true
|
|
396
428
|
this.verbose = options.verbose !== false;
|
|
429
|
+
this.setDebug(options.debug);
|
|
397
430
|
}
|
|
398
431
|
|
|
399
432
|
/**
|
|
400
|
-
*
|
|
401
|
-
*
|
|
402
|
-
*
|
|
433
|
+
* Allows setting the debug log information.
|
|
434
|
+
* Note this is different from verbose in that verbose is whether to include warning/error information, defaulting to true
|
|
435
|
+
*
|
|
436
|
+
* @param {boolean} debugLevel
|
|
437
|
+
* @param {function} debugLogFunction to call with the debug output arguments.
|
|
403
438
|
*/
|
|
404
439
|
_createClass(DICOMwebClient, [{
|
|
440
|
+
key: "setDebug",
|
|
441
|
+
value: function setDebug() {
|
|
442
|
+
var debugLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
443
|
+
var debugLogFunction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
444
|
+
this.debugLevel = !!debugLevel;
|
|
445
|
+
debugLog = debugLogFunction || debugLevel ? console.log : function () {};
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Gets debug flag
|
|
449
|
+
*
|
|
450
|
+
* @returns true if debug logging is enabled
|
|
451
|
+
*/
|
|
452
|
+
}, {
|
|
453
|
+
key: "getDebug",
|
|
454
|
+
value: function getDebug() {
|
|
455
|
+
return this.debugLevel;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Sets verbose flag.
|
|
459
|
+
*
|
|
460
|
+
* @param {Boolean} verbose
|
|
461
|
+
*/
|
|
462
|
+
}, {
|
|
405
463
|
key: "setVerbose",
|
|
406
464
|
value: function setVerbose(verbose) {
|
|
407
465
|
this.verbose = verbose;
|
|
@@ -457,12 +515,12 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
457
515
|
|
|
458
516
|
// Event triggered when upload starts
|
|
459
517
|
request.onloadstart = function onloadstart() {
|
|
460
|
-
|
|
518
|
+
debugLog('upload started: ', url);
|
|
461
519
|
};
|
|
462
520
|
|
|
463
521
|
// Event triggered when upload ends
|
|
464
522
|
request.onloadend = function onloadend() {
|
|
465
|
-
|
|
523
|
+
debugLog('upload finished');
|
|
466
524
|
};
|
|
467
525
|
|
|
468
526
|
// Handle response message
|
|
@@ -848,7 +906,8 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
848
906
|
}
|
|
849
907
|
/**
|
|
850
908
|
* Performs an HTTP GET request that accepts a multipart message
|
|
851
|
-
* with a application/octet-stream
|
|
909
|
+
* with a application/octet-stream, OR any of the equivalencies for that (eg
|
|
910
|
+
* application/pdf etc)
|
|
852
911
|
*
|
|
853
912
|
* @param {String} url - Unique resource locator
|
|
854
913
|
* @param {Object[]} mediaTypes - Acceptable media types and optionally the UIDs of the
|
|
@@ -865,7 +924,7 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
865
924
|
var headers = {};
|
|
866
925
|
var defaultMediaType = 'application/octet-stream';
|
|
867
926
|
var supportedMediaTypes = {
|
|
868
|
-
'1.2.840.10008.1.2.1':
|
|
927
|
+
'1.2.840.10008.1.2.1': _toConsumableArray(Object.values(MEDIATYPES))
|
|
869
928
|
};
|
|
870
929
|
var acceptableMediaTypes = mediaTypes;
|
|
871
930
|
if (!mediaTypes) {
|
|
@@ -937,7 +996,7 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
937
996
|
*/
|
|
938
997
|
value: function searchForStudies() {
|
|
939
998
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
940
|
-
|
|
999
|
+
debugLog('search for studies');
|
|
941
1000
|
var withCredentials = false;
|
|
942
1001
|
var url = "".concat(this.qidoURL, "/studies");
|
|
943
1002
|
if ('queryParams' in options) {
|
|
@@ -964,7 +1023,7 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
964
1023
|
if (!('studyInstanceUID' in options)) {
|
|
965
1024
|
throw new Error('Study Instance UID is required for retrieval of study metadata');
|
|
966
1025
|
}
|
|
967
|
-
|
|
1026
|
+
debugLog("retrieve metadata of study ".concat(options.studyInstanceUID));
|
|
968
1027
|
var url = "".concat(this.wadoURL, "/studies/").concat(options.studyInstanceUID, "/metadata");
|
|
969
1028
|
var withCredentials = false;
|
|
970
1029
|
if ('withCredentials' in options) {
|
|
@@ -988,7 +1047,7 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
988
1047
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
989
1048
|
var url = this.qidoURL;
|
|
990
1049
|
if ('studyInstanceUID' in options) {
|
|
991
|
-
|
|
1050
|
+
debugLog("search series of study ".concat(options.studyInstanceUID));
|
|
992
1051
|
url += "/studies/".concat(options.studyInstanceUID);
|
|
993
1052
|
}
|
|
994
1053
|
url += '/series';
|
|
@@ -1021,7 +1080,7 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
1021
1080
|
if (!('seriesInstanceUID' in options)) {
|
|
1022
1081
|
throw new Error('Series Instance UID is required for retrieval of series metadata');
|
|
1023
1082
|
}
|
|
1024
|
-
|
|
1083
|
+
debugLog("retrieve metadata of series ".concat(options.seriesInstanceUID));
|
|
1025
1084
|
var url = "".concat(this.wadoURL, "/studies/").concat(options.studyInstanceUID, "/series/").concat(options.seriesInstanceUID, "/metadata");
|
|
1026
1085
|
var withCredentials = false;
|
|
1027
1086
|
if ('withCredentials' in options) {
|
|
@@ -1049,13 +1108,13 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
1049
1108
|
if ('studyInstanceUID' in options) {
|
|
1050
1109
|
url += "/studies/".concat(options.studyInstanceUID);
|
|
1051
1110
|
if ('seriesInstanceUID' in options) {
|
|
1052
|
-
|
|
1111
|
+
debugLog("search for instances of series ".concat(options.seriesInstanceUID));
|
|
1053
1112
|
url += "/series/".concat(options.seriesInstanceUID);
|
|
1054
1113
|
} else {
|
|
1055
|
-
|
|
1114
|
+
debugLog("search for instances of study ".concat(options.studyInstanceUID));
|
|
1056
1115
|
}
|
|
1057
1116
|
} else {
|
|
1058
|
-
|
|
1117
|
+
debugLog('search for instances');
|
|
1059
1118
|
}
|
|
1060
1119
|
url += '/instances';
|
|
1061
1120
|
if ('queryParams' in options) {
|
|
@@ -1121,7 +1180,7 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
1121
1180
|
if (!('sopInstanceUID' in options)) {
|
|
1122
1181
|
throw new Error('SOP Instance UID is required for retrieval of instance metadata');
|
|
1123
1182
|
}
|
|
1124
|
-
|
|
1183
|
+
debugLog("retrieve metadata of instance ".concat(options.sopInstanceUID));
|
|
1125
1184
|
var url = "".concat(this.wadoURL, "/studies/").concat(options.studyInstanceUID, "/series/").concat(options.seriesInstanceUID, "/instances/").concat(options.sopInstanceUID, "/metadata");
|
|
1126
1185
|
var withCredentials = false;
|
|
1127
1186
|
if ('withCredentials' in options) {
|
|
@@ -1155,7 +1214,7 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
1155
1214
|
if (!('frameNumbers' in options)) {
|
|
1156
1215
|
throw new Error('frame numbers are required for retrieval of instance frames');
|
|
1157
1216
|
}
|
|
1158
|
-
|
|
1217
|
+
debugLog("retrieve frames ".concat(options.frameNumbers.toString(), " of instance ").concat(options.sopInstanceUID));
|
|
1159
1218
|
var url = "".concat(this.wadoURL, "/studies/").concat(options.studyInstanceUID, "/series/").concat(options.seriesInstanceUID, "/instances/").concat(options.sopInstanceUID, "/frames/").concat(options.frameNumbers.toString());
|
|
1160
1219
|
var mediaTypes = options.mediaTypes;
|
|
1161
1220
|
var withCredentials = false;
|
|
@@ -1190,7 +1249,9 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
1190
1249
|
'1.2.840.10008.1.2.4.90': ['image/jp2'],
|
|
1191
1250
|
'1.2.840.10008.1.2.4.91': ['image/jp2'],
|
|
1192
1251
|
'1.2.840.10008.1.2.4.92': ['image/jpx'],
|
|
1193
|
-
'1.2.840.10008.1.2.4.93': ['image/jpx']
|
|
1252
|
+
'1.2.840.10008.1.2.4.93': ['image/jpx'],
|
|
1253
|
+
'1.2.840.10008.1.2.4.201': ['image/jhc'],
|
|
1254
|
+
'1.2.840.10008.1.2.4.202': ['image/jhc']
|
|
1194
1255
|
};
|
|
1195
1256
|
var headers = {
|
|
1196
1257
|
Accept: DICOMwebClient._buildMultipartAcceptHeaderFieldValue(mediaTypes, supportedMediaTypes)
|
|
@@ -1350,7 +1411,7 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
1350
1411
|
if (!('frameNumbers' in options)) {
|
|
1351
1412
|
throw new Error('frame numbers are required for retrieval of rendered instance frames');
|
|
1352
1413
|
}
|
|
1353
|
-
|
|
1414
|
+
debugLog("retrieve rendered frames ".concat(options.frameNumbers.toString(), " of instance ").concat(options.sopInstanceUID));
|
|
1354
1415
|
var url = "".concat(this.wadoURL, "/studies/").concat(options.studyInstanceUID, "/series/").concat(options.seriesInstanceUID, "/instances/").concat(options.sopInstanceUID, "/frames/").concat(options.frameNumbers.toString(), "/rendered");
|
|
1355
1416
|
var mediaTypes = options.mediaTypes,
|
|
1356
1417
|
queryParams = options.queryParams;
|
|
@@ -1567,17 +1628,19 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
1567
1628
|
if (this.singlepart.indexOf('bulkdata') !== -1) {
|
|
1568
1629
|
return this._httpGet(url, options.headers, 'arraybuffer', null, withCredentials);
|
|
1569
1630
|
}
|
|
1570
|
-
if (
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1631
|
+
if (mediaTypes) {
|
|
1632
|
+
try {
|
|
1633
|
+
var commonMediaType = DICOMwebClient._getCommonMediaType(mediaTypes);
|
|
1634
|
+
if (commonMediaType === 'image/') {
|
|
1635
|
+
return this._httpGetMultipartImage(url, mediaTypes, byteRange, false, false, progressCallback, withCredentials);
|
|
1636
|
+
}
|
|
1637
|
+
} catch (e) {
|
|
1638
|
+
// No-op - this happens sometimes if trying to fetch the specific desired type but want to fallback to octet-stream
|
|
1639
|
+
}
|
|
1579
1640
|
}
|
|
1580
|
-
|
|
1641
|
+
|
|
1642
|
+
// Just use the media types provided
|
|
1643
|
+
return this._httpGetMultipartApplicationOctetStream(url, mediaTypes, byteRange, false, progressCallback, withCredentials);
|
|
1581
1644
|
}
|
|
1582
1645
|
/**
|
|
1583
1646
|
* Stores DICOM Instances.
|
|
@@ -1671,16 +1734,20 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
1671
1734
|
return fieldValueParts.join(', ');
|
|
1672
1735
|
}
|
|
1673
1736
|
/**
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1737
|
+
* Builds an accept header field value for HTTP GET multipart request
|
|
1738
|
+
* messages. Will throw an exception if no media types are found which are acceptable,
|
|
1739
|
+
* but will only log a verbose level message when types are specified which are
|
|
1740
|
+
* not acceptable. This allows requesting several types with having to know
|
|
1741
|
+
* whether they are all acceptable or not.
|
|
1742
|
+
*
|
|
1743
|
+
* @param {Object[]} mediaTypes - Acceptable media types
|
|
1744
|
+
* @param {Object[]} supportedMediaTypes - Supported media types
|
|
1745
|
+
* @private
|
|
1746
|
+
*/
|
|
1681
1747
|
}, {
|
|
1682
1748
|
key: "_buildMultipartAcceptHeaderFieldValue",
|
|
1683
1749
|
value: function _buildMultipartAcceptHeaderFieldValue(mediaTypes, supportedMediaTypes) {
|
|
1750
|
+
var _this2 = this;
|
|
1684
1751
|
if (!Array.isArray(mediaTypes)) {
|
|
1685
1752
|
throw new Error('Acceptable media types must be provided as an Array');
|
|
1686
1753
|
}
|
|
@@ -1698,7 +1765,8 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
1698
1765
|
// to one or more Media Types
|
|
1699
1766
|
if (!Object.values(supportedMediaTypes).flat(1).includes(mediaType)) {
|
|
1700
1767
|
if (!mediaType.endsWith('/*') || !mediaType.endsWith('/')) {
|
|
1701
|
-
|
|
1768
|
+
debugLog("Media type ".concat(mediaType, " is not supported for requested resource"));
|
|
1769
|
+
return;
|
|
1702
1770
|
}
|
|
1703
1771
|
}
|
|
1704
1772
|
if (transferSyntaxUID) {
|
|
@@ -1722,10 +1790,16 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
1722
1790
|
fieldValue += "; transfer-syntax=".concat(transferSyntaxUID);
|
|
1723
1791
|
}
|
|
1724
1792
|
} else if (Array.isArray(supportedMediaTypes) && !supportedMediaTypes.includes(mediaType)) {
|
|
1725
|
-
|
|
1793
|
+
if (_this2.verbose) {
|
|
1794
|
+
console.warn("Media type ".concat(mediaType, " is not supported for requested resource"));
|
|
1795
|
+
}
|
|
1796
|
+
return;
|
|
1726
1797
|
}
|
|
1727
1798
|
fieldValueParts.push(fieldValue);
|
|
1728
1799
|
});
|
|
1800
|
+
if (!fieldValueParts.length) {
|
|
1801
|
+
throw new Error("No acceptable media types found among ".concat(JSON.stringify(mediaTypes)));
|
|
1802
|
+
}
|
|
1729
1803
|
return fieldValueParts.join(', ');
|
|
1730
1804
|
}
|
|
1731
1805
|
/**
|
|
@@ -1770,7 +1844,7 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
1770
1844
|
return Array.from(types);
|
|
1771
1845
|
}
|
|
1772
1846
|
/**
|
|
1773
|
-
* Gets common type of acceptable media types and asserts that only
|
|
1847
|
+
* Gets common base type of acceptable media types and asserts that only
|
|
1774
1848
|
one type is specified. For example, ``("image/jpeg", "image/jp2")``
|
|
1775
1849
|
will pass, but ``("image/jpeg", "video/mpeg2")`` will raise an
|
|
1776
1850
|
exception.
|
|
@@ -1778,7 +1852,7 @@ var DICOMwebClient = /*#__PURE__*/function () {
|
|
|
1778
1852
|
* @param {Object[]} mediaTypes - Acceptable media types and optionally the UIDs of the
|
|
1779
1853
|
corresponding transfer syntaxes
|
|
1780
1854
|
* @private
|
|
1781
|
-
* @returns {String[]} Common media type
|
|
1855
|
+
* @returns {String[]} Common media type, eg `image/` for the above example.
|
|
1782
1856
|
*/
|
|
1783
1857
|
}, {
|
|
1784
1858
|
key: "_getCommonMediaType",
|
|
@@ -954,7 +954,11 @@ const getDirectURL = (config, params) => {
|
|
|
954
954
|
}
|
|
955
955
|
if (!singlepart || singlepart !== true && singlepart.indexOf(fetchPart) === -1) {
|
|
956
956
|
if (value.retrieveBulkData) {
|
|
957
|
-
|
|
957
|
+
// Try the specified retrieve type.
|
|
958
|
+
const options = {
|
|
959
|
+
mediaType: defaultType
|
|
960
|
+
};
|
|
961
|
+
return value.retrieveBulkData(options).then(arr => {
|
|
958
962
|
value.DirectRetrieveURL = URL.createObjectURL(new Blob([arr], {
|
|
959
963
|
type: defaultType
|
|
960
964
|
}));
|
|
@@ -1318,10 +1322,13 @@ function createDicomWebApi(dicomWebConfig, servicesManager) {
|
|
|
1318
1322
|
// in which case it isn't necessary to re-read this.
|
|
1319
1323
|
if (value && value.BulkDataURI && !value.Value) {
|
|
1320
1324
|
// Provide a method to fetch bulkdata
|
|
1321
|
-
value.retrieveBulkData = () => {
|
|
1325
|
+
value.retrieveBulkData = (options = {}) => {
|
|
1322
1326
|
// handle the scenarios where bulkDataURI is relative path
|
|
1323
1327
|
fixBulkDataURI(value, naturalized, dicomWebConfig);
|
|
1324
|
-
const
|
|
1328
|
+
const {
|
|
1329
|
+
mediaType
|
|
1330
|
+
} = options;
|
|
1331
|
+
const useOptions = {
|
|
1325
1332
|
// The bulkdata fetches work with either multipart or
|
|
1326
1333
|
// singlepart, so set multipart to false to let the server
|
|
1327
1334
|
// decide which type to respond with.
|
|
@@ -1331,10 +1338,16 @@ function createDicomWebApi(dicomWebConfig, servicesManager) {
|
|
|
1331
1338
|
// is relative - that isn't disallowed by DICOMweb, but
|
|
1332
1339
|
// isn't well specified in the standard, but is needed in
|
|
1333
1340
|
// any implementation that stores static copies of the metadata
|
|
1334
|
-
StudyInstanceUID: naturalized.StudyInstanceUID
|
|
1341
|
+
StudyInstanceUID: naturalized.StudyInstanceUID,
|
|
1342
|
+
mediaTypes: mediaType ? [{
|
|
1343
|
+
mediaType
|
|
1344
|
+
}, {
|
|
1345
|
+
mediaType: 'application/octet-stream'
|
|
1346
|
+
}] : undefined,
|
|
1347
|
+
...options
|
|
1335
1348
|
};
|
|
1336
1349
|
// Todo: this needs to be from wado dicom web client
|
|
1337
|
-
return qidoDicomWebClient.retrieveBulkData(
|
|
1350
|
+
return qidoDicomWebClient.retrieveBulkData(useOptions).then(val => {
|
|
1338
1351
|
// There are DICOM PDF cases where the first ArrayBuffer in the array is
|
|
1339
1352
|
// the bulk data and DICOM video cases where the second ArrayBuffer is
|
|
1340
1353
|
// the bulk data. Here we play it safe and do a find.
|
|
@@ -2462,8 +2475,8 @@ function ViewerHeader({
|
|
|
2462
2475
|
hotkeyDefinitions,
|
|
2463
2476
|
hotkeyDefaults
|
|
2464
2477
|
} = hotkeysManager;
|
|
2465
|
-
const versionNumber = "3.8.0-beta.
|
|
2466
|
-
const commitHash = "
|
|
2478
|
+
const versionNumber = "3.8.0-beta.39";
|
|
2479
|
+
const commitHash = "2049c0936c86f819604c243d3dc7b3fe971b5b2c";
|
|
2467
2480
|
const menuOptions = [{
|
|
2468
2481
|
title: t('Header:About'),
|
|
2469
2482
|
icon: 'info',
|
|
@@ -4808,10 +4821,13 @@ function adaptItem(item, subProps) {
|
|
|
4808
4821
|
}
|
|
4809
4822
|
// EXTERNAL MODULE: ../../ui/src/components/ContextMenu/ContextMenu.tsx
|
|
4810
4823
|
var ContextMenu = __webpack_require__(5638);
|
|
4824
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 428 modules
|
|
4825
|
+
var dist_esm = __webpack_require__(4514);
|
|
4811
4826
|
;// CONCATENATED MODULE: ../../../extensions/default/src/CustomizableContextMenu/ContextMenuController.tsx
|
|
4812
4827
|
var _class;
|
|
4813
4828
|
|
|
4814
4829
|
|
|
4830
|
+
|
|
4815
4831
|
/**
|
|
4816
4832
|
* The context menu controller is a helper class that knows how
|
|
4817
4833
|
* to manage context menus based on the UI Customization Service.
|
|
@@ -4856,6 +4872,16 @@ class ContextMenuController {
|
|
|
4856
4872
|
menus,
|
|
4857
4873
|
selectorProps
|
|
4858
4874
|
} = contextMenuProps;
|
|
4875
|
+
const annotationManager = dist_esm.annotation.state.getAnnotationManager();
|
|
4876
|
+
const {
|
|
4877
|
+
locking
|
|
4878
|
+
} = dist_esm.annotation;
|
|
4879
|
+
const targetAnnotationId = selectorProps?.nearbyToolData?.annotationUID;
|
|
4880
|
+
const isLocked = locking.isAnnotationLocked(annotationManager.getAnnotation(targetAnnotationId));
|
|
4881
|
+
if (isLocked) {
|
|
4882
|
+
console.warn('Annotation is locked.');
|
|
4883
|
+
return;
|
|
4884
|
+
}
|
|
4859
4885
|
console.log('Getting items from', menus);
|
|
4860
4886
|
const items = getMenuItems(selectorProps || contextMenuProps, event, menus, menuId);
|
|
4861
4887
|
this.services.uiDialogService.dismiss({
|