@ohif/app 3.8.0-beta.3 → 3.8.0-beta.31
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/{12.bundle.9b2ef667aa885a578371.js → 12.bundle.baf03be6fd41c521f9b0.js} +9 -11
- package/dist/{125.bundle.253395f320b72180da63.js → 125.bundle.df666cb677e5a8982157.js} +4 -5
- package/dist/{663.bundle.81cfb1c981897d109629.js → 170.bundle.5fffe3391db9fff495bf.js} +97 -89
- package/dist/{181.bundle.2ddc6f90740895a3949c.js → 181.bundle.ae92b8a551d041d06e90.js} +60 -72
- package/dist/181.css +1 -1
- package/dist/{370.bundle.4e319ff9104d8a89220d.js → 185.bundle.ff107942daab25638397.js} +338 -209
- package/dist/{19.bundle.bbad00adaeb0c0f2da83.js → 19.bundle.7d9970e947c15913acbd.js} +119 -134
- package/dist/{99.bundle.4ab1ada642b321733689.js → 199.bundle.44fef191037021697850.js} +215 -162
- package/dist/{202.bundle.d3490836f71e001dd30f.js → 202.bundle.0ca2f2479d2578f539b0.js} +349 -332
- package/dist/20fc4c659b85ccd2a9c0.wasm +0 -0
- package/dist/{220.bundle.f7e1c96c94245e70f2be.js → 223.bundle.d4ac6ef2cfe47a9c4afc.js} +4422 -3671
- package/dist/{23.bundle.e008ad788170f2ed5569.js → 23.bundle.9d989522a6e4fdcb9c72.js} +1 -1
- package/dist/{250.bundle.8084960e3318cda37317.js → 250.bundle.09c69d348a5d965debc8.js} +21 -26
- package/dist/{281.bundle.6f09a55f6fb6a0c6aa4e.js → 281.bundle.c00c85eedfe6a4e89e27.js} +23 -25
- package/dist/{359.bundle.7d24077b9b48c59ec571.js → 359.bundle.157822292564ce6034e7.js} +26 -29
- package/dist/{410.bundle.7b96f751af0c666c9567.js → 410.bundle.d861967ec73f5ee5033c.js} +24 -28
- package/dist/{417.bundle.af0a207c29b109f84159.js → 417.bundle.5c66801d23d0e98c00e6.js} +2 -2
- package/dist/{451.bundle.9fd36f52ff69594f0669.js → 451.bundle.68a551a7d1746cf904cb.js} +28 -34
- package/dist/{82.bundle.5c4f2b25b65ae87c70e1.js → 456.bundle.0c3e54242e727edd91c3.js} +1207 -662
- package/dist/{221.bundle.fd479ac26e9dc30d8314.js → 466.bundle.4c795d4bbc7235bf310b.js} +108 -144
- package/dist/{471.bundle.b3d77b83b1593c09a504.js → 471.bundle.5809b10f75c8fc2f7167.js} +29 -35
- package/dist/{788.bundle.ee6d5e927bb494147ada.js → 483.bundle.806d836bd789ba8a6236.js} +131 -180
- package/dist/{757.bundle.ec8301d8e70d2b990f65.js → 485.bundle.5b6c33cc43d8f3470642.js} +9 -98
- package/dist/{506.bundle.b6e2450f9614b551fc99.js → 506.bundle.b2fa58f80b714f8f382e.js} +13 -18
- package/dist/{530.bundle.a03b6f942ace3e1baa1e.js → 530.bundle.f904325ef4195d69ac0e.js} +10 -3
- package/dist/{957.bundle.9ea4506963ef8b2d84ba.js → 566.bundle.4840518afd323372c70f.js} +24751 -13727
- package/dist/{613.bundle.5f4a22d23c9091878e44.js → 613.bundle.a094d7efc970b305ac9f.js} +29 -27
- package/dist/{774.bundle.4b2dc46a35012b898e1a.js → 661.bundle.28ef6d8cd035876bd8e2.js} +1772 -8939
- package/dist/{686.bundle.dccef1f36e4bc79bcc48.js → 686.bundle.62c827fe4f0d054c164e.js} +4 -5
- package/dist/{687.bundle.2292faaee50cc4421488.js → 687.bundle.8e4c026d8d4deabc2cc7.js} +19 -35
- package/dist/{342.bundle.ce0adc6253fcc6e2a0e7.js → 738.bundle.80d0ba2a72cbb0f1541c.js} +742 -503
- package/dist/{814.bundle.1debc907ccf495d4b4ca.js → 814.bundle.33bf94ad755d30cbfce5.js} +9 -11
- package/dist/{822.bundle.891f2e57b1b7bc2f4cb4.js → 822.bundle.55759fd8e9b0b489cc6b.js} +14 -16
- package/dist/{886.bundle.4b3a7f2079d085fdbcb3.js → 886.bundle.4496fc7fb83b8c897d20.js} +20 -24
- package/dist/95.bundle.d7a9f450bed3b770504d.js +9002 -0
- package/dist/{236.bundle.0dac31b7539315606135.js → 965.bundle.00bfca7bd5d4088c86a3.js} +104 -126
- package/dist/{app.bundle.abd0d9594a8e043568d4.js → app.bundle.cdb4c8a99ddcd8736c5e.js} +139810 -58799
- package/dist/app.bundle.css +11 -11
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/{dicom-microscopy-viewer.bundle.2c146384eb9466d02ff8.js → dicom-microscopy-viewer.bundle.a7d5060eead13771e784.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/{index.worker.e62ecca63f1a2e124230.worker.js → index.worker.64c896c4316fcd506666.worker.js} +2 -2
- package/dist/index.worker.64c896c4316fcd506666.worker.js.map +1 -0
- package/dist/serve.json +12 -0
- package/dist/sw.js +1 -1
- package/package.json +20 -20
- package/dist/604.bundle.a51f83e64004bca5f497.js +0 -1848
- package/dist/743.bundle.489f7df3a089d4d374e1.js +0 -78007
- package/dist/75788f12450d4c5ed494.wasm +0 -0
- package/dist/775.bundle.2285e7e0e67878948c0d.js +0 -1009
- package/dist/index.worker.e62ecca63f1a2e124230.worker.js.map +0 -1
- /package/dist/{82.css → 456.css} +0 -0
- /package/dist/{221.css → 466.css} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[738],{
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 78738:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6
6
|
|
|
7
7
|
// ESM COMPAT FLAG
|
|
@@ -179,8 +179,7 @@ function searchStudies(server, filter) {
|
|
|
179
179
|
* @param serverSupportsQIDOIncludeField
|
|
180
180
|
* @returns {string} The URL with encoded filter query data
|
|
181
181
|
*/
|
|
182
|
-
function mapParams(params) {
|
|
183
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
182
|
+
function mapParams(params, options = {}) {
|
|
184
183
|
if (!params) {
|
|
185
184
|
return;
|
|
186
185
|
}
|
|
@@ -354,13 +353,12 @@ function buildInstanceWadoUrl(config, instance) {
|
|
|
354
353
|
* @param thumbnail
|
|
355
354
|
* @returns {string} The imageId to be used by Cornerstone
|
|
356
355
|
*/
|
|
357
|
-
function getImageId(
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
} = _ref;
|
|
356
|
+
function getImageId({
|
|
357
|
+
instance,
|
|
358
|
+
frame,
|
|
359
|
+
config,
|
|
360
|
+
thumbnail = false
|
|
361
|
+
}) {
|
|
364
362
|
if (!instance) {
|
|
365
363
|
return;
|
|
366
364
|
}
|
|
@@ -398,10 +396,7 @@ class RetrieveMetadataLoader {
|
|
|
398
396
|
* @param {string} [filter.seriesInstanceUID] - series instance uid to filter results against
|
|
399
397
|
* @param {Function} [sortSeries] - Custom sort function for series
|
|
400
398
|
*/
|
|
401
|
-
constructor(client, studyInstanceUID) {
|
|
402
|
-
let filters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
403
|
-
let sortCriteria = arguments.length > 3 ? arguments[3] : undefined;
|
|
404
|
-
let sortFunction = arguments.length > 4 ? arguments[4] : undefined;
|
|
399
|
+
constructor(client, studyInstanceUID, filters = {}, sortCriteria, sortFunction) {
|
|
405
400
|
this.client = client;
|
|
406
401
|
this.studyInstanceUID = studyInstanceUID;
|
|
407
402
|
this.filters = filters;
|
|
@@ -512,10 +507,12 @@ class RetrieveMetadataLoaderSync extends RetrieveMetadataLoader {
|
|
|
512
507
|
|
|
513
508
|
|
|
514
509
|
/**
|
|
515
|
-
* Creates an immutable series loader object which loads each series sequentially using the iterator interface
|
|
510
|
+
* Creates an immutable series loader object which loads each series sequentially using the iterator interface.
|
|
511
|
+
*
|
|
516
512
|
* @param {DICOMWebClient} dicomWebClient The DICOMWebClient instance to be used for series load
|
|
517
513
|
* @param {string} studyInstanceUID The Study Instance UID from which series will be loaded
|
|
518
514
|
* @param {Array} seriesInstanceUIDList A list of Series Instance UIDs
|
|
515
|
+
*
|
|
519
516
|
* @returns {Object} Returns an object which supports loading of instances from each of given Series Instance UID
|
|
520
517
|
*/
|
|
521
518
|
function makeSeriesAsyncLoader(client, studyInstanceUID, seriesInstanceUIDList) {
|
|
@@ -594,11 +591,10 @@ class RetrieveMetadataLoaderAsync extends RetrieveMetadataLoader {
|
|
|
594
591
|
promises
|
|
595
592
|
};
|
|
596
593
|
}
|
|
597
|
-
async posLoad(
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
} = _ref;
|
|
594
|
+
async posLoad({
|
|
595
|
+
preLoadData,
|
|
596
|
+
promises
|
|
597
|
+
}) {
|
|
602
598
|
return {
|
|
603
599
|
preLoadData,
|
|
604
600
|
promises
|
|
@@ -613,40 +609,91 @@ class RetrieveMetadataLoaderAsync extends RetrieveMetadataLoader {
|
|
|
613
609
|
* Retrieve Study metadata from a DICOM server. If the server is configured to use lazy load, only the first series
|
|
614
610
|
* will be loaded and the property "studyLoader" will be set to let consumer load remaining series as needed.
|
|
615
611
|
*
|
|
616
|
-
* @param {
|
|
617
|
-
* @param {
|
|
618
|
-
* @param {
|
|
619
|
-
* @param {
|
|
620
|
-
* @
|
|
612
|
+
* @param {*} dicomWebClient The DICOMWebClient instance to be used for series load
|
|
613
|
+
* @param {*} StudyInstanceUID The UID of the Study to be retrieved
|
|
614
|
+
* @param {*} enableStudyLazyLoad Whether the study metadata should be loaded asynchronously
|
|
615
|
+
* @param {object} filters Object containing filters to be applied on retrieve metadata process
|
|
616
|
+
* @param {string} [filters.seriesInstanceUID] Series instance uid to filter results against
|
|
617
|
+
* @param {array} [filters.SeriesInstanceUIDs] Series instance uids to filter results against
|
|
618
|
+
* @param {function} [sortCriteria] Sort criteria function
|
|
619
|
+
* @param {function} [sortFunction] Sort function
|
|
620
|
+
*
|
|
621
|
+
* @returns {Promise} A promises that resolves the study descriptor object
|
|
621
622
|
*/
|
|
622
|
-
async function RetrieveMetadata(dicomWebClient,
|
|
623
|
-
let filters = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
624
|
-
let sortCriteria = arguments.length > 4 ? arguments[4] : undefined;
|
|
625
|
-
let sortFunction = arguments.length > 5 ? arguments[5] : undefined;
|
|
623
|
+
async function RetrieveMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters = {}, sortCriteria, sortFunction) {
|
|
626
624
|
const RetrieveMetadataLoader = enableStudyLazyLoad !== false ? RetrieveMetadataLoaderAsync : RetrieveMetadataLoaderSync;
|
|
627
|
-
const retrieveMetadataLoader = new RetrieveMetadataLoader(dicomWebClient,
|
|
625
|
+
const retrieveMetadataLoader = new RetrieveMetadataLoader(dicomWebClient, StudyInstanceUID, filters, sortCriteria, sortFunction);
|
|
628
626
|
const data = await retrieveMetadataLoader.execLoad();
|
|
629
627
|
return data;
|
|
630
628
|
}
|
|
631
629
|
/* harmony default export */ const retrieveMetadata = (RetrieveMetadata);
|
|
630
|
+
;// CONCATENATED MODULE: ../../../extensions/default/src/DicomWebDataSource/utils/retrieveMetadataFiltered.js
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* Retrieve metadata filtered.
|
|
635
|
+
*
|
|
636
|
+
* @param {*} dicomWebClient The DICOMWebClient instance to be used for series load
|
|
637
|
+
* @param {*} StudyInstanceUID The UID of the Study to be retrieved
|
|
638
|
+
* @param {*} enableStudyLazyLoad Whether the study metadata should be loaded asynchronously
|
|
639
|
+
* @param {object} filters Object containing filters to be applied on retrieve metadata process
|
|
640
|
+
* @param {string} [filters.seriesInstanceUID] Series instance uid to filter results against
|
|
641
|
+
* @param {array} [filters.SeriesInstanceUIDs] Series instance uids to filter results against
|
|
642
|
+
* @param {function} [sortCriteria] Sort criteria function
|
|
643
|
+
* @param {function} [sortFunction] Sort function
|
|
644
|
+
*
|
|
645
|
+
* @returns
|
|
646
|
+
*/
|
|
647
|
+
function retrieveMetadataFiltered(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction) {
|
|
648
|
+
const {
|
|
649
|
+
SeriesInstanceUIDs
|
|
650
|
+
} = filters;
|
|
651
|
+
return new Promise((resolve, reject) => {
|
|
652
|
+
const promises = SeriesInstanceUIDs.map(uid => {
|
|
653
|
+
const seriesSpecificFilters = Object.assign({}, filters, {
|
|
654
|
+
seriesInstanceUID: uid
|
|
655
|
+
});
|
|
656
|
+
return retrieveMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, seriesSpecificFilters, sortCriteria, sortFunction);
|
|
657
|
+
});
|
|
658
|
+
Promise.all(promises).then(results => {
|
|
659
|
+
const aggregatedResult = {
|
|
660
|
+
preLoadData: [],
|
|
661
|
+
promises: []
|
|
662
|
+
};
|
|
663
|
+
results.forEach(({
|
|
664
|
+
preLoadData,
|
|
665
|
+
promises
|
|
666
|
+
}) => {
|
|
667
|
+
aggregatedResult.preLoadData = aggregatedResult.preLoadData.concat(preLoadData);
|
|
668
|
+
aggregatedResult.promises = aggregatedResult.promises.concat(promises);
|
|
669
|
+
});
|
|
670
|
+
resolve(aggregatedResult);
|
|
671
|
+
}, reject);
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
/* harmony default export */ const utils_retrieveMetadataFiltered = (retrieveMetadataFiltered);
|
|
632
675
|
;// CONCATENATED MODULE: ../../../extensions/default/src/DicomWebDataSource/retrieveStudyMetadata.js
|
|
633
676
|
|
|
677
|
+
|
|
634
678
|
const moduleName = 'RetrieveStudyMetadata';
|
|
635
679
|
// Cache for promises. Prevents unnecessary subsequent calls to the server
|
|
636
680
|
const StudyMetaDataPromises = new Map();
|
|
637
681
|
|
|
638
682
|
/**
|
|
639
|
-
* Retrieves study metadata
|
|
683
|
+
* Retrieves study metadata.
|
|
640
684
|
*
|
|
641
|
-
* @param {Object}
|
|
685
|
+
* @param {Object} dicomWebClient The DICOMWebClient instance to be used for series load
|
|
642
686
|
* @param {string} StudyInstanceUID The UID of the Study to be retrieved
|
|
643
|
-
* @param {boolean}
|
|
644
|
-
* @param {
|
|
645
|
-
* @param {
|
|
646
|
-
* @param {
|
|
687
|
+
* @param {boolean} enableStudyLazyLoad Whether the study metadata should be loaded asynchronously.
|
|
688
|
+
* @param {Object} [filters] Object containing filters to be applied on retrieve metadata process
|
|
689
|
+
* @param {string} [filters.seriesInstanceUID] Series instance uid to filter results against
|
|
690
|
+
* @param {array} [filters.SeriesInstanceUIDs] Series instance uids to filter results against
|
|
691
|
+
* @param {function} [sortCriteria] Sort criteria function
|
|
692
|
+
* @param {function} [sortFunction] Sort function
|
|
693
|
+
*
|
|
647
694
|
* @returns {Promise} that will be resolved with the metadata or rejected with the error
|
|
648
695
|
*/
|
|
649
|
-
function retrieveStudyMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction) {
|
|
696
|
+
function retrieveStudyMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction, dicomWebConfig = {}) {
|
|
650
697
|
// @TODO: Whenever a study metadata request has failed, its related promise will be rejected once and for all
|
|
651
698
|
// and further requests for that metadata will always fail. On failure, we probably need to remove the
|
|
652
699
|
// corresponding promise from the "StudyMetaDataPromises" map...
|
|
@@ -657,30 +704,34 @@ function retrieveStudyMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazy
|
|
|
657
704
|
if (!StudyInstanceUID) {
|
|
658
705
|
throw new Error(`${moduleName}: Required 'StudyInstanceUID' parameter not provided.`);
|
|
659
706
|
}
|
|
707
|
+
const promiseId = `${dicomWebConfig.name}:${StudyInstanceUID}`;
|
|
660
708
|
|
|
661
709
|
// Already waiting on result? Return cached promise
|
|
662
|
-
if (StudyMetaDataPromises.has(
|
|
663
|
-
return StudyMetaDataPromises.get(
|
|
710
|
+
if (StudyMetaDataPromises.has(promiseId)) {
|
|
711
|
+
return StudyMetaDataPromises.get(promiseId);
|
|
712
|
+
}
|
|
713
|
+
let promise;
|
|
714
|
+
if (filters && filters.SeriesInstanceUIDs) {
|
|
715
|
+
promise = utils_retrieveMetadataFiltered(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction);
|
|
716
|
+
} else {
|
|
717
|
+
// Create a promise to handle the data retrieval
|
|
718
|
+
promise = new Promise((resolve, reject) => {
|
|
719
|
+
retrieveMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction).then(function (data) {
|
|
720
|
+
resolve(data);
|
|
721
|
+
}, reject);
|
|
722
|
+
});
|
|
664
723
|
}
|
|
665
|
-
|
|
666
|
-
// Create a promise to handle the data retrieval
|
|
667
|
-
const promise = new Promise((resolve, reject) => {
|
|
668
|
-
retrieveMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction).then(function (data) {
|
|
669
|
-
resolve(data);
|
|
670
|
-
}, reject);
|
|
671
|
-
});
|
|
672
724
|
|
|
673
725
|
// Store the promise in cache
|
|
674
|
-
StudyMetaDataPromises.set(
|
|
726
|
+
StudyMetaDataPromises.set(promiseId, promise);
|
|
675
727
|
return promise;
|
|
676
728
|
}
|
|
677
729
|
|
|
678
730
|
/**
|
|
679
731
|
* Delete the cached study metadata retrieval promise to ensure that the browser will
|
|
680
|
-
* re-retrieve the study metadata when it is next requested
|
|
732
|
+
* re-retrieve the study metadata when it is next requested.
|
|
681
733
|
*
|
|
682
734
|
* @param {String} StudyInstanceUID The UID of the Study to be removed from cache
|
|
683
|
-
*
|
|
684
735
|
*/
|
|
685
736
|
function deleteStudyMetadataPromise(StudyInstanceUID) {
|
|
686
737
|
if (StudyMetaDataPromises.has(StudyInstanceUID)) {
|
|
@@ -841,8 +892,7 @@ class StaticWadoClient extends dicomweb_client_es.api.DICOMwebClient {
|
|
|
841
892
|
/** Converts the query parameters to lower case query parameters */
|
|
842
893
|
toLowerParams(queryParams) {
|
|
843
894
|
const lowerParams = {};
|
|
844
|
-
Object.entries(queryParams).forEach(
|
|
845
|
-
let [key, value] = _ref;
|
|
895
|
+
Object.entries(queryParams).forEach(([key, value]) => {
|
|
846
896
|
lowerParams[key.toLowerCase()] = value;
|
|
847
897
|
});
|
|
848
898
|
return lowerParams;
|
|
@@ -1018,14 +1068,17 @@ const metadataProvider = src.classes.MetadataProvider;
|
|
|
1018
1068
|
* @param {bool} lazyLoadStudy - "enableStudyLazyLoad"; Request series meta async instead of blocking
|
|
1019
1069
|
* @param {string|bool} singlepart - indicates of the retrieves can fetch singlepart. Options are bulkdata, video, image or boolean true
|
|
1020
1070
|
*/
|
|
1021
|
-
function createDicomWebApi(dicomWebConfig,
|
|
1071
|
+
function createDicomWebApi(dicomWebConfig, servicesManager) {
|
|
1072
|
+
const {
|
|
1073
|
+
userAuthenticationService,
|
|
1074
|
+
customizationService
|
|
1075
|
+
} = servicesManager.services;
|
|
1022
1076
|
let dicomWebConfigCopy, qidoConfig, wadoConfig, qidoDicomWebClient, wadoDicomWebClient, getAuthrorizationHeader, generateWadoHeader;
|
|
1023
1077
|
const implementation = {
|
|
1024
|
-
initialize:
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
} = _ref;
|
|
1078
|
+
initialize: ({
|
|
1079
|
+
params,
|
|
1080
|
+
query
|
|
1081
|
+
}) => {
|
|
1029
1082
|
if (dicomWebConfig.onConfiguration && typeof dicomWebConfig.onConfiguration === 'function') {
|
|
1030
1083
|
dicomWebConfig = dicomWebConfig.onConfiguration(dicomWebConfig, {
|
|
1031
1084
|
params,
|
|
@@ -1097,11 +1150,10 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1097
1150
|
}
|
|
1098
1151
|
// processResults: processResults.bind(),
|
|
1099
1152
|
},
|
|
1100
|
-
|
|
1101
1153
|
instances: {
|
|
1102
1154
|
search: (studyInstanceUid, queryParameters) => {
|
|
1103
1155
|
qidoDicomWebClient.headers = getAuthrorizationHeader();
|
|
1104
|
-
search.call(undefined, qidoDicomWebClient, studyInstanceUid, null, queryParameters);
|
|
1156
|
+
return search.call(undefined, qidoDicomWebClient, studyInstanceUid, null, queryParameters);
|
|
1105
1157
|
}
|
|
1106
1158
|
}
|
|
1107
1159
|
},
|
|
@@ -1123,11 +1175,10 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1123
1175
|
singlepart: dicomWebConfig.singlepart
|
|
1124
1176
|
}, params);
|
|
1125
1177
|
},
|
|
1126
|
-
bulkDataURI: async
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
} = _ref2;
|
|
1178
|
+
bulkDataURI: async ({
|
|
1179
|
+
StudyInstanceUID,
|
|
1180
|
+
BulkDataURI
|
|
1181
|
+
}) => {
|
|
1131
1182
|
qidoDicomWebClient.headers = getAuthrorizationHeader();
|
|
1132
1183
|
const options = {
|
|
1133
1184
|
multipart: false,
|
|
@@ -1140,14 +1191,13 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1140
1191
|
});
|
|
1141
1192
|
},
|
|
1142
1193
|
series: {
|
|
1143
|
-
metadata: async
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1194
|
+
metadata: async ({
|
|
1195
|
+
StudyInstanceUID,
|
|
1196
|
+
filters,
|
|
1197
|
+
sortCriteria,
|
|
1198
|
+
sortFunction,
|
|
1199
|
+
madeInClient = false
|
|
1200
|
+
} = {}) => {
|
|
1151
1201
|
if (!StudyInstanceUID) {
|
|
1152
1202
|
throw new Error('Unable to query for SeriesMetadata without StudyInstanceUID');
|
|
1153
1203
|
}
|
|
@@ -1159,7 +1209,7 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1159
1209
|
}
|
|
1160
1210
|
},
|
|
1161
1211
|
store: {
|
|
1162
|
-
dicom: async (dataset, request) => {
|
|
1212
|
+
dicom: async (dataset, request, dicomDict) => {
|
|
1163
1213
|
wadoDicomWebClient.headers = getAuthrorizationHeader();
|
|
1164
1214
|
if (dataset instanceof ArrayBuffer) {
|
|
1165
1215
|
const options = {
|
|
@@ -1168,18 +1218,22 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1168
1218
|
};
|
|
1169
1219
|
await wadoDicomWebClient.storeInstances(options);
|
|
1170
1220
|
} else {
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1221
|
+
let effectiveDicomDict = dicomDict;
|
|
1222
|
+
if (!dicomDict) {
|
|
1223
|
+
const meta = {
|
|
1224
|
+
FileMetaInformationVersion: dataset._meta?.FileMetaInformationVersion?.Value,
|
|
1225
|
+
MediaStorageSOPClassUID: dataset.SOPClassUID,
|
|
1226
|
+
MediaStorageSOPInstanceUID: dataset.SOPInstanceUID,
|
|
1227
|
+
TransferSyntaxUID: EXPLICIT_VR_LITTLE_ENDIAN,
|
|
1228
|
+
ImplementationClassUID,
|
|
1229
|
+
ImplementationVersionName
|
|
1230
|
+
};
|
|
1231
|
+
const denaturalized = denaturalizeDataset(meta);
|
|
1232
|
+
const defaultDicomDict = new DicomDict(denaturalized);
|
|
1233
|
+
defaultDicomDict.dict = denaturalizeDataset(dataset);
|
|
1234
|
+
effectiveDicomDict = defaultDicomDict;
|
|
1235
|
+
}
|
|
1236
|
+
const part10Buffer = effectiveDicomDict.write();
|
|
1183
1237
|
const options = {
|
|
1184
1238
|
datasets: [part10Buffer],
|
|
1185
1239
|
request
|
|
@@ -1192,7 +1246,7 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1192
1246
|
const enableStudyLazyLoad = false;
|
|
1193
1247
|
wadoDicomWebClient.headers = generateWadoHeader();
|
|
1194
1248
|
// data is all SOPInstanceUIDs
|
|
1195
|
-
const data = await retrieveStudyMetadata(wadoDicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction);
|
|
1249
|
+
const data = await retrieveStudyMetadata(wadoDicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction, dicomWebConfig);
|
|
1196
1250
|
|
|
1197
1251
|
// first naturalize the data
|
|
1198
1252
|
const naturalizedInstancesMetadata = data.map(naturalizeDataset);
|
|
@@ -1233,16 +1287,16 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1233
1287
|
const seriesMetadata = Object.values(seriesSummaryMetadata);
|
|
1234
1288
|
src.DicomMetadataStore.addSeriesMetadata(seriesMetadata, madeInClient);
|
|
1235
1289
|
Object.keys(instancesPerSeries).forEach(seriesInstanceUID => src.DicomMetadataStore.addInstances(instancesPerSeries[seriesInstanceUID], madeInClient));
|
|
1290
|
+
return seriesSummaryMetadata;
|
|
1236
1291
|
},
|
|
1237
|
-
_retrieveSeriesMetadataAsync: async
|
|
1238
|
-
let madeInClient = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
1292
|
+
_retrieveSeriesMetadataAsync: async (StudyInstanceUID, filters, sortCriteria, sortFunction, madeInClient = false) => {
|
|
1239
1293
|
const enableStudyLazyLoad = true;
|
|
1240
1294
|
wadoDicomWebClient.headers = generateWadoHeader();
|
|
1241
1295
|
// Get Series
|
|
1242
1296
|
const {
|
|
1243
1297
|
preLoadData: seriesSummaryMetadata,
|
|
1244
1298
|
promises: seriesPromises
|
|
1245
|
-
} = await retrieveStudyMetadata(wadoDicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction);
|
|
1299
|
+
} = await retrieveStudyMetadata(wadoDicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction, dicomWebConfig);
|
|
1246
1300
|
|
|
1247
1301
|
/**
|
|
1248
1302
|
* naturalizes the dataset, and adds a retrieve bulkdata method
|
|
@@ -1324,6 +1378,9 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1324
1378
|
}
|
|
1325
1379
|
function setSuccessFlag() {
|
|
1326
1380
|
const study = src.DicomMetadataStore.getStudy(StudyInstanceUID, madeInClient);
|
|
1381
|
+
if (!study) {
|
|
1382
|
+
return;
|
|
1383
|
+
}
|
|
1327
1384
|
study.isLoaded = true;
|
|
1328
1385
|
}
|
|
1329
1386
|
|
|
@@ -1338,6 +1395,7 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1338
1395
|
}));
|
|
1339
1396
|
await Promise.all(seriesDeliveredPromises);
|
|
1340
1397
|
setSuccessFlag();
|
|
1398
|
+
return seriesSummaryMetadata;
|
|
1341
1399
|
},
|
|
1342
1400
|
deleteStudyMetadataPromise: deleteStudyMetadataPromise,
|
|
1343
1401
|
getImageIdsForDisplaySet(displaySet) {
|
|
@@ -1365,11 +1423,10 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1365
1423
|
});
|
|
1366
1424
|
return imageIds;
|
|
1367
1425
|
},
|
|
1368
|
-
getImageIdsForInstance(
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
} = _ref3;
|
|
1426
|
+
getImageIdsForInstance({
|
|
1427
|
+
instance,
|
|
1428
|
+
frame
|
|
1429
|
+
}) {
|
|
1373
1430
|
const imageIds = getImageId({
|
|
1374
1431
|
instance,
|
|
1375
1432
|
frame,
|
|
@@ -1380,11 +1437,10 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1380
1437
|
getConfig() {
|
|
1381
1438
|
return dicomWebConfigCopy;
|
|
1382
1439
|
},
|
|
1383
|
-
getStudyInstanceUIDs(
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
} = _ref4;
|
|
1440
|
+
getStudyInstanceUIDs({
|
|
1441
|
+
params,
|
|
1442
|
+
query
|
|
1443
|
+
}) {
|
|
1388
1444
|
const {
|
|
1389
1445
|
StudyInstanceUIDs: paramsStudyInstanceUIDs
|
|
1390
1446
|
} = params;
|
|
@@ -1423,7 +1479,20 @@ let _store = {
|
|
|
1423
1479
|
// }
|
|
1424
1480
|
// }
|
|
1425
1481
|
};
|
|
1426
|
-
|
|
1482
|
+
function wrapSequences(obj) {
|
|
1483
|
+
return Object.keys(obj).reduce((acc, key) => {
|
|
1484
|
+
if (typeof obj[key] === 'object' && obj[key] !== null) {
|
|
1485
|
+
// Recursively wrap sequences for nested objects
|
|
1486
|
+
acc[key] = wrapSequences(obj[key]);
|
|
1487
|
+
} else {
|
|
1488
|
+
acc[key] = obj[key];
|
|
1489
|
+
}
|
|
1490
|
+
if (key.endsWith('Sequence')) {
|
|
1491
|
+
acc[key] = src["default"].utils.addAccessors(acc[key]);
|
|
1492
|
+
}
|
|
1493
|
+
return acc;
|
|
1494
|
+
}, Array.isArray(obj) ? [] : {});
|
|
1495
|
+
}
|
|
1427
1496
|
const getMetaDataByURL = url => {
|
|
1428
1497
|
return _store.urls.find(metaData => metaData.url === url);
|
|
1429
1498
|
};
|
|
@@ -1443,11 +1512,10 @@ function createDicomJSONApi(dicomJsonConfig) {
|
|
|
1443
1512
|
wadoRoot
|
|
1444
1513
|
} = dicomJsonConfig;
|
|
1445
1514
|
const implementation = {
|
|
1446
|
-
initialize: async
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
} = _ref;
|
|
1515
|
+
initialize: async ({
|
|
1516
|
+
query,
|
|
1517
|
+
url
|
|
1518
|
+
}) => {
|
|
1451
1519
|
if (!url) {
|
|
1452
1520
|
url = query.get('url');
|
|
1453
1521
|
}
|
|
@@ -1548,12 +1616,11 @@ function createDicomJSONApi(dicomJsonConfig) {
|
|
|
1548
1616
|
return utils_getDirectURL(wadoRoot, params);
|
|
1549
1617
|
},
|
|
1550
1618
|
series: {
|
|
1551
|
-
metadata: async
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1619
|
+
metadata: async ({
|
|
1620
|
+
StudyInstanceUID,
|
|
1621
|
+
madeInClient = false,
|
|
1622
|
+
customSort
|
|
1623
|
+
} = {}) => {
|
|
1557
1624
|
if (!StudyInstanceUID) {
|
|
1558
1625
|
throw new Error('Unable to query for SeriesMetadata without StudyInstanceUID');
|
|
1559
1626
|
}
|
|
@@ -1585,8 +1652,13 @@ function createDicomJSONApi(dicomJsonConfig) {
|
|
|
1585
1652
|
const numberOfSeries = series.length;
|
|
1586
1653
|
series.forEach((series, index) => {
|
|
1587
1654
|
const instances = series.instances.map(instance => {
|
|
1655
|
+
// for instance.metadata if the key ends with sequence then
|
|
1656
|
+
// we need to add a proxy to the first item in the sequence
|
|
1657
|
+
// so that we can access the value of the sequence
|
|
1658
|
+
// by using sequenceName.value
|
|
1659
|
+
const modifiedMetadata = wrapSequences(instance.metadata);
|
|
1588
1660
|
const obj = {
|
|
1589
|
-
...
|
|
1661
|
+
...modifiedMetadata,
|
|
1590
1662
|
url: instance.url,
|
|
1591
1663
|
imageId: instance.url,
|
|
1592
1664
|
...series,
|
|
@@ -1636,22 +1708,20 @@ function createDicomJSONApi(dicomJsonConfig) {
|
|
|
1636
1708
|
});
|
|
1637
1709
|
return imageIds;
|
|
1638
1710
|
},
|
|
1639
|
-
getImageIdsForInstance(
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
} = _ref2;
|
|
1711
|
+
getImageIdsForInstance({
|
|
1712
|
+
instance,
|
|
1713
|
+
frame
|
|
1714
|
+
}) {
|
|
1644
1715
|
const imageIds = getImageId({
|
|
1645
1716
|
instance,
|
|
1646
1717
|
frame
|
|
1647
1718
|
});
|
|
1648
1719
|
return imageIds;
|
|
1649
1720
|
},
|
|
1650
|
-
getStudyInstanceUIDs:
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
} = _ref3;
|
|
1721
|
+
getStudyInstanceUIDs: ({
|
|
1722
|
+
params,
|
|
1723
|
+
query
|
|
1724
|
+
}) => {
|
|
1655
1725
|
const url = query.get('url');
|
|
1656
1726
|
return _store.studyInstanceUIDMap.get(url);
|
|
1657
1727
|
}
|
|
@@ -1672,8 +1742,7 @@ const END_MODALITIES = {
|
|
|
1672
1742
|
SEG: true,
|
|
1673
1743
|
DOC: true
|
|
1674
1744
|
};
|
|
1675
|
-
const compareValue =
|
|
1676
|
-
let def = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1745
|
+
const compareValue = (v1, v2, def = 0) => {
|
|
1677
1746
|
if (v1 === v2) {
|
|
1678
1747
|
return def;
|
|
1679
1748
|
}
|
|
@@ -1705,12 +1774,10 @@ function createDicomLocalApi(dicomLocalConfig) {
|
|
|
1705
1774
|
name
|
|
1706
1775
|
} = dicomLocalConfig;
|
|
1707
1776
|
const implementation = {
|
|
1708
|
-
initialize:
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
} = _ref;
|
|
1713
|
-
},
|
|
1777
|
+
initialize: ({
|
|
1778
|
+
params,
|
|
1779
|
+
query
|
|
1780
|
+
}) => {},
|
|
1714
1781
|
query: {
|
|
1715
1782
|
studies: {
|
|
1716
1783
|
mapParams: () => {},
|
|
@@ -1789,11 +1856,10 @@ function createDicomLocalApi(dicomLocalConfig) {
|
|
|
1789
1856
|
}
|
|
1790
1857
|
},
|
|
1791
1858
|
series: {
|
|
1792
|
-
metadata: async
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1859
|
+
metadata: async ({
|
|
1860
|
+
StudyInstanceUID,
|
|
1861
|
+
madeInClient = false
|
|
1862
|
+
} = {}) => {
|
|
1797
1863
|
if (!StudyInstanceUID) {
|
|
1798
1864
|
throw new Error('Unable to query for SeriesMetadata without StudyInstanceUID');
|
|
1799
1865
|
}
|
|
@@ -1872,11 +1938,10 @@ function createDicomLocalApi(dicomLocalConfig) {
|
|
|
1872
1938
|
});
|
|
1873
1939
|
return imageIds;
|
|
1874
1940
|
},
|
|
1875
|
-
getImageIdsForInstance(
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
} = _ref2;
|
|
1941
|
+
getImageIdsForInstance({
|
|
1942
|
+
instance,
|
|
1943
|
+
frame
|
|
1944
|
+
}) {
|
|
1880
1945
|
const {
|
|
1881
1946
|
StudyInstanceUID,
|
|
1882
1947
|
SeriesInstanceUID,
|
|
@@ -1892,11 +1957,10 @@ function createDicomLocalApi(dicomLocalConfig) {
|
|
|
1892
1957
|
deleteStudyMetadataPromise() {
|
|
1893
1958
|
console.log('deleteStudyMetadataPromise not implemented');
|
|
1894
1959
|
},
|
|
1895
|
-
getStudyInstanceUIDs:
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
} = _ref3;
|
|
1960
|
+
getStudyInstanceUIDs: ({
|
|
1961
|
+
params,
|
|
1962
|
+
query
|
|
1963
|
+
}) => {
|
|
1900
1964
|
const {
|
|
1901
1965
|
StudyInstanceUIDs: paramsStudyInstanceUIDs
|
|
1902
1966
|
} = params;
|
|
@@ -1931,17 +1995,16 @@ function createDicomLocalApi(dicomLocalConfig) {
|
|
|
1931
1995
|
* dicomWeb configuration array
|
|
1932
1996
|
*
|
|
1933
1997
|
*/
|
|
1934
|
-
function createDicomWebProxyApi(dicomWebProxyConfig,
|
|
1998
|
+
function createDicomWebProxyApi(dicomWebProxyConfig, servicesManager) {
|
|
1935
1999
|
const {
|
|
1936
2000
|
name
|
|
1937
2001
|
} = dicomWebProxyConfig;
|
|
1938
2002
|
let dicomWebDelegate = undefined;
|
|
1939
2003
|
const implementation = {
|
|
1940
|
-
initialize: async
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
} = _ref;
|
|
2004
|
+
initialize: async ({
|
|
2005
|
+
params,
|
|
2006
|
+
query
|
|
2007
|
+
}) => {
|
|
1945
2008
|
const url = query.get('url');
|
|
1946
2009
|
if (!url) {
|
|
1947
2010
|
throw new Error(`No url for '${name}'`);
|
|
@@ -1951,7 +2014,7 @@ function createDicomWebProxyApi(dicomWebProxyConfig, UserAuthenticationService)
|
|
|
1951
2014
|
if (!data.servers?.dicomWeb?.[0]) {
|
|
1952
2015
|
throw new Error('Invalid configuration returned by url');
|
|
1953
2016
|
}
|
|
1954
|
-
dicomWebDelegate = createDicomWebApi(data.servers.dicomWeb[0].configuration,
|
|
2017
|
+
dicomWebDelegate = createDicomWebApi(data.servers.dicomWeb[0].configuration, servicesManager);
|
|
1955
2018
|
dicomWebDelegate.initialize({
|
|
1956
2019
|
params,
|
|
1957
2020
|
query
|
|
@@ -1963,43 +2026,28 @@ function createDicomWebProxyApi(dicomWebProxyConfig, UserAuthenticationService)
|
|
|
1963
2026
|
search: params => dicomWebDelegate.query.studies.search(params)
|
|
1964
2027
|
},
|
|
1965
2028
|
series: {
|
|
1966
|
-
search:
|
|
1967
|
-
return dicomWebDelegate.query.series.search(...arguments);
|
|
1968
|
-
}
|
|
2029
|
+
search: (...args) => dicomWebDelegate.query.series.search(...args)
|
|
1969
2030
|
},
|
|
1970
2031
|
instances: {
|
|
1971
2032
|
search: (studyInstanceUid, queryParameters) => dicomWebDelegate.query.instances.search(studyInstanceUid, queryParameters)
|
|
1972
2033
|
}
|
|
1973
2034
|
},
|
|
1974
2035
|
retrieve: {
|
|
1975
|
-
directURL:
|
|
1976
|
-
return dicomWebDelegate.retrieve.directURL(...arguments);
|
|
1977
|
-
},
|
|
2036
|
+
directURL: (...args) => dicomWebDelegate.retrieve.directURL(...args),
|
|
1978
2037
|
series: {
|
|
1979
|
-
metadata: async
|
|
1980
|
-
return dicomWebDelegate.retrieve.series.metadata(...arguments);
|
|
1981
|
-
}
|
|
2038
|
+
metadata: async (...args) => dicomWebDelegate.retrieve.series.metadata(...args)
|
|
1982
2039
|
}
|
|
1983
2040
|
},
|
|
1984
2041
|
store: {
|
|
1985
|
-
dicom:
|
|
1986
|
-
return dicomWebDelegate.store(...arguments);
|
|
1987
|
-
}
|
|
1988
|
-
},
|
|
1989
|
-
deleteStudyMetadataPromise: function () {
|
|
1990
|
-
return dicomWebDelegate.deleteStudyMetadataPromise(...arguments);
|
|
2042
|
+
dicom: (...args) => dicomWebDelegate.store(...args)
|
|
1991
2043
|
},
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
let {
|
|
2000
|
-
params,
|
|
2001
|
-
query
|
|
2002
|
-
} = _ref2;
|
|
2044
|
+
deleteStudyMetadataPromise: (...args) => dicomWebDelegate.deleteStudyMetadataPromise(...args),
|
|
2045
|
+
getImageIdsForDisplaySet: (...args) => dicomWebDelegate.getImageIdsForDisplaySet(...args),
|
|
2046
|
+
getImageIdsForInstance: (...args) => dicomWebDelegate.getImageIdsForInstance(...args),
|
|
2047
|
+
getStudyInstanceUIDs({
|
|
2048
|
+
params,
|
|
2049
|
+
query
|
|
2050
|
+
}) {
|
|
2003
2051
|
let studyInstanceUIDs = [];
|
|
2004
2052
|
|
|
2005
2053
|
// there seem to be a couple of variations of the case for this parameter
|
|
@@ -2014,6 +2062,244 @@ function createDicomWebProxyApi(dicomWebProxyConfig, UserAuthenticationService)
|
|
|
2014
2062
|
return src/* IWebApiDataSource */.Is.create(implementation);
|
|
2015
2063
|
}
|
|
2016
2064
|
|
|
2065
|
+
// EXTERNAL MODULE: ../../../node_modules/lodash/lodash.js
|
|
2066
|
+
var lodash = __webpack_require__(44379);
|
|
2067
|
+
;// CONCATENATED MODULE: ../../../extensions/default/src/MergeDataSource/index.ts
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
const mergeMap = {
|
|
2071
|
+
'query.studies.search': {
|
|
2072
|
+
mergeKey: 'studyInstanceUid',
|
|
2073
|
+
tagFunc: x => x
|
|
2074
|
+
},
|
|
2075
|
+
'query.series.search': {
|
|
2076
|
+
mergeKey: 'seriesInstanceUid',
|
|
2077
|
+
tagFunc: (series, sourceName) => {
|
|
2078
|
+
series.forEach(series => {
|
|
2079
|
+
series.RetrieveAETitle = sourceName;
|
|
2080
|
+
src.DicomMetadataStore.updateSeriesMetadata(series);
|
|
2081
|
+
});
|
|
2082
|
+
return series;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
};
|
|
2086
|
+
|
|
2087
|
+
/**
|
|
2088
|
+
* Calls all data sources asynchronously and merges the results.
|
|
2089
|
+
* @param {CallForAllDataSourcesAsyncOptions} options - The options for calling all data sources.
|
|
2090
|
+
* @param {string} options.path - The path to the function to be called on each data source.
|
|
2091
|
+
* @param {unknown[]} options.args - The arguments to be passed to the function.
|
|
2092
|
+
* @param {ExtensionManager} options.extensionManager - The extension manager.
|
|
2093
|
+
* @param {string[]} options.dataSourceNames - The names of the data sources to be called.
|
|
2094
|
+
* @returns {Promise<unknown[]>} - A promise that resolves to the merged data from all data sources.
|
|
2095
|
+
*/
|
|
2096
|
+
const callForAllDataSourcesAsync = async ({
|
|
2097
|
+
mergeMap,
|
|
2098
|
+
path,
|
|
2099
|
+
args,
|
|
2100
|
+
extensionManager,
|
|
2101
|
+
dataSourceNames
|
|
2102
|
+
}) => {
|
|
2103
|
+
const {
|
|
2104
|
+
mergeKey,
|
|
2105
|
+
tagFunc
|
|
2106
|
+
} = mergeMap[path] || {
|
|
2107
|
+
tagFunc: x => x
|
|
2108
|
+
};
|
|
2109
|
+
const dataSourceDefs = Object.values(extensionManager.dataSourceDefs);
|
|
2110
|
+
const promises = [];
|
|
2111
|
+
const mergedData = [];
|
|
2112
|
+
for (const dataSourceDef of dataSourceDefs) {
|
|
2113
|
+
const {
|
|
2114
|
+
configuration,
|
|
2115
|
+
sourceName
|
|
2116
|
+
} = dataSourceDef;
|
|
2117
|
+
if (!!configuration && dataSourceNames.includes(sourceName)) {
|
|
2118
|
+
const [dataSource] = extensionManager.getDataSources(sourceName);
|
|
2119
|
+
const func = (0,lodash.get)(dataSource, path);
|
|
2120
|
+
const promise = func.apply(dataSource, args);
|
|
2121
|
+
promises.push(promise.then(data => mergedData.push(tagFunc(data, sourceName))));
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
await Promise.allSettled(promises);
|
|
2125
|
+
return (0,lodash.uniqBy)(mergedData.flat(), obj => obj[mergeKey]);
|
|
2126
|
+
};
|
|
2127
|
+
|
|
2128
|
+
/**
|
|
2129
|
+
* Calls all data sources that match the provided names and merges their data.
|
|
2130
|
+
* @param options - The options for calling all data sources.
|
|
2131
|
+
* @param options.path - The path to the function to be called on each data source.
|
|
2132
|
+
* @param options.args - The arguments to be passed to the function.
|
|
2133
|
+
* @param options.extensionManager - The extension manager instance.
|
|
2134
|
+
* @param options.dataSourceNames - The names of the data sources to be called.
|
|
2135
|
+
* @returns The merged data from all the matching data sources.
|
|
2136
|
+
*/
|
|
2137
|
+
const callForAllDataSources = ({
|
|
2138
|
+
path,
|
|
2139
|
+
args,
|
|
2140
|
+
extensionManager,
|
|
2141
|
+
dataSourceNames
|
|
2142
|
+
}) => {
|
|
2143
|
+
const dataSourceDefs = Object.values(extensionManager.dataSourceDefs);
|
|
2144
|
+
const mergedData = [];
|
|
2145
|
+
for (const dataSourceDef of dataSourceDefs) {
|
|
2146
|
+
const {
|
|
2147
|
+
configuration,
|
|
2148
|
+
sourceName
|
|
2149
|
+
} = dataSourceDef;
|
|
2150
|
+
if (!!configuration && dataSourceNames.includes(sourceName)) {
|
|
2151
|
+
const [dataSource] = extensionManager.getDataSources(sourceName);
|
|
2152
|
+
const func = (0,lodash.get)(dataSource, path);
|
|
2153
|
+
const data = func.apply(dataSource, args);
|
|
2154
|
+
mergedData.push(data);
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
return mergedData.flat();
|
|
2158
|
+
};
|
|
2159
|
+
|
|
2160
|
+
/**
|
|
2161
|
+
* Calls the default data source function specified by the given path with the provided arguments.
|
|
2162
|
+
* @param {CallForDefaultDataSourceOptions} options - The options for calling the default data source.
|
|
2163
|
+
* @param {string} options.path - The path to the function within the default data source.
|
|
2164
|
+
* @param {unknown[]} options.args - The arguments to pass to the function.
|
|
2165
|
+
* @param {string} options.defaultDataSourceName - The name of the default data source.
|
|
2166
|
+
* @param {ExtensionManager} options.extensionManager - The extension manager instance.
|
|
2167
|
+
* @returns {unknown} - The result of calling the default data source function.
|
|
2168
|
+
*/
|
|
2169
|
+
const callForDefaultDataSource = ({
|
|
2170
|
+
path,
|
|
2171
|
+
args,
|
|
2172
|
+
defaultDataSourceName,
|
|
2173
|
+
extensionManager
|
|
2174
|
+
}) => {
|
|
2175
|
+
const [dataSource] = extensionManager.getDataSources(defaultDataSourceName);
|
|
2176
|
+
const func = (0,lodash.get)(dataSource, path);
|
|
2177
|
+
return func.apply(dataSource, args);
|
|
2178
|
+
};
|
|
2179
|
+
|
|
2180
|
+
/**
|
|
2181
|
+
* Calls the data source specified by the RetrieveAETitle of the given display set.
|
|
2182
|
+
* @typedef {Object} CallByRetrieveAETitleOptions
|
|
2183
|
+
* @property {string} path - The path of the method to call on the data source.
|
|
2184
|
+
* @property {unknown[]} args - The arguments to pass to the method.
|
|
2185
|
+
* @property {string} defaultDataSourceName - The name of the default data source.
|
|
2186
|
+
* @property {ExtensionManager} extensionManager - The extension manager.
|
|
2187
|
+
*/
|
|
2188
|
+
const callByRetrieveAETitle = ({
|
|
2189
|
+
path,
|
|
2190
|
+
args,
|
|
2191
|
+
defaultDataSourceName,
|
|
2192
|
+
extensionManager
|
|
2193
|
+
}) => {
|
|
2194
|
+
const [displaySet] = args;
|
|
2195
|
+
const seriesMetadata = src.DicomMetadataStore.getSeries(displaySet.StudyInstanceUID, displaySet.SeriesInstanceUID);
|
|
2196
|
+
const [dataSource] = extensionManager.getDataSources(seriesMetadata.RetrieveAETitle || defaultDataSourceName);
|
|
2197
|
+
return dataSource[path](...args);
|
|
2198
|
+
};
|
|
2199
|
+
function createMergeDataSourceApi(mergeConfig, servicesManager, extensionManager) {
|
|
2200
|
+
const {
|
|
2201
|
+
seriesMerge
|
|
2202
|
+
} = mergeConfig;
|
|
2203
|
+
const {
|
|
2204
|
+
dataSourceNames,
|
|
2205
|
+
defaultDataSourceName
|
|
2206
|
+
} = seriesMerge;
|
|
2207
|
+
const implementation = {
|
|
2208
|
+
initialize: (...args) => callForAllDataSources({
|
|
2209
|
+
path: 'initialize',
|
|
2210
|
+
args,
|
|
2211
|
+
extensionManager,
|
|
2212
|
+
dataSourceNames
|
|
2213
|
+
}),
|
|
2214
|
+
query: {
|
|
2215
|
+
studies: {
|
|
2216
|
+
search: (...args) => callForAllDataSourcesAsync({
|
|
2217
|
+
mergeMap,
|
|
2218
|
+
path: 'query.studies.search',
|
|
2219
|
+
args,
|
|
2220
|
+
extensionManager,
|
|
2221
|
+
dataSourceNames
|
|
2222
|
+
})
|
|
2223
|
+
},
|
|
2224
|
+
series: {
|
|
2225
|
+
search: (...args) => callForAllDataSourcesAsync({
|
|
2226
|
+
mergeMap,
|
|
2227
|
+
path: 'query.series.search',
|
|
2228
|
+
args,
|
|
2229
|
+
extensionManager,
|
|
2230
|
+
dataSourceNames
|
|
2231
|
+
})
|
|
2232
|
+
},
|
|
2233
|
+
instances: {
|
|
2234
|
+
search: (...args) => callForAllDataSourcesAsync({
|
|
2235
|
+
mergeMap,
|
|
2236
|
+
path: 'query.instances.search',
|
|
2237
|
+
args,
|
|
2238
|
+
extensionManager,
|
|
2239
|
+
dataSourceNames
|
|
2240
|
+
})
|
|
2241
|
+
}
|
|
2242
|
+
},
|
|
2243
|
+
retrieve: {
|
|
2244
|
+
bulkDataURI: (...args) => callForAllDataSourcesAsync({
|
|
2245
|
+
mergeMap,
|
|
2246
|
+
path: 'retrieve.bulkDataURI',
|
|
2247
|
+
args,
|
|
2248
|
+
extensionManager,
|
|
2249
|
+
dataSourceNames
|
|
2250
|
+
}),
|
|
2251
|
+
directURL: (...args) => callForDefaultDataSource({
|
|
2252
|
+
path: 'retrieve.directURL',
|
|
2253
|
+
args,
|
|
2254
|
+
defaultDataSourceName,
|
|
2255
|
+
extensionManager
|
|
2256
|
+
}),
|
|
2257
|
+
series: {
|
|
2258
|
+
metadata: (...args) => callForAllDataSourcesAsync({
|
|
2259
|
+
mergeMap,
|
|
2260
|
+
path: 'retrieve.series.metadata',
|
|
2261
|
+
args,
|
|
2262
|
+
extensionManager,
|
|
2263
|
+
dataSourceNames
|
|
2264
|
+
})
|
|
2265
|
+
}
|
|
2266
|
+
},
|
|
2267
|
+
store: {
|
|
2268
|
+
dicom: (...args) => callForDefaultDataSource({
|
|
2269
|
+
path: 'store.dicom',
|
|
2270
|
+
args,
|
|
2271
|
+
defaultDataSourceName,
|
|
2272
|
+
extensionManager
|
|
2273
|
+
})
|
|
2274
|
+
},
|
|
2275
|
+
deleteStudyMetadataPromise: (...args) => callForAllDataSources({
|
|
2276
|
+
path: 'deleteStudyMetadataPromise',
|
|
2277
|
+
args,
|
|
2278
|
+
extensionManager,
|
|
2279
|
+
dataSourceNames
|
|
2280
|
+
}),
|
|
2281
|
+
getImageIdsForDisplaySet: (...args) => callByRetrieveAETitle({
|
|
2282
|
+
path: 'getImageIdsForDisplaySet',
|
|
2283
|
+
args,
|
|
2284
|
+
defaultDataSourceName,
|
|
2285
|
+
extensionManager
|
|
2286
|
+
}),
|
|
2287
|
+
getImageIdsForInstance: (...args) => callByRetrieveAETitle({
|
|
2288
|
+
path: 'getImageIdsForDisplaySet',
|
|
2289
|
+
args,
|
|
2290
|
+
defaultDataSourceName,
|
|
2291
|
+
extensionManager
|
|
2292
|
+
}),
|
|
2293
|
+
getStudyInstanceUIDs: (...args) => callForAllDataSources({
|
|
2294
|
+
path: 'getStudyInstanceUIDs',
|
|
2295
|
+
args,
|
|
2296
|
+
extensionManager,
|
|
2297
|
+
dataSourceNames
|
|
2298
|
+
})
|
|
2299
|
+
};
|
|
2300
|
+
return src/* IWebApiDataSource */.Is.create(implementation);
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2017
2303
|
;// CONCATENATED MODULE: ../../../extensions/default/src/getDataSourcesModule.js
|
|
2018
2304
|
// TODO: Pull in IWebClientApi from @ohif/core
|
|
2019
2305
|
// TODO: Use constructor to create an instance of IWebClientApi
|
|
@@ -2024,6 +2310,7 @@ function createDicomWebProxyApi(dicomWebProxyConfig, UserAuthenticationService)
|
|
|
2024
2310
|
|
|
2025
2311
|
|
|
2026
2312
|
|
|
2313
|
+
|
|
2027
2314
|
/**
|
|
2028
2315
|
*
|
|
2029
2316
|
*/
|
|
@@ -2044,6 +2331,10 @@ function getDataSourcesModule() {
|
|
|
2044
2331
|
name: 'dicomlocal',
|
|
2045
2332
|
type: 'localApi',
|
|
2046
2333
|
createDataSource: createDicomLocalApi
|
|
2334
|
+
}, {
|
|
2335
|
+
name: 'merge',
|
|
2336
|
+
type: 'mergeApi',
|
|
2337
|
+
createDataSource: createMergeDataSourceApi
|
|
2047
2338
|
}];
|
|
2048
2339
|
}
|
|
2049
2340
|
/* harmony default export */ const src_getDataSourcesModule = (getDataSourcesModule);
|
|
@@ -2052,8 +2343,8 @@ var react = __webpack_require__(43001);
|
|
|
2052
2343
|
// EXTERNAL MODULE: ../../../node_modules/prop-types/index.js
|
|
2053
2344
|
var prop_types = __webpack_require__(3827);
|
|
2054
2345
|
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
2055
|
-
// EXTERNAL MODULE: ../../ui/src/index.js +
|
|
2056
|
-
var ui_src = __webpack_require__(
|
|
2346
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 486 modules
|
|
2347
|
+
var ui_src = __webpack_require__(22582);
|
|
2057
2348
|
// EXTERNAL MODULE: ./state/index.js + 1 modules
|
|
2058
2349
|
var state = __webpack_require__(62657);
|
|
2059
2350
|
// EXTERNAL MODULE: ../node_modules/react-router-dom/dist/index.js
|
|
@@ -2062,8 +2353,8 @@ var dist = __webpack_require__(62474);
|
|
|
2062
2353
|
var es = __webpack_require__(69190);
|
|
2063
2354
|
// EXTERNAL MODULE: ../node_modules/react-router/dist/index.js
|
|
2064
2355
|
var react_router_dist = __webpack_require__(85066);
|
|
2065
|
-
// EXTERNAL MODULE: ../../i18n/src/index.js +
|
|
2066
|
-
var i18n_src = __webpack_require__(
|
|
2356
|
+
// EXTERNAL MODULE: ../../i18n/src/index.js + 148 modules
|
|
2357
|
+
var i18n_src = __webpack_require__(68311);
|
|
2067
2358
|
// EXTERNAL MODULE: ../../../node_modules/classnames/index.js
|
|
2068
2359
|
var classnames = __webpack_require__(44921);
|
|
2069
2360
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
@@ -2071,22 +2362,28 @@ var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
2071
2362
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2072
2363
|
|
|
2073
2364
|
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2365
|
+
|
|
2366
|
+
function Toolbar({
|
|
2367
|
+
servicesManager
|
|
2368
|
+
}) {
|
|
2078
2369
|
const {
|
|
2079
2370
|
toolbarService
|
|
2080
2371
|
} = servicesManager.services;
|
|
2372
|
+
const [viewportGrid, viewportGridService] = (0,ui_src/* useViewportGrid */.O_)();
|
|
2081
2373
|
const [toolbarButtons, setToolbarButtons] = (0,react.useState)([]);
|
|
2082
2374
|
(0,react.useEffect)(() => {
|
|
2375
|
+
const updateToolbar = () => {
|
|
2376
|
+
const toolGroupId = viewportGridService.getActiveViewportOptionByKey('toolGroupId') ?? 'default';
|
|
2377
|
+
setToolbarButtons(toolbarService.getButtonSection(toolGroupId));
|
|
2378
|
+
};
|
|
2083
2379
|
const {
|
|
2084
2380
|
unsubscribe
|
|
2085
|
-
} = toolbarService.subscribe(toolbarService.EVENTS.TOOL_BAR_MODIFIED,
|
|
2381
|
+
} = toolbarService.subscribe(toolbarService.EVENTS.TOOL_BAR_MODIFIED, updateToolbar);
|
|
2382
|
+
updateToolbar();
|
|
2086
2383
|
return () => {
|
|
2087
2384
|
unsubscribe();
|
|
2088
2385
|
};
|
|
2089
|
-
}, [toolbarService]);
|
|
2386
|
+
}, [toolbarService, viewportGrid]);
|
|
2090
2387
|
const onInteraction = (0,react.useCallback)(args => toolbarService.recordInteraction(args), [toolbarService]);
|
|
2091
2388
|
return /*#__PURE__*/react.createElement(react.Fragment, null, toolbarButtons.map(toolDef => {
|
|
2092
2389
|
const {
|
|
@@ -2125,12 +2422,11 @@ const {
|
|
|
2125
2422
|
defaultLanguage,
|
|
2126
2423
|
currentLanguage
|
|
2127
2424
|
} = i18n_src["default"];
|
|
2128
|
-
function ViewerHeader(
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
} = _ref;
|
|
2425
|
+
function ViewerHeader({
|
|
2426
|
+
hotkeysManager,
|
|
2427
|
+
extensionManager,
|
|
2428
|
+
servicesManager
|
|
2429
|
+
}) {
|
|
2134
2430
|
const [appConfig] = (0,state/* useAppConfig */.M)();
|
|
2135
2431
|
const navigate = (0,dist/* useNavigate */.s0)();
|
|
2136
2432
|
const location = (0,react_router_dist/* useLocation */.TH)();
|
|
@@ -2166,14 +2462,14 @@ function ViewerHeader(_ref) {
|
|
|
2166
2462
|
hotkeyDefinitions,
|
|
2167
2463
|
hotkeyDefaults
|
|
2168
2464
|
} = hotkeysManager;
|
|
2169
|
-
const versionNumber = "3.8.0-beta.
|
|
2170
|
-
const commitHash = "
|
|
2465
|
+
const versionNumber = "3.8.0-beta.31";
|
|
2466
|
+
const commitHash = "9c6e1cd305c334f8e3a2d3d9ac6fb4bba1d34c67";
|
|
2171
2467
|
const menuOptions = [{
|
|
2172
2468
|
title: t('Header:About'),
|
|
2173
2469
|
icon: 'info',
|
|
2174
2470
|
onClick: () => show({
|
|
2175
2471
|
content: ui_src/* AboutModal */.tk,
|
|
2176
|
-
title: 'About OHIF Viewer',
|
|
2472
|
+
title: t('AboutModal:About OHIF Viewer'),
|
|
2177
2473
|
contentProps: {
|
|
2178
2474
|
versionNumber,
|
|
2179
2475
|
commitHash
|
|
@@ -2183,7 +2479,7 @@ function ViewerHeader(_ref) {
|
|
|
2183
2479
|
title: t('Header:Preferences'),
|
|
2184
2480
|
icon: 'settings',
|
|
2185
2481
|
onClick: () => show({
|
|
2186
|
-
title: t('UserPreferencesModal:User
|
|
2482
|
+
title: t('UserPreferencesModal:User preferences'),
|
|
2187
2483
|
content: ui_src/* UserPreferences */.i1,
|
|
2188
2484
|
contentProps: {
|
|
2189
2485
|
hotkeyDefaults: hotkeysManager.getValidHotkeyDefinitions(hotkeyDefaults),
|
|
@@ -2196,11 +2492,10 @@ function ViewerHeader(_ref) {
|
|
|
2196
2492
|
src/* hotkeys */.dD.unpause();
|
|
2197
2493
|
hide();
|
|
2198
2494
|
},
|
|
2199
|
-
onSubmit:
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
} = _ref2;
|
|
2495
|
+
onSubmit: ({
|
|
2496
|
+
hotkeyDefinitions,
|
|
2497
|
+
language
|
|
2498
|
+
}) => {
|
|
2204
2499
|
if (language.value !== currentLanguage().value) {
|
|
2205
2500
|
i18n_src["default"].changeLanguage(language.value);
|
|
2206
2501
|
}
|
|
@@ -2238,14 +2533,13 @@ function ViewerHeader(_ref) {
|
|
|
2238
2533
|
;// CONCATENATED MODULE: ../../../extensions/default/src/Components/SidePanelWithServices.tsx
|
|
2239
2534
|
|
|
2240
2535
|
|
|
2241
|
-
const SidePanelWithServices =
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
} = _ref;
|
|
2536
|
+
const SidePanelWithServices = ({
|
|
2537
|
+
servicesManager,
|
|
2538
|
+
side,
|
|
2539
|
+
className,
|
|
2540
|
+
activeTabIndex: activeTabIndexProp,
|
|
2541
|
+
tabs
|
|
2542
|
+
}) => {
|
|
2249
2543
|
const panelService = servicesManager?.services?.panelService;
|
|
2250
2544
|
|
|
2251
2545
|
// Tracks whether this SidePanel has been opened at least once since this SidePanel was inserted into the DOM.
|
|
@@ -2286,21 +2580,20 @@ const SidePanelWithServices = _ref => {
|
|
|
2286
2580
|
|
|
2287
2581
|
|
|
2288
2582
|
|
|
2289
|
-
function ViewerLayout(
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
} = _ref;
|
|
2583
|
+
function ViewerLayout({
|
|
2584
|
+
// From Extension Module Params
|
|
2585
|
+
extensionManager,
|
|
2586
|
+
servicesManager,
|
|
2587
|
+
hotkeysManager,
|
|
2588
|
+
commandsManager,
|
|
2589
|
+
// From Modes
|
|
2590
|
+
viewports,
|
|
2591
|
+
ViewportGridComp,
|
|
2592
|
+
leftPanels = [],
|
|
2593
|
+
rightPanels = [],
|
|
2594
|
+
leftPanelDefaultClosed = false,
|
|
2595
|
+
rightPanelDefaultClosed = false
|
|
2596
|
+
}) {
|
|
2304
2597
|
const [appConfig] = (0,state/* useAppConfig */.M)();
|
|
2305
2598
|
const {
|
|
2306
2599
|
hangingProtocolService
|
|
@@ -2438,13 +2731,12 @@ ViewerLayout.propTypes = {
|
|
|
2438
2731
|
- Init layout based on the displaySets and the objects.
|
|
2439
2732
|
*/
|
|
2440
2733
|
|
|
2441
|
-
/* harmony default export */ function getLayoutTemplateModule(
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
} = _ref;
|
|
2734
|
+
/* harmony default export */ function getLayoutTemplateModule({
|
|
2735
|
+
servicesManager,
|
|
2736
|
+
extensionManager,
|
|
2737
|
+
commandsManager,
|
|
2738
|
+
hotkeysManager
|
|
2739
|
+
}) {
|
|
2448
2740
|
function ViewerLayoutWithServices(props) {
|
|
2449
2741
|
return src_ViewerLayout({
|
|
2450
2742
|
servicesManager,
|
|
@@ -2478,14 +2770,13 @@ const {
|
|
|
2478
2770
|
*
|
|
2479
2771
|
* @param {*} param0
|
|
2480
2772
|
*/
|
|
2481
|
-
function PanelStudyBrowser(
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
} = _ref;
|
|
2773
|
+
function PanelStudyBrowser({
|
|
2774
|
+
servicesManager,
|
|
2775
|
+
getImageSrc,
|
|
2776
|
+
getStudiesForPatientByMRN,
|
|
2777
|
+
requestDisplaySetCreationForStudy,
|
|
2778
|
+
dataSource
|
|
2779
|
+
}) {
|
|
2489
2780
|
const {
|
|
2490
2781
|
hangingProtocolService,
|
|
2491
2782
|
displaySetService,
|
|
@@ -2738,7 +3029,6 @@ function _mapDisplaySets(displaySets, thumbnailImageSrcMap) {
|
|
|
2738
3029
|
displaySetInstanceUID: ds.displaySetInstanceUID
|
|
2739
3030
|
// .. Any other data to pass
|
|
2740
3031
|
},
|
|
2741
|
-
|
|
2742
3032
|
isHydratedForDerivedDisplaySet: ds.isHydrated
|
|
2743
3033
|
});
|
|
2744
3034
|
});
|
|
@@ -2853,17 +3143,16 @@ function requestDisplaySetCreationForStudy(dataSource, displaySetService, StudyI
|
|
|
2853
3143
|
* @param {object} commandsManager
|
|
2854
3144
|
* @param {object} extensionManager
|
|
2855
3145
|
*/
|
|
2856
|
-
function WrappedPanelStudyBrowser(
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
} = _ref;
|
|
3146
|
+
function WrappedPanelStudyBrowser({
|
|
3147
|
+
commandsManager,
|
|
3148
|
+
extensionManager,
|
|
3149
|
+
servicesManager
|
|
3150
|
+
}) {
|
|
2862
3151
|
// TODO: This should be made available a different way; route should have
|
|
2863
3152
|
// already determined our datasource
|
|
2864
3153
|
const dataSource = extensionManager.getDataSources()[0];
|
|
2865
3154
|
const _getStudiesForPatientByMRN = Panels_getStudiesForPatientByMRN.bind(null, dataSource);
|
|
2866
|
-
const _getImageSrcFromImageId = _createGetImageSrcFromImageIdFn(extensionManager);
|
|
3155
|
+
const _getImageSrcFromImageId = (0,react.useCallback)(_createGetImageSrcFromImageIdFn(extensionManager), []);
|
|
2867
3156
|
const _requestDisplaySetCreationForStudy = Panels_requestDisplaySetCreationForStudy.bind(null, dataSource);
|
|
2868
3157
|
return /*#__PURE__*/react.createElement(Panels_PanelStudyBrowser, {
|
|
2869
3158
|
servicesManager: servicesManager,
|
|
@@ -2905,11 +3194,10 @@ WrappedPanelStudyBrowser.propTypes = {
|
|
|
2905
3194
|
|
|
2906
3195
|
|
|
2907
3196
|
|
|
2908
|
-
function ActionButtons(
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
} = _ref;
|
|
3197
|
+
function ActionButtons({
|
|
3198
|
+
onExportClick,
|
|
3199
|
+
onCreateReportClick
|
|
3200
|
+
}) {
|
|
2913
3201
|
const {
|
|
2914
3202
|
t
|
|
2915
3203
|
} = (0,es/* useTranslation */.$G)('MeasurementTable');
|
|
@@ -2943,10 +3231,9 @@ const CREATE_REPORT_DIALOG_RESPONSE = {
|
|
|
2943
3231
|
CANCEL: 0,
|
|
2944
3232
|
CREATE_REPORT: 1
|
|
2945
3233
|
};
|
|
2946
|
-
function CreateReportDialogPrompt(uiDialogService,
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
} = _ref;
|
|
3234
|
+
function CreateReportDialogPrompt(uiDialogService, {
|
|
3235
|
+
extensionManager
|
|
3236
|
+
}) {
|
|
2950
3237
|
return new Promise(function (resolve, reject) {
|
|
2951
3238
|
let dialogId = undefined;
|
|
2952
3239
|
const _handleClose = () => {
|
|
@@ -2967,11 +3254,10 @@ function CreateReportDialogPrompt(uiDialogService, _ref) {
|
|
|
2967
3254
|
* @param {string} param0.action - value of action performed
|
|
2968
3255
|
* @param {string} param0.value - value from input field
|
|
2969
3256
|
*/
|
|
2970
|
-
const _handleFormSubmit =
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
} = _ref2;
|
|
3257
|
+
const _handleFormSubmit = ({
|
|
3258
|
+
action,
|
|
3259
|
+
value
|
|
3260
|
+
}) => {
|
|
2975
3261
|
uiDialogService.dismiss({
|
|
2976
3262
|
id: dialogId
|
|
2977
3263
|
});
|
|
@@ -3028,11 +3314,10 @@ function CreateReportDialogPrompt(uiDialogService, _ref) {
|
|
|
3028
3314
|
}],
|
|
3029
3315
|
// TODO: Should be on button press...
|
|
3030
3316
|
onSubmit: _handleFormSubmit,
|
|
3031
|
-
body:
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
} = _ref3;
|
|
3317
|
+
body: ({
|
|
3318
|
+
value,
|
|
3319
|
+
setValue
|
|
3320
|
+
}) => {
|
|
3036
3321
|
const onChangeHandler = event => {
|
|
3037
3322
|
event.persist();
|
|
3038
3323
|
setValue(value => ({
|
|
@@ -3092,12 +3377,11 @@ function CreateReportDialogPrompt(uiDialogService, _ref) {
|
|
|
3092
3377
|
*
|
|
3093
3378
|
* @param {*} servicesManager
|
|
3094
3379
|
*/
|
|
3095
|
-
async function createReportAsync(
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
} = _ref;
|
|
3380
|
+
async function createReportAsync({
|
|
3381
|
+
servicesManager,
|
|
3382
|
+
getReport,
|
|
3383
|
+
reportType = 'measurement'
|
|
3384
|
+
}) {
|
|
3101
3385
|
const {
|
|
3102
3386
|
displaySetService,
|
|
3103
3387
|
uiNotificationService,
|
|
@@ -3208,15 +3492,18 @@ function findSRWithSameSeriesDescription(SeriesDescription, displaySetService) {
|
|
|
3208
3492
|
|
|
3209
3493
|
|
|
3210
3494
|
|
|
3495
|
+
|
|
3211
3496
|
const {
|
|
3212
3497
|
downloadCSVReport
|
|
3213
3498
|
} = src.utils;
|
|
3214
|
-
function PanelMeasurementTable(
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3499
|
+
function PanelMeasurementTable({
|
|
3500
|
+
servicesManager,
|
|
3501
|
+
commandsManager,
|
|
3502
|
+
extensionManager
|
|
3503
|
+
}) {
|
|
3504
|
+
const {
|
|
3505
|
+
t
|
|
3506
|
+
} = (0,es/* useTranslation */.$G)('MeasurementTable');
|
|
3220
3507
|
const [viewportGrid, viewportGridService] = (0,ui_src/* useViewportGrid */.O_)();
|
|
3221
3508
|
const {
|
|
3222
3509
|
activeViewportId,
|
|
@@ -3303,31 +3590,28 @@ function PanelMeasurementTable(_ref) {
|
|
|
3303
3590
|
});
|
|
3304
3591
|
}
|
|
3305
3592
|
}
|
|
3306
|
-
const jumpToImage =
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
} = _ref2;
|
|
3593
|
+
const jumpToImage = ({
|
|
3594
|
+
uid,
|
|
3595
|
+
isActive
|
|
3596
|
+
}) => {
|
|
3311
3597
|
measurementService.jumpToMeasurement(viewportGrid.activeViewportId, uid);
|
|
3312
3598
|
onMeasurementItemClickHandler({
|
|
3313
3599
|
uid,
|
|
3314
3600
|
isActive
|
|
3315
3601
|
});
|
|
3316
3602
|
};
|
|
3317
|
-
const onMeasurementItemEditHandler =
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
} = _ref3;
|
|
3603
|
+
const onMeasurementItemEditHandler = ({
|
|
3604
|
+
uid,
|
|
3605
|
+
isActive
|
|
3606
|
+
}) => {
|
|
3322
3607
|
const measurement = measurementService.getMeasurement(uid);
|
|
3323
3608
|
//Todo: why we are jumping to image?
|
|
3324
3609
|
// jumpToImage({ id, isActive });
|
|
3325
3610
|
|
|
3326
|
-
const onSubmitHandler =
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
} = _ref4;
|
|
3611
|
+
const onSubmitHandler = ({
|
|
3612
|
+
action,
|
|
3613
|
+
value
|
|
3614
|
+
}) => {
|
|
3331
3615
|
switch (action.id) {
|
|
3332
3616
|
case 'save':
|
|
3333
3617
|
{
|
|
@@ -3353,11 +3637,10 @@ function PanelMeasurementTable(_ref) {
|
|
|
3353
3637
|
value: {
|
|
3354
3638
|
label: measurement.label || ''
|
|
3355
3639
|
},
|
|
3356
|
-
body:
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
} = _ref5;
|
|
3640
|
+
body: ({
|
|
3641
|
+
value,
|
|
3642
|
+
setValue
|
|
3643
|
+
}) => {
|
|
3361
3644
|
const onChangeHandler = event => {
|
|
3362
3645
|
event.persist();
|
|
3363
3646
|
setValue(value => ({
|
|
@@ -3400,11 +3683,10 @@ function PanelMeasurementTable(_ref) {
|
|
|
3400
3683
|
}
|
|
3401
3684
|
});
|
|
3402
3685
|
};
|
|
3403
|
-
const onMeasurementItemClickHandler =
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
} = _ref6;
|
|
3686
|
+
const onMeasurementItemClickHandler = ({
|
|
3687
|
+
uid,
|
|
3688
|
+
isActive
|
|
3689
|
+
}) => {
|
|
3408
3690
|
if (!isActive) {
|
|
3409
3691
|
const measurements = [...displayMeasurements];
|
|
3410
3692
|
const measurement = measurements.find(m => m.uid === uid);
|
|
@@ -3417,7 +3699,7 @@ function PanelMeasurementTable(_ref) {
|
|
|
3417
3699
|
className: "ohif-scrollbar overflow-y-auto overflow-x-hidden",
|
|
3418
3700
|
"data-cy": 'measurements-panel'
|
|
3419
3701
|
}, /*#__PURE__*/react.createElement(ui_src/* MeasurementTable */.wt, {
|
|
3420
|
-
title: "Measurements",
|
|
3702
|
+
title: t("Measurements"),
|
|
3421
3703
|
servicesManager: servicesManager,
|
|
3422
3704
|
data: displayMeasurements,
|
|
3423
3705
|
onClick: jumpToImage,
|
|
@@ -3488,21 +3770,23 @@ function _mapMeasurementToDisplay(measurement, index, types) {
|
|
|
3488
3770
|
|
|
3489
3771
|
|
|
3490
3772
|
|
|
3773
|
+
// EXTERNAL MODULE: ../../../node_modules/i18next/dist/esm/i18next.js
|
|
3774
|
+
var i18next = __webpack_require__(73577);
|
|
3491
3775
|
;// CONCATENATED MODULE: ../../../extensions/default/src/getPanelModule.tsx
|
|
3492
3776
|
|
|
3493
3777
|
|
|
3494
3778
|
|
|
3779
|
+
|
|
3495
3780
|
// TODO:
|
|
3496
3781
|
// - No loading UI exists yet
|
|
3497
3782
|
// - cancel promises when component is destroyed
|
|
3498
3783
|
// - show errors in UI for thumbnails if promise fails
|
|
3499
3784
|
|
|
3500
|
-
function getPanelModule(
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
} = _ref;
|
|
3785
|
+
function getPanelModule({
|
|
3786
|
+
commandsManager,
|
|
3787
|
+
extensionManager,
|
|
3788
|
+
servicesManager
|
|
3789
|
+
}) {
|
|
3506
3790
|
const wrappedMeasurementPanel = () => {
|
|
3507
3791
|
return /*#__PURE__*/react.createElement(PanelMeasurementTable, {
|
|
3508
3792
|
commandsManager: commandsManager,
|
|
@@ -3514,7 +3798,7 @@ function getPanelModule(_ref) {
|
|
|
3514
3798
|
name: 'seriesList',
|
|
3515
3799
|
iconName: 'tab-studies',
|
|
3516
3800
|
iconLabel: 'Studies',
|
|
3517
|
-
label: 'Studies',
|
|
3801
|
+
label: i18next/* default */.Z.t('SidePanel:Studies'),
|
|
3518
3802
|
component: Panels_WrappedPanelStudyBrowser.bind(null, {
|
|
3519
3803
|
commandsManager,
|
|
3520
3804
|
extensionManager,
|
|
@@ -3524,8 +3808,8 @@ function getPanelModule(_ref) {
|
|
|
3524
3808
|
name: 'measure',
|
|
3525
3809
|
iconName: 'tab-linear',
|
|
3526
3810
|
iconLabel: 'Measure',
|
|
3527
|
-
label: 'Measurements',
|
|
3528
|
-
secondaryLabel: 'Measurements',
|
|
3811
|
+
label: i18next/* default */.Z.t('SidePanel:Measurements'),
|
|
3812
|
+
secondaryLabel: i18next/* default */.Z.t('SidePanel:Measurements'),
|
|
3529
3813
|
component: wrappedMeasurementPanel
|
|
3530
3814
|
}];
|
|
3531
3815
|
}
|
|
@@ -4022,11 +4306,10 @@ function ToolbarLayoutSelector_extends() { ToolbarLayoutSelector_extends = Objec
|
|
|
4022
4306
|
|
|
4023
4307
|
|
|
4024
4308
|
|
|
4025
|
-
function ToolbarLayoutSelectorWithServices(
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
} = _ref;
|
|
4309
|
+
function ToolbarLayoutSelectorWithServices({
|
|
4310
|
+
servicesManager,
|
|
4311
|
+
...props
|
|
4312
|
+
}) {
|
|
4030
4313
|
const {
|
|
4031
4314
|
toolbarService
|
|
4032
4315
|
} = servicesManager.services;
|
|
@@ -4046,14 +4329,13 @@ function ToolbarLayoutSelectorWithServices(_ref) {
|
|
|
4046
4329
|
onSelection: onSelection
|
|
4047
4330
|
}));
|
|
4048
4331
|
}
|
|
4049
|
-
function LayoutSelector(
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
} = _ref2;
|
|
4332
|
+
function LayoutSelector({
|
|
4333
|
+
rows,
|
|
4334
|
+
columns,
|
|
4335
|
+
className,
|
|
4336
|
+
onSelection,
|
|
4337
|
+
...rest
|
|
4338
|
+
}) {
|
|
4057
4339
|
const [isOpen, setIsOpen] = (0,react.useState)(false);
|
|
4058
4340
|
const closeOnOutsideClick = () => {
|
|
4059
4341
|
if (isOpen) {
|
|
@@ -4102,18 +4384,17 @@ function ToolbarSplitButtonWithServices_extends() { ToolbarSplitButtonWithServic
|
|
|
4102
4384
|
|
|
4103
4385
|
|
|
4104
4386
|
|
|
4105
|
-
function ToolbarSplitButtonWithServices(
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
} = _ref;
|
|
4387
|
+
function ToolbarSplitButtonWithServices({
|
|
4388
|
+
isRadio,
|
|
4389
|
+
isAction,
|
|
4390
|
+
groupId,
|
|
4391
|
+
primary,
|
|
4392
|
+
secondary,
|
|
4393
|
+
items,
|
|
4394
|
+
renderer,
|
|
4395
|
+
onInteraction,
|
|
4396
|
+
servicesManager
|
|
4397
|
+
}) {
|
|
4117
4398
|
const {
|
|
4118
4399
|
toolbarService
|
|
4119
4400
|
} = servicesManager?.services;
|
|
@@ -4186,14 +4467,13 @@ function ToolbarSplitButtonWithServices(_ref) {
|
|
|
4186
4467
|
isActive
|
|
4187
4468
|
};
|
|
4188
4469
|
});
|
|
4189
|
-
const DefaultListItemRenderer =
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
} = _ref2;
|
|
4470
|
+
const DefaultListItemRenderer = ({
|
|
4471
|
+
type,
|
|
4472
|
+
icon,
|
|
4473
|
+
label,
|
|
4474
|
+
t,
|
|
4475
|
+
id
|
|
4476
|
+
}) => {
|
|
4197
4477
|
const isActive = type === 'toggle' && toggles[id] === true;
|
|
4198
4478
|
return /*#__PURE__*/react.createElement("div", {
|
|
4199
4479
|
className: classnames_default()('hover:bg-primary-dark flex h-8 w-full flex-row items-center p-3', 'whitespace-pre text-base', isActive && 'bg-primary-dark', isActive ? 'text-[#348CFD]' : 'text-common-bright hover:bg-primary-dark hover:text-primary-light')
|
|
@@ -4264,15 +4544,14 @@ function ToolbarButtonWithServices_extends() { ToolbarButtonWithServices_extends
|
|
|
4264
4544
|
|
|
4265
4545
|
|
|
4266
4546
|
|
|
4267
|
-
function ToolbarButtonWithServices(
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
} = _ref;
|
|
4547
|
+
function ToolbarButtonWithServices({
|
|
4548
|
+
id,
|
|
4549
|
+
type,
|
|
4550
|
+
commands,
|
|
4551
|
+
onInteraction,
|
|
4552
|
+
servicesManager,
|
|
4553
|
+
...props
|
|
4554
|
+
}) {
|
|
4276
4555
|
const {
|
|
4277
4556
|
toolbarService
|
|
4278
4557
|
} = servicesManager?.services || {};
|
|
@@ -4320,7 +4599,7 @@ ToolbarButtonWithServices.propTypes = {
|
|
|
4320
4599
|
state: prop_types_default().shape({
|
|
4321
4600
|
primaryToolId: (prop_types_default()).string,
|
|
4322
4601
|
toggles: prop_types_default().objectOf((prop_types_default()).bool),
|
|
4323
|
-
groups: prop_types_default().objectOf((prop_types_default()).
|
|
4602
|
+
groups: prop_types_default().objectOf((prop_types_default()).any)
|
|
4324
4603
|
}).isRequired
|
|
4325
4604
|
}).isRequired
|
|
4326
4605
|
}).isRequired
|
|
@@ -4332,11 +4611,10 @@ ToolbarButtonWithServices.propTypes = {
|
|
|
4332
4611
|
|
|
4333
4612
|
|
|
4334
4613
|
|
|
4335
|
-
function getToolbarModule(
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
} = _ref;
|
|
4614
|
+
function getToolbarModule({
|
|
4615
|
+
commandsManager,
|
|
4616
|
+
servicesManager
|
|
4617
|
+
}) {
|
|
4340
4618
|
return [{
|
|
4341
4619
|
name: 'ohif.divider',
|
|
4342
4620
|
defaultComponent: ToolbarDivider,
|
|
@@ -4531,6 +4809,7 @@ function adaptItem(item, subProps) {
|
|
|
4531
4809
|
// EXTERNAL MODULE: ../../ui/src/components/ContextMenu/ContextMenu.tsx
|
|
4532
4810
|
var ContextMenu = __webpack_require__(5638);
|
|
4533
4811
|
;// CONCATENATED MODULE: ../../../extensions/default/src/CustomizableContextMenu/ContextMenuController.tsx
|
|
4812
|
+
var _class;
|
|
4534
4813
|
|
|
4535
4814
|
|
|
4536
4815
|
/**
|
|
@@ -4635,6 +4914,7 @@ class ContextMenuController {
|
|
|
4635
4914
|
});
|
|
4636
4915
|
}
|
|
4637
4916
|
}
|
|
4917
|
+
_class = ContextMenuController;
|
|
4638
4918
|
ContextMenuController.getDefaultPosition = () => {
|
|
4639
4919
|
return {
|
|
4640
4920
|
x: 0,
|
|
@@ -4658,16 +4938,14 @@ ContextMenuController._getElementDefaultPosition = element => {
|
|
|
4658
4938
|
y: undefined
|
|
4659
4939
|
};
|
|
4660
4940
|
};
|
|
4661
|
-
ContextMenuController._getCanvasPointsPosition =
|
|
4662
|
-
|
|
4663
|
-
let element = arguments.length > 1 ? arguments[1] : undefined;
|
|
4664
|
-
const viewerPos = ContextMenuController._getElementDefaultPosition(element);
|
|
4941
|
+
ContextMenuController._getCanvasPointsPosition = (points = [], element) => {
|
|
4942
|
+
const viewerPos = _class._getElementDefaultPosition(element);
|
|
4665
4943
|
for (let pointIndex = 0; pointIndex < points.length; pointIndex++) {
|
|
4666
4944
|
const point = {
|
|
4667
4945
|
x: points[pointIndex][0] || points[pointIndex]['x'],
|
|
4668
4946
|
y: points[pointIndex][1] || points[pointIndex]['y']
|
|
4669
4947
|
};
|
|
4670
|
-
if (
|
|
4948
|
+
if (_class._isValidPosition(point) && _class._isValidPosition(viewerPos)) {
|
|
4671
4949
|
return {
|
|
4672
4950
|
x: point.x + viewerPos.x,
|
|
4673
4951
|
y: point.y + viewerPos.y
|
|
@@ -4683,17 +4961,17 @@ ContextMenuController._isValidPosition = source => {
|
|
|
4683
4961
|
*/
|
|
4684
4962
|
ContextMenuController._getDefaultPosition = (canvasPoints, eventDetail, viewerElement) => {
|
|
4685
4963
|
function* getPositionIterator() {
|
|
4686
|
-
yield
|
|
4687
|
-
yield
|
|
4688
|
-
yield
|
|
4689
|
-
yield
|
|
4964
|
+
yield _class._getCanvasPointsPosition(canvasPoints, viewerElement);
|
|
4965
|
+
yield _class._getEventDefaultPosition(eventDetail);
|
|
4966
|
+
yield _class._getElementDefaultPosition(viewerElement);
|
|
4967
|
+
yield _class.getDefaultPosition();
|
|
4690
4968
|
}
|
|
4691
4969
|
const positionIterator = getPositionIterator();
|
|
4692
4970
|
let current = positionIterator.next();
|
|
4693
4971
|
let position = current.value;
|
|
4694
4972
|
while (!current.done) {
|
|
4695
4973
|
position = current.value;
|
|
4696
|
-
if (
|
|
4974
|
+
if (_class._isValidPosition(position)) {
|
|
4697
4975
|
positionIterator.return();
|
|
4698
4976
|
}
|
|
4699
4977
|
current = positionIterator.next();
|
|
@@ -4708,12 +4986,9 @@ const defaultContextMenu = {
|
|
|
4708
4986
|
// Get the items from the UI Customization for the menu name (and have a custom name)
|
|
4709
4987
|
{
|
|
4710
4988
|
id: 'forExistingMeasurement',
|
|
4711
|
-
selector:
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
} = _ref;
|
|
4715
|
-
return !!nearbyToolData;
|
|
4716
|
-
},
|
|
4989
|
+
selector: ({
|
|
4990
|
+
nearbyToolData
|
|
4991
|
+
}) => !!nearbyToolData,
|
|
4717
4992
|
items: [{
|
|
4718
4993
|
label: 'Delete measurement',
|
|
4719
4994
|
commands: [{
|
|
@@ -4758,13 +5033,12 @@ const rowStyle = {
|
|
|
4758
5033
|
borderBottomWidth: `${rowBottomBorderPx}px`,
|
|
4759
5034
|
...rowVerticalPaddingStyle
|
|
4760
5035
|
};
|
|
4761
|
-
function ColumnHeaders(
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
} = _ref;
|
|
5036
|
+
function ColumnHeaders({
|
|
5037
|
+
tagRef,
|
|
5038
|
+
vrRef,
|
|
5039
|
+
keywordRef,
|
|
5040
|
+
valueRef
|
|
5041
|
+
}) {
|
|
4768
5042
|
return /*#__PURE__*/react.createElement("div", {
|
|
4769
5043
|
className: classnames_default()('bg-secondary-dark ohif-scrollbar flex w-full flex-row overflow-y-scroll'),
|
|
4770
5044
|
style: rowVerticalPaddingStyle
|
|
@@ -4798,10 +5072,9 @@ function ColumnHeaders(_ref) {
|
|
|
4798
5072
|
className: "flex flex-row items-center focus:outline-none"
|
|
4799
5073
|
}, "Value"))));
|
|
4800
5074
|
}
|
|
4801
|
-
function DicomTagTable(
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
} = _ref2;
|
|
5075
|
+
function DicomTagTable({
|
|
5076
|
+
rows
|
|
5077
|
+
}) {
|
|
4805
5078
|
const listRef = (0,react.useRef)();
|
|
4806
5079
|
const canvasRef = (0,react.useRef)();
|
|
4807
5080
|
const [tagHeaderElem, setTagHeaderElem] = (0,react.useState)(null);
|
|
@@ -4855,11 +5128,10 @@ function DicomTagTable(_ref2) {
|
|
|
4855
5128
|
window.removeEventListener('resize', debouncedResize);
|
|
4856
5129
|
};
|
|
4857
5130
|
}, []);
|
|
4858
|
-
const Row = (0,react.useCallback)(
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
} = _ref3;
|
|
5131
|
+
const Row = (0,react.useCallback)(({
|
|
5132
|
+
index,
|
|
5133
|
+
style
|
|
5134
|
+
}) => {
|
|
4863
5135
|
const row = rows[index];
|
|
4864
5136
|
return /*#__PURE__*/react.createElement("div", {
|
|
4865
5137
|
style: {
|
|
@@ -4948,11 +5220,10 @@ const {
|
|
|
4948
5220
|
const {
|
|
4949
5221
|
nameMap
|
|
4950
5222
|
} = DicomTagBrowser_DicomMetaDictionary;
|
|
4951
|
-
const DicomTagBrowser =
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
} = _ref;
|
|
5223
|
+
const DicomTagBrowser = ({
|
|
5224
|
+
displaySets,
|
|
5225
|
+
displaySetInstanceUID
|
|
5226
|
+
}) => {
|
|
4956
5227
|
// The column indices that are to be excluded during a filter of the table.
|
|
4957
5228
|
// At present the column indices are:
|
|
4958
5229
|
// 0: DICOM tag
|
|
@@ -5113,8 +5384,7 @@ function getSortedTags(metadata) {
|
|
|
5113
5384
|
_sortTagList(tagList);
|
|
5114
5385
|
return tagList;
|
|
5115
5386
|
}
|
|
5116
|
-
function getRows(metadata) {
|
|
5117
|
-
let depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
5387
|
+
function getRows(metadata, depth = 0) {
|
|
5118
5388
|
// Tag, Type, Value, Keyword
|
|
5119
5389
|
|
|
5120
5390
|
const keywords = Object.keys(metadata);
|
|
@@ -5125,7 +5395,6 @@ function getRows(metadata) {
|
|
|
5125
5395
|
if (depth > 0) {
|
|
5126
5396
|
tagIndent += ' '; // If indented, add a space after the indents.
|
|
5127
5397
|
}
|
|
5128
|
-
|
|
5129
5398
|
const rows = [];
|
|
5130
5399
|
for (let i = 0; i < keywords.length; i++) {
|
|
5131
5400
|
let keyword = keywords[i];
|
|
@@ -5366,11 +5635,10 @@ const findViewportsByPosition_findOrCreateViewport = (hangingProtocolService, vi
|
|
|
5366
5635
|
* @returns Set of states that can be applied to the state sync to remember
|
|
5367
5636
|
* the current view state.
|
|
5368
5637
|
*/
|
|
5369
|
-
const findViewportsByPosition = (state,
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
} = _ref;
|
|
5638
|
+
const findViewportsByPosition = (state, {
|
|
5639
|
+
numRows,
|
|
5640
|
+
numCols
|
|
5641
|
+
}, syncService) => {
|
|
5374
5642
|
const {
|
|
5375
5643
|
viewports
|
|
5376
5644
|
} = state;
|
|
@@ -5425,11 +5693,10 @@ const {
|
|
|
5425
5693
|
* commands module, but if others get added elsewhere this may need enhancing.
|
|
5426
5694
|
*/
|
|
5427
5695
|
const isHangingProtocolCommand = command => command && (command.commandName === 'setHangingProtocol' || command.commandName === 'toggleHangingProtocol');
|
|
5428
|
-
const commandsModule =
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
} = _ref;
|
|
5696
|
+
const commandsModule = ({
|
|
5697
|
+
servicesManager,
|
|
5698
|
+
commandsManager
|
|
5699
|
+
}) => {
|
|
5433
5700
|
const {
|
|
5434
5701
|
customizationService,
|
|
5435
5702
|
measurementService,
|
|
@@ -5484,12 +5751,11 @@ const commandsModule = _ref => {
|
|
|
5484
5751
|
closeContextMenu: () => {
|
|
5485
5752
|
contextMenuController.closeContextMenu();
|
|
5486
5753
|
},
|
|
5487
|
-
displayNotification:
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
} = _ref2;
|
|
5754
|
+
displayNotification: ({
|
|
5755
|
+
text,
|
|
5756
|
+
title,
|
|
5757
|
+
type
|
|
5758
|
+
}) => {
|
|
5493
5759
|
uiNotificationService.show({
|
|
5494
5760
|
title: title,
|
|
5495
5761
|
message: text,
|
|
@@ -5558,14 +5824,13 @@ const commandsModule = _ref => {
|
|
|
5558
5824
|
* @param options.stageIndex - the index of the stage to go to.
|
|
5559
5825
|
* @param options.reset - flag to indicate if the HP should be reset to its original and not restored to a previous state
|
|
5560
5826
|
*/
|
|
5561
|
-
setHangingProtocol:
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
} = _ref3;
|
|
5827
|
+
setHangingProtocol: ({
|
|
5828
|
+
activeStudyUID = '',
|
|
5829
|
+
protocolId,
|
|
5830
|
+
stageId,
|
|
5831
|
+
stageIndex,
|
|
5832
|
+
reset = false
|
|
5833
|
+
}) => {
|
|
5569
5834
|
const primaryToolBeforeHPChange = toolbarService.getActivePrimaryTool();
|
|
5570
5835
|
try {
|
|
5571
5836
|
// Stores in the state the display set selector id to displaySetUID mapping
|
|
@@ -5626,9 +5891,6 @@ const commandsModule = _ref => {
|
|
|
5626
5891
|
delete displaySetSelectorMap[`${activeStudyUID || hpInfo.activeStudyUID}:activeDisplaySet:0`];
|
|
5627
5892
|
stateSyncService.store(stateSyncReduce);
|
|
5628
5893
|
// This is a default action applied
|
|
5629
|
-
const {
|
|
5630
|
-
protocol
|
|
5631
|
-
} = hangingProtocolService.getActiveProtocol();
|
|
5632
5894
|
actions.toggleHpTools();
|
|
5633
5895
|
|
|
5634
5896
|
// try to use the same tool in the new hanging protocol stage
|
|
@@ -5649,17 +5911,6 @@ const commandsModule = _ref => {
|
|
|
5649
5911
|
});
|
|
5650
5912
|
}
|
|
5651
5913
|
}
|
|
5652
|
-
|
|
5653
|
-
// Send the notification about updating the state
|
|
5654
|
-
if (protocolId !== hpInfo.protocolId) {
|
|
5655
|
-
// The old protocol callbacks are used for turning off things
|
|
5656
|
-
// like crosshairs when moving to the new HP
|
|
5657
|
-
commandsManager.run(oldProtocol.callbacks?.onProtocolExit);
|
|
5658
|
-
// The new protocol callback is used for things like
|
|
5659
|
-
// activating modes etc.
|
|
5660
|
-
}
|
|
5661
|
-
|
|
5662
|
-
commandsManager.run(protocol.callbacks?.onProtocolEnter);
|
|
5663
5914
|
return true;
|
|
5664
5915
|
} catch (e) {
|
|
5665
5916
|
console.error(e);
|
|
@@ -5673,11 +5924,10 @@ const commandsModule = _ref => {
|
|
|
5673
5924
|
return false;
|
|
5674
5925
|
}
|
|
5675
5926
|
},
|
|
5676
|
-
toggleHangingProtocol:
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
} = _ref4;
|
|
5927
|
+
toggleHangingProtocol: ({
|
|
5928
|
+
protocolId,
|
|
5929
|
+
stageIndex
|
|
5930
|
+
}) => {
|
|
5681
5931
|
const {
|
|
5682
5932
|
protocol,
|
|
5683
5933
|
stageIndex: desiredStageIndex,
|
|
@@ -5710,10 +5960,9 @@ const commandsModule = _ref => {
|
|
|
5710
5960
|
});
|
|
5711
5961
|
}
|
|
5712
5962
|
},
|
|
5713
|
-
deltaStage:
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
} = _ref5;
|
|
5963
|
+
deltaStage: ({
|
|
5964
|
+
direction
|
|
5965
|
+
}) => {
|
|
5717
5966
|
const {
|
|
5718
5967
|
protocolId,
|
|
5719
5968
|
stageIndex: oldStageIndex
|
|
@@ -5739,11 +5988,10 @@ const commandsModule = _ref => {
|
|
|
5739
5988
|
/**
|
|
5740
5989
|
* Changes the viewport grid layout in terms of the MxN layout.
|
|
5741
5990
|
*/
|
|
5742
|
-
setViewportGridLayout:
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
} = _ref6;
|
|
5991
|
+
setViewportGridLayout: ({
|
|
5992
|
+
numRows,
|
|
5993
|
+
numCols
|
|
5994
|
+
}) => {
|
|
5747
5995
|
const {
|
|
5748
5996
|
protocol
|
|
5749
5997
|
} = hangingProtocolService.getActiveProtocol();
|
|
@@ -5953,11 +6201,10 @@ const commandsModule = _ref => {
|
|
|
5953
6201
|
behavior: 'smooth'
|
|
5954
6202
|
});
|
|
5955
6203
|
},
|
|
5956
|
-
updateViewportDisplaySet:
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
} = _ref7;
|
|
6204
|
+
updateViewportDisplaySet: ({
|
|
6205
|
+
direction,
|
|
6206
|
+
excludeNonImageModalities
|
|
6207
|
+
}) => {
|
|
5961
6208
|
const nonImageModalities = ['SR', 'SEG', 'SM', 'RTSTRUCT', 'RTPLAN', 'RTDOSE'];
|
|
5962
6209
|
|
|
5963
6210
|
// Sort the display sets as per the hanging protocol service viewport/display set scoring system.
|
|
@@ -6517,7 +6764,6 @@ const defaultProtocol = {
|
|
|
6517
6764
|
// studyMatchingRules: [],
|
|
6518
6765
|
}
|
|
6519
6766
|
},
|
|
6520
|
-
|
|
6521
6767
|
stages: [{
|
|
6522
6768
|
name: 'default',
|
|
6523
6769
|
viewportStructure: {
|
|
@@ -6543,7 +6789,6 @@ const defaultProtocol = {
|
|
|
6543
6789
|
// preset: 'middle', // 'first', 'last', 'middle'
|
|
6544
6790
|
// },
|
|
6545
6791
|
},
|
|
6546
|
-
|
|
6547
6792
|
displaySets: [{
|
|
6548
6793
|
id: 'defaultDisplaySetId'
|
|
6549
6794
|
}]
|
|
@@ -6617,12 +6862,11 @@ function DataSourceSelector() {
|
|
|
6617
6862
|
|
|
6618
6863
|
|
|
6619
6864
|
|
|
6620
|
-
function ItemListComponent(
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
} = _ref;
|
|
6865
|
+
function ItemListComponent({
|
|
6866
|
+
itemLabel,
|
|
6867
|
+
itemList,
|
|
6868
|
+
onItemClicked
|
|
6869
|
+
}) {
|
|
6626
6870
|
const {
|
|
6627
6871
|
t
|
|
6628
6872
|
} = (0,es/* useTranslation */.$G)('DataSourceConfiguration');
|
|
@@ -6676,12 +6920,11 @@ function ItemListComponent(_ref) {
|
|
|
6676
6920
|
|
|
6677
6921
|
|
|
6678
6922
|
const NO_WRAP_ELLIPSIS_CLASS_NAMES = 'text-ellipsis whitespace-nowrap overflow-hidden';
|
|
6679
|
-
function DataSourceConfigurationModalComponent(
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
} = _ref;
|
|
6923
|
+
function DataSourceConfigurationModalComponent({
|
|
6924
|
+
configurationAPI,
|
|
6925
|
+
configuredItems,
|
|
6926
|
+
onHide
|
|
6927
|
+
}) {
|
|
6685
6928
|
const {
|
|
6686
6929
|
t
|
|
6687
6930
|
} = (0,es/* useTranslation */.$G)('DataSourceConfiguration');
|
|
@@ -6788,11 +7031,10 @@ function DataSourceConfigurationModalComponent(_ref) {
|
|
|
6788
7031
|
|
|
6789
7032
|
|
|
6790
7033
|
|
|
6791
|
-
function DataSourceConfigurationComponent(
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
} = _ref;
|
|
7034
|
+
function DataSourceConfigurationComponent({
|
|
7035
|
+
servicesManager,
|
|
7036
|
+
extensionManager
|
|
7037
|
+
}) {
|
|
6796
7038
|
const {
|
|
6797
7039
|
t
|
|
6798
7040
|
} = (0,es/* useTranslation */.$G)('DataSourceConfiguration');
|
|
@@ -7010,9 +7252,7 @@ class GoogleCloudDataSourceConfigurationAPI {
|
|
|
7010
7252
|
* @param fetchSearchParams any search query params; currently only used for paging results
|
|
7011
7253
|
* @returns an array of items of the specified type
|
|
7012
7254
|
*/
|
|
7013
|
-
static async _doFetch(urlStr, fetchItemType) {
|
|
7014
|
-
let fetchOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
7015
|
-
let fetchSearchParams = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
7255
|
+
static async _doFetch(urlStr, fetchItemType, fetchOptions = {}, fetchSearchParams = {}) {
|
|
7016
7256
|
try {
|
|
7017
7257
|
const url = new URL(urlStr);
|
|
7018
7258
|
url.search = new URLSearchParams(fetchSearchParams).toString();
|
|
@@ -7057,11 +7297,10 @@ class GoogleCloudDataSourceConfigurationAPI {
|
|
|
7057
7297
|
* custom page for the user to view their profile, or to add a custom
|
|
7058
7298
|
* page for login etc.
|
|
7059
7299
|
*/
|
|
7060
|
-
function getCustomizationModule(
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
} = _ref;
|
|
7300
|
+
function getCustomizationModule({
|
|
7301
|
+
servicesManager,
|
|
7302
|
+
extensionManager
|
|
7303
|
+
}) {
|
|
7065
7304
|
return [{
|
|
7066
7305
|
name: 'helloPage',
|
|
7067
7306
|
value: {
|
|
@@ -7269,11 +7508,10 @@ const init_metadataProvider = src.classes.MetadataProvider;
|
|
|
7269
7508
|
* @param {Object} servicesManager
|
|
7270
7509
|
* @param {Object} configuration
|
|
7271
7510
|
*/
|
|
7272
|
-
function init(
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
} = _ref;
|
|
7511
|
+
function init({
|
|
7512
|
+
servicesManager,
|
|
7513
|
+
configuration = {}
|
|
7514
|
+
}) {
|
|
7277
7515
|
const {
|
|
7278
7516
|
stateSyncService
|
|
7279
7517
|
} = servicesManager.services;
|
|
@@ -7320,16 +7558,18 @@ function init(_ref) {
|
|
|
7320
7558
|
clearOnModeExit: true
|
|
7321
7559
|
});
|
|
7322
7560
|
}
|
|
7323
|
-
const handlePETImageMetadata =
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
} = _ref2;
|
|
7561
|
+
const handlePETImageMetadata = ({
|
|
7562
|
+
SeriesInstanceUID,
|
|
7563
|
+
StudyInstanceUID
|
|
7564
|
+
}) => {
|
|
7328
7565
|
const {
|
|
7329
7566
|
instances
|
|
7330
7567
|
} = src.DicomMetadataStore.getSeries(StudyInstanceUID, SeriesInstanceUID);
|
|
7568
|
+
if (!instances?.length) {
|
|
7569
|
+
return;
|
|
7570
|
+
}
|
|
7331
7571
|
const modality = instances[0].Modality;
|
|
7332
|
-
if (modality !== 'PT') {
|
|
7572
|
+
if (!modality || modality !== 'PT') {
|
|
7333
7573
|
return;
|
|
7334
7574
|
}
|
|
7335
7575
|
const imageIds = instances.map(instance => instance.imageId);
|
|
@@ -7390,10 +7630,9 @@ const defaultExtension = {
|
|
|
7390
7630
|
getSopClassHandlerModule: src_getSopClassHandlerModule,
|
|
7391
7631
|
getToolbarModule: getToolbarModule,
|
|
7392
7632
|
getCommandsModule: src_commandsModule,
|
|
7393
|
-
getUtilityModule(
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
} = _ref;
|
|
7633
|
+
getUtilityModule({
|
|
7634
|
+
servicesManager
|
|
7635
|
+
}) {
|
|
7397
7636
|
return [{
|
|
7398
7637
|
name: 'common',
|
|
7399
7638
|
exports: {
|