@ohif/app 3.8.0-beta.6 → 3.8.0-beta.60
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/{220.bundle.f7e1c96c94245e70f2be.js → 109.bundle.b4fee2a22b622839baf5.js} +4466 -3715
- package/dist/{471.bundle.b3d77b83b1593c09a504.js → 121.bundle.ed23e7752a11005322e6.js} +47 -51
- package/dist/{19.bundle.f6ac71d29001b0db0ec0.js → 155.bundle.a089b4e1dd8a13064c21.js} +198 -207
- package/dist/{687.bundle.f87fb1a36ef1ca951690.js → 164.bundle.6f0b21868890158eda40.js} +22 -38
- package/dist/17dd54813d5acc10bf8f.wasm +0 -0
- package/dist/{506.bundle.06f5c5620d0088ec0102.js → 188.bundle.903a17abf035c26e672f.js} +23 -28
- package/dist/20fc4c659b85ccd2a9c0.wasm +0 -0
- package/dist/214.bundle.7f5beb123035a163bf85.js +122755 -0
- package/dist/{126.bundle.cefdf26c03a5ab8d60c8.js → 250.bundle.13a1f5d003a00c2b8694.js} +63 -69
- package/dist/{236.bundle.3148dc4715c254801727.js → 270.bundle.4e3cd0e72bbff21f9596.js} +156 -178
- package/dist/290.bundle.fdf51412462b919e2772.js +8883 -0
- package/dist/{451.bundle.9fd36f52ff69594f0669.js → 295.bundle.462f3328c716cbe6c613.js} +45 -59
- package/dist/{125.bundle.253395f320b72180da63.js → 297.bundle.81d63bb0b66d63df6d86.js} +7 -8
- package/dist/{957.bundle.9ea4506963ef8b2d84ba.js → 307.bundle.6e884b1c8766c69560bd.js} +14569 -27570
- package/dist/{613.bundle.a0eee4dc2d2764c2f7cd.js → 317.bundle.9d9acdf28d8dfd3ab39e.js} +83 -57
- package/dist/{788.bundle.af903bf0598f0ad618e3.js → 339.bundle.d514a9189b0bbdedac75.js} +190 -239
- package/dist/342.bundle.8f20bc9a1fa5fed22d2d.js +51866 -0
- package/dist/457.bundle.64785b282dc8c9b64c92.js +30200 -0
- package/dist/{221.bundle.3f5f700b4c1ee8b1ce94.js → 50.bundle.5f1ddd2697906f8bde6b.js} +199 -189
- package/dist/{886.bundle.d5116d9b8ea4964b68a0.js → 530.bundle.ce13c30b93a28cc85098.js} +40 -44
- package/dist/{250.bundle.8084960e3318cda37317.js → 544.bundle.3f48123a58d3bdc052f5.js} +39 -44
- package/dist/{663.bundle.e3539f14edf9214e07eb.js → 559.bundle.7426bb86db4352f1c401.js} +149 -141
- package/dist/{410.bundle.5e16274b1082de6e127e.js → 594.bundle.9eb2863c4d3fbe4120c5.js} +31 -35
- package/dist/{774.bundle.4b2dc46a35012b898e1a.js → 644.bundle.1e77691d2eeb96a423b0.js} +1852 -8945
- package/dist/{82.bundle.ae82f6434056c8d79fec.js → 68.bundle.7ca79597088a0784c4ee.js} +313 -324
- package/dist/{342.bundle.e485b92bd6d91bb7cc04.js → 704.bundle.9ecbe7b05ea278ef6ba8.js} +1128 -737
- package/dist/{359.bundle.dedb5b782335939bdc52.js → 724.bundle.46d9ce1eb6867cdd81c0.js} +34 -37
- package/dist/{757.bundle.ec8301d8e70d2b990f65.js → 726.bundle.2bdb443d1b5620d74e6e.js} +512 -879
- package/dist/{530.bundle.a03b6f942ace3e1baa1e.js → 835.bundle.15aff0b7433bb0dd6d6d.js} +37 -30
- package/dist/{822.bundle.891f2e57b1b7bc2f4cb4.js → 862.bundle.d20d6b2d29fd89bf2f83.js} +27 -29
- package/dist/{181.bundle.2ddc6f90740895a3949c.js → 889.bundle.d77bbd1805d4f0bd0565.js} +135 -107
- package/dist/{181.css → 889.css} +1 -1
- package/dist/{281.bundle.e4c37762343dc03e4fa0.js → 905.bundle.53a0daccf13d3e134ab9.js} +29 -31
- package/dist/{814.bundle.98e400df965d000d78e6.js → 907.bundle.b1f7dffcc6187de1b7ad.js} +16 -18
- package/dist/{417.bundle.af0a207c29b109f84159.js → 931.bundle.d270a1fda9a2836c3cc5.js} +26 -26
- package/dist/{686.bundle.dccef1f36e4bc79bcc48.js → 939.bundle.84ee0b844023d924a22b.js} +7 -8
- package/dist/{12.bundle.75c761bd89ad782675c8.js → 961.bundle.54abd182a494b2e1d8ec.js} +16 -18
- package/dist/{776.bundle.08eb381dc3d06708eb0f.js → 963.bundle.8110049ad01d956455a2.js} +1629 -845
- package/dist/app.bundle.css +11 -11
- package/dist/{app.bundle.eeb94536f34535b1153f.js → app.bundle.f783ca295d5aa9042c31.js} +142266 -61058
- 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.d3a56dc9f62df5e11019.js} +3 -3
- 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/polySeg.bundle.cffa671e87c4c9110149.js +252 -0
- package/dist/serve.json +12 -0
- package/dist/sw.js +1 -1
- package/package.json +25 -22
- package/dist/202.bundle.d3490836f71e001dd30f.js +0 -6336
- package/dist/23.bundle.e008ad788170f2ed5569.js +0 -900
- 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/{19.css → 155.css} +0 -0
- /package/dist/{579.css → 481.css} +0 -0
- /package/dist/{221.css → 50.css} +0 -0
- /package/dist/{250.css → 544.css} +0 -0
- /package/dist/{776.css → 963.css} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[704],{
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 49704:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6
6
|
|
|
7
7
|
// ESM COMPAT FLAG
|
|
@@ -30,11 +30,11 @@ __webpack_require__.d(utils_namespaceObject, {
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
// EXTERNAL MODULE: ../../../node_modules/dicomweb-client/build/dicomweb-client.es.js
|
|
33
|
-
var dicomweb_client_es = __webpack_require__(
|
|
34
|
-
// EXTERNAL MODULE: ../../core/src/index.ts +
|
|
35
|
-
var src = __webpack_require__(
|
|
33
|
+
var dicomweb_client_es = __webpack_require__(36922);
|
|
34
|
+
// EXTERNAL MODULE: ../../core/src/index.ts + 66 modules
|
|
35
|
+
var src = __webpack_require__(14283);
|
|
36
36
|
// EXTERNAL MODULE: ../../core/src/utils/sortStudy.ts
|
|
37
|
-
var sortStudy = __webpack_require__(
|
|
37
|
+
var sortStudy = __webpack_require__(45476);
|
|
38
38
|
;// CONCATENATED MODULE: ../../../extensions/default/src/DicomWebDataSource/qido.js
|
|
39
39
|
/**
|
|
40
40
|
* QIDO - Query based on ID for DICOM Objects
|
|
@@ -125,7 +125,7 @@ function processSeriesResults(qidoSeries) {
|
|
|
125
125
|
description: getString(qidoSeries['0008103E'])
|
|
126
126
|
}));
|
|
127
127
|
}
|
|
128
|
-
(0,sortStudy/* sortStudySeries */.
|
|
128
|
+
(0,sortStudy/* sortStudySeries */.LM)(series);
|
|
129
129
|
return series;
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -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
|
}
|
|
@@ -380,7 +378,7 @@ function getImageId(_ref) {
|
|
|
380
378
|
}
|
|
381
379
|
}
|
|
382
380
|
// EXTERNAL MODULE: ../../../node_modules/dcmjs/build/dcmjs.es.js
|
|
383
|
-
var dcmjs_es = __webpack_require__(
|
|
381
|
+
var dcmjs_es = __webpack_require__(31426);
|
|
384
382
|
;// CONCATENATED MODULE: ../../../extensions/default/src/DicomWebDataSource/wado/retrieveMetadataLoader.js
|
|
385
383
|
/**
|
|
386
384
|
* Class to define inheritance of load retrieve strategy.
|
|
@@ -395,13 +393,11 @@ class RetrieveMetadataLoader {
|
|
|
395
393
|
* @param {Object} client The dicomweb-client.
|
|
396
394
|
* @param {Array} studyInstanceUID Study instance ui to be retrieved
|
|
397
395
|
* @param {Object} [filters] - Object containing filters to be applied on retrieve metadata process
|
|
398
|
-
* @param {string} [
|
|
399
|
-
* @param {
|
|
396
|
+
* @param {string} [filters.seriesInstanceUID] - series instance uid to filter results against
|
|
397
|
+
* @param {Object} [sortCriteria] - Custom sort criteria used for series
|
|
398
|
+
* @param {Function} [sortFunction] - Custom sort function for series
|
|
400
399
|
*/
|
|
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;
|
|
400
|
+
constructor(client, studyInstanceUID, filters = {}, sortCriteria = undefined, sortFunction = undefined) {
|
|
405
401
|
this.client = client;
|
|
406
402
|
this.studyInstanceUID = studyInstanceUID;
|
|
407
403
|
this.filters = filters;
|
|
@@ -422,13 +418,9 @@ class RetrieveMetadataLoader {
|
|
|
422
418
|
async runLoaders(loaders) {
|
|
423
419
|
let result;
|
|
424
420
|
for (const loader of loaders) {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
break; // closes iterator in case data is retrieved successfully
|
|
429
|
-
}
|
|
430
|
-
} catch (e) {
|
|
431
|
-
throw e;
|
|
421
|
+
result = await loader();
|
|
422
|
+
if (result && result.length) {
|
|
423
|
+
break; // closes iterator in case data is retrieved successfully
|
|
432
424
|
}
|
|
433
425
|
}
|
|
434
426
|
if (loaders.next().done && !result) {
|
|
@@ -511,11 +503,64 @@ class RetrieveMetadataLoaderSync extends RetrieveMetadataLoader {
|
|
|
511
503
|
|
|
512
504
|
|
|
513
505
|
|
|
506
|
+
// Series Date, Series Time, Series Description and Series Number to be included
|
|
507
|
+
// in the series metadata query result
|
|
508
|
+
const includeField = ['00080021', '00080031', '0008103E', '00200011'].join(',');
|
|
509
|
+
class DeferredPromise {
|
|
510
|
+
constructor() {
|
|
511
|
+
this.metadata = undefined;
|
|
512
|
+
this.processFunction = undefined;
|
|
513
|
+
this.internalPromise = undefined;
|
|
514
|
+
this.thenFunction = undefined;
|
|
515
|
+
this.rejectFunction = undefined;
|
|
516
|
+
}
|
|
517
|
+
setMetadata(metadata) {
|
|
518
|
+
this.metadata = metadata;
|
|
519
|
+
}
|
|
520
|
+
setProcessFunction(func) {
|
|
521
|
+
this.processFunction = func;
|
|
522
|
+
}
|
|
523
|
+
getPromise() {
|
|
524
|
+
return this.start();
|
|
525
|
+
}
|
|
526
|
+
start() {
|
|
527
|
+
if (this.internalPromise) {
|
|
528
|
+
return this.internalPromise;
|
|
529
|
+
}
|
|
530
|
+
this.internalPromise = this.processFunction();
|
|
531
|
+
// in case then and reject functions called before start
|
|
532
|
+
if (this.thenFunction) {
|
|
533
|
+
this.then(this.thenFunction);
|
|
534
|
+
this.thenFunction = undefined;
|
|
535
|
+
}
|
|
536
|
+
if (this.rejectFunction) {
|
|
537
|
+
this.reject(this.rejectFunction);
|
|
538
|
+
this.rejectFunction = undefined;
|
|
539
|
+
}
|
|
540
|
+
return this.internalPromise;
|
|
541
|
+
}
|
|
542
|
+
then(func) {
|
|
543
|
+
if (this.internalPromise) {
|
|
544
|
+
return this.internalPromise.then(func);
|
|
545
|
+
} else {
|
|
546
|
+
this.thenFunction = func;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
reject(func) {
|
|
550
|
+
if (this.internalPromise) {
|
|
551
|
+
return this.internalPromise.reject(func);
|
|
552
|
+
} else {
|
|
553
|
+
this.rejectFunction = func;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
514
557
|
/**
|
|
515
|
-
* Creates an immutable series loader object which loads each series sequentially using the iterator interface
|
|
558
|
+
* Creates an immutable series loader object which loads each series sequentially using the iterator interface.
|
|
559
|
+
*
|
|
516
560
|
* @param {DICOMWebClient} dicomWebClient The DICOMWebClient instance to be used for series load
|
|
517
561
|
* @param {string} studyInstanceUID The Study Instance UID from which series will be loaded
|
|
518
562
|
* @param {Array} seriesInstanceUIDList A list of Series Instance UIDs
|
|
563
|
+
*
|
|
519
564
|
* @returns {Object} Returns an object which supports loading of instances from each of given Series Instance UID
|
|
520
565
|
*/
|
|
521
566
|
function makeSeriesAsyncLoader(client, studyInstanceUID, seriesInstanceUIDList) {
|
|
@@ -523,12 +568,20 @@ function makeSeriesAsyncLoader(client, studyInstanceUID, seriesInstanceUIDList)
|
|
|
523
568
|
hasNext() {
|
|
524
569
|
return seriesInstanceUIDList.length > 0;
|
|
525
570
|
},
|
|
526
|
-
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
571
|
+
next() {
|
|
572
|
+
const {
|
|
573
|
+
seriesInstanceUID,
|
|
574
|
+
metadata
|
|
575
|
+
} = seriesInstanceUIDList.shift();
|
|
576
|
+
const promise = new DeferredPromise();
|
|
577
|
+
promise.setMetadata(metadata);
|
|
578
|
+
promise.setProcessFunction(() => {
|
|
579
|
+
return client.retrieveSeriesMetadata({
|
|
580
|
+
studyInstanceUID,
|
|
581
|
+
seriesInstanceUID
|
|
582
|
+
});
|
|
531
583
|
});
|
|
584
|
+
return promise;
|
|
532
585
|
}
|
|
533
586
|
});
|
|
534
587
|
}
|
|
@@ -552,19 +605,22 @@ class RetrieveMetadataLoaderAsync extends RetrieveMetadataLoader {
|
|
|
552
605
|
} = {},
|
|
553
606
|
client
|
|
554
607
|
} = this;
|
|
608
|
+
|
|
609
|
+
// asking to include Series Date, Series Time, Series Description
|
|
610
|
+
// and Series Number in the series metadata returned to better sort series
|
|
611
|
+
// in preLoad function
|
|
612
|
+
let options = {
|
|
613
|
+
studyInstanceUID,
|
|
614
|
+
queryParams: {
|
|
615
|
+
includefield: includeField
|
|
616
|
+
}
|
|
617
|
+
};
|
|
555
618
|
if (seriesInstanceUID) {
|
|
556
|
-
|
|
557
|
-
studyInstanceUID,
|
|
558
|
-
queryParams: {
|
|
559
|
-
SeriesInstanceUID: seriesInstanceUID
|
|
560
|
-
}
|
|
561
|
-
};
|
|
619
|
+
options.queryParams.SeriesInstanceUID = seriesInstanceUID;
|
|
562
620
|
preLoaders.push(client.searchForSeries.bind(client, options));
|
|
563
621
|
}
|
|
564
622
|
// Fallback preloader
|
|
565
|
-
preLoaders.push(client.searchForSeries.bind(client,
|
|
566
|
-
studyInstanceUID
|
|
567
|
-
}));
|
|
623
|
+
preLoaders.push(client.searchForSeries.bind(client, options));
|
|
568
624
|
yield* preLoaders;
|
|
569
625
|
}
|
|
570
626
|
async preLoad() {
|
|
@@ -574,31 +630,36 @@ class RetrieveMetadataLoaderAsync extends RetrieveMetadataLoader {
|
|
|
574
630
|
const sortFunction = this.sortFunction;
|
|
575
631
|
const {
|
|
576
632
|
naturalizeDataset
|
|
577
|
-
} = dcmjs_es
|
|
633
|
+
} = dcmjs_es/* default.data */.Ay.data.DicomMetaDictionary;
|
|
578
634
|
const naturalized = result.map(naturalizeDataset);
|
|
579
|
-
return (0,sortStudy/* sortStudySeries */.
|
|
635
|
+
return (0,sortStudy/* sortStudySeries */.LM)(naturalized, sortCriteria, sortFunction);
|
|
580
636
|
}
|
|
581
637
|
async load(preLoadData) {
|
|
582
638
|
const {
|
|
583
639
|
client,
|
|
584
640
|
studyInstanceUID
|
|
585
641
|
} = this;
|
|
586
|
-
const seriesInstanceUIDs = preLoadData.map(
|
|
642
|
+
const seriesInstanceUIDs = preLoadData.map(seriesMetadata => {
|
|
643
|
+
return {
|
|
644
|
+
seriesInstanceUID: seriesMetadata.SeriesInstanceUID,
|
|
645
|
+
metadata: seriesMetadata
|
|
646
|
+
};
|
|
647
|
+
});
|
|
587
648
|
const seriesAsyncLoader = makeSeriesAsyncLoader(client, studyInstanceUID, seriesInstanceUIDs);
|
|
588
649
|
const promises = [];
|
|
589
650
|
while (seriesAsyncLoader.hasNext()) {
|
|
590
|
-
|
|
651
|
+
const promise = seriesAsyncLoader.next();
|
|
652
|
+
promises.push(promise);
|
|
591
653
|
}
|
|
592
654
|
return {
|
|
593
655
|
preLoadData,
|
|
594
656
|
promises
|
|
595
657
|
};
|
|
596
658
|
}
|
|
597
|
-
async posLoad(
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
} = _ref;
|
|
659
|
+
async posLoad({
|
|
660
|
+
preLoadData,
|
|
661
|
+
promises
|
|
662
|
+
}) {
|
|
602
663
|
return {
|
|
603
664
|
preLoadData,
|
|
604
665
|
promises
|
|
@@ -613,40 +674,91 @@ class RetrieveMetadataLoaderAsync extends RetrieveMetadataLoader {
|
|
|
613
674
|
* Retrieve Study metadata from a DICOM server. If the server is configured to use lazy load, only the first series
|
|
614
675
|
* will be loaded and the property "studyLoader" will be set to let consumer load remaining series as needed.
|
|
615
676
|
*
|
|
616
|
-
* @param {
|
|
617
|
-
* @param {
|
|
618
|
-
* @param {
|
|
619
|
-
* @param {
|
|
620
|
-
* @
|
|
677
|
+
* @param {*} dicomWebClient The DICOMWebClient instance to be used for series load
|
|
678
|
+
* @param {*} StudyInstanceUID The UID of the Study to be retrieved
|
|
679
|
+
* @param {*} enableStudyLazyLoad Whether the study metadata should be loaded asynchronously
|
|
680
|
+
* @param {object} filters Object containing filters to be applied on retrieve metadata process
|
|
681
|
+
* @param {string} [filters.seriesInstanceUID] Series instance uid to filter results against
|
|
682
|
+
* @param {array} [filters.SeriesInstanceUIDs] Series instance uids to filter results against
|
|
683
|
+
* @param {function} [sortCriteria] Sort criteria function
|
|
684
|
+
* @param {function} [sortFunction] Sort function
|
|
685
|
+
*
|
|
686
|
+
* @returns {Promise} A promises that resolves the study descriptor object
|
|
621
687
|
*/
|
|
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;
|
|
688
|
+
async function RetrieveMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters = {}, sortCriteria, sortFunction) {
|
|
626
689
|
const RetrieveMetadataLoader = enableStudyLazyLoad !== false ? RetrieveMetadataLoaderAsync : RetrieveMetadataLoaderSync;
|
|
627
|
-
const retrieveMetadataLoader = new RetrieveMetadataLoader(dicomWebClient,
|
|
690
|
+
const retrieveMetadataLoader = new RetrieveMetadataLoader(dicomWebClient, StudyInstanceUID, filters, sortCriteria, sortFunction);
|
|
628
691
|
const data = await retrieveMetadataLoader.execLoad();
|
|
629
692
|
return data;
|
|
630
693
|
}
|
|
631
694
|
/* harmony default export */ const retrieveMetadata = (RetrieveMetadata);
|
|
695
|
+
;// CONCATENATED MODULE: ../../../extensions/default/src/DicomWebDataSource/utils/retrieveMetadataFiltered.js
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Retrieve metadata filtered.
|
|
700
|
+
*
|
|
701
|
+
* @param {*} dicomWebClient The DICOMWebClient instance to be used for series load
|
|
702
|
+
* @param {*} StudyInstanceUID The UID of the Study to be retrieved
|
|
703
|
+
* @param {*} enableStudyLazyLoad Whether the study metadata should be loaded asynchronously
|
|
704
|
+
* @param {object} filters Object containing filters to be applied on retrieve metadata process
|
|
705
|
+
* @param {string} [filters.seriesInstanceUID] Series instance uid to filter results against
|
|
706
|
+
* @param {array} [filters.SeriesInstanceUIDs] Series instance uids to filter results against
|
|
707
|
+
* @param {function} [sortCriteria] Sort criteria function
|
|
708
|
+
* @param {function} [sortFunction] Sort function
|
|
709
|
+
*
|
|
710
|
+
* @returns
|
|
711
|
+
*/
|
|
712
|
+
function retrieveMetadataFiltered(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction) {
|
|
713
|
+
const {
|
|
714
|
+
SeriesInstanceUIDs
|
|
715
|
+
} = filters;
|
|
716
|
+
return new Promise((resolve, reject) => {
|
|
717
|
+
const promises = SeriesInstanceUIDs.map(uid => {
|
|
718
|
+
const seriesSpecificFilters = Object.assign({}, filters, {
|
|
719
|
+
seriesInstanceUID: uid
|
|
720
|
+
});
|
|
721
|
+
return retrieveMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, seriesSpecificFilters, sortCriteria, sortFunction);
|
|
722
|
+
});
|
|
723
|
+
Promise.all(promises).then(results => {
|
|
724
|
+
const aggregatedResult = {
|
|
725
|
+
preLoadData: [],
|
|
726
|
+
promises: []
|
|
727
|
+
};
|
|
728
|
+
results.forEach(({
|
|
729
|
+
preLoadData,
|
|
730
|
+
promises
|
|
731
|
+
}) => {
|
|
732
|
+
aggregatedResult.preLoadData = aggregatedResult.preLoadData.concat(preLoadData);
|
|
733
|
+
aggregatedResult.promises = aggregatedResult.promises.concat(promises);
|
|
734
|
+
});
|
|
735
|
+
resolve(aggregatedResult);
|
|
736
|
+
}, reject);
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
/* harmony default export */ const utils_retrieveMetadataFiltered = (retrieveMetadataFiltered);
|
|
632
740
|
;// CONCATENATED MODULE: ../../../extensions/default/src/DicomWebDataSource/retrieveStudyMetadata.js
|
|
633
741
|
|
|
742
|
+
|
|
634
743
|
const moduleName = 'RetrieveStudyMetadata';
|
|
635
744
|
// Cache for promises. Prevents unnecessary subsequent calls to the server
|
|
636
745
|
const StudyMetaDataPromises = new Map();
|
|
637
746
|
|
|
638
747
|
/**
|
|
639
|
-
* Retrieves study metadata
|
|
748
|
+
* Retrieves study metadata.
|
|
640
749
|
*
|
|
641
|
-
* @param {Object}
|
|
750
|
+
* @param {Object} dicomWebClient The DICOMWebClient instance to be used for series load
|
|
642
751
|
* @param {string} StudyInstanceUID The UID of the Study to be retrieved
|
|
643
|
-
* @param {boolean}
|
|
644
|
-
* @param {
|
|
645
|
-
* @param {
|
|
646
|
-
* @param {
|
|
752
|
+
* @param {boolean} enableStudyLazyLoad Whether the study metadata should be loaded asynchronously.
|
|
753
|
+
* @param {Object} [filters] Object containing filters to be applied on retrieve metadata process
|
|
754
|
+
* @param {string} [filters.seriesInstanceUID] Series instance uid to filter results against
|
|
755
|
+
* @param {array} [filters.SeriesInstanceUIDs] Series instance uids to filter results against
|
|
756
|
+
* @param {function} [sortCriteria] Sort criteria function
|
|
757
|
+
* @param {function} [sortFunction] Sort function
|
|
758
|
+
*
|
|
647
759
|
* @returns {Promise} that will be resolved with the metadata or rejected with the error
|
|
648
760
|
*/
|
|
649
|
-
function retrieveStudyMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction) {
|
|
761
|
+
function retrieveStudyMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction, dicomWebConfig = {}) {
|
|
650
762
|
// @TODO: Whenever a study metadata request has failed, its related promise will be rejected once and for all
|
|
651
763
|
// and further requests for that metadata will always fail. On failure, we probably need to remove the
|
|
652
764
|
// corresponding promise from the "StudyMetaDataPromises" map...
|
|
@@ -657,30 +769,34 @@ function retrieveStudyMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazy
|
|
|
657
769
|
if (!StudyInstanceUID) {
|
|
658
770
|
throw new Error(`${moduleName}: Required 'StudyInstanceUID' parameter not provided.`);
|
|
659
771
|
}
|
|
772
|
+
const promiseId = `${dicomWebConfig.name}:${StudyInstanceUID}`;
|
|
660
773
|
|
|
661
774
|
// Already waiting on result? Return cached promise
|
|
662
|
-
if (StudyMetaDataPromises.has(
|
|
663
|
-
return StudyMetaDataPromises.get(
|
|
775
|
+
if (StudyMetaDataPromises.has(promiseId)) {
|
|
776
|
+
return StudyMetaDataPromises.get(promiseId);
|
|
777
|
+
}
|
|
778
|
+
let promise;
|
|
779
|
+
if (filters && filters.SeriesInstanceUIDs) {
|
|
780
|
+
promise = utils_retrieveMetadataFiltered(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction);
|
|
781
|
+
} else {
|
|
782
|
+
// Create a promise to handle the data retrieval
|
|
783
|
+
promise = new Promise((resolve, reject) => {
|
|
784
|
+
retrieveMetadata(dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction).then(function (data) {
|
|
785
|
+
resolve(data);
|
|
786
|
+
}, reject);
|
|
787
|
+
});
|
|
664
788
|
}
|
|
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
789
|
|
|
673
790
|
// Store the promise in cache
|
|
674
|
-
StudyMetaDataPromises.set(
|
|
791
|
+
StudyMetaDataPromises.set(promiseId, promise);
|
|
675
792
|
return promise;
|
|
676
793
|
}
|
|
677
794
|
|
|
678
795
|
/**
|
|
679
796
|
* Delete the cached study metadata retrieval promise to ensure that the browser will
|
|
680
|
-
* re-retrieve the study metadata when it is next requested
|
|
797
|
+
* re-retrieve the study metadata when it is next requested.
|
|
681
798
|
*
|
|
682
799
|
* @param {String} StudyInstanceUID The UID of the Study to be removed from cache
|
|
683
|
-
*
|
|
684
800
|
*/
|
|
685
801
|
function deleteStudyMetadataPromise(StudyInstanceUID) {
|
|
686
802
|
if (StudyMetaDataPromises.has(StudyInstanceUID)) {
|
|
@@ -697,7 +813,8 @@ function deleteStudyMetadataPromise(StudyInstanceUID) {
|
|
|
697
813
|
* performing searches doesn't work. This version fixes the query issue
|
|
698
814
|
* by manually implementing a query option.
|
|
699
815
|
*/
|
|
700
|
-
|
|
816
|
+
|
|
817
|
+
class StaticWadoClient extends dicomweb_client_es/* api */.FH.DICOMwebClient {
|
|
701
818
|
constructor(qidoConfig) {
|
|
702
819
|
super(qidoConfig);
|
|
703
820
|
this.staticWado = qidoConfig.staticWado;
|
|
@@ -841,8 +958,7 @@ class StaticWadoClient extends dicomweb_client_es.api.DICOMwebClient {
|
|
|
841
958
|
/** Converts the query parameters to lower case query parameters */
|
|
842
959
|
toLowerParams(queryParams) {
|
|
843
960
|
const lowerParams = {};
|
|
844
|
-
Object.entries(queryParams).forEach(
|
|
845
|
-
let [key, value] = _ref;
|
|
961
|
+
Object.entries(queryParams).forEach(([key, value]) => {
|
|
846
962
|
lowerParams[key.toLowerCase()] = value;
|
|
847
963
|
});
|
|
848
964
|
return lowerParams;
|
|
@@ -904,7 +1020,11 @@ const getDirectURL = (config, params) => {
|
|
|
904
1020
|
}
|
|
905
1021
|
if (!singlepart || singlepart !== true && singlepart.indexOf(fetchPart) === -1) {
|
|
906
1022
|
if (value.retrieveBulkData) {
|
|
907
|
-
|
|
1023
|
+
// Try the specified retrieve type.
|
|
1024
|
+
const options = {
|
|
1025
|
+
mediaType: defaultType
|
|
1026
|
+
};
|
|
1027
|
+
return value.retrieveBulkData(options).then(arr => {
|
|
908
1028
|
value.DirectRetrieveURL = URL.createObjectURL(new Blob([arr], {
|
|
909
1029
|
type: defaultType
|
|
910
1030
|
}));
|
|
@@ -995,7 +1115,7 @@ function fixBulkDataURI(value, instance, dicomWebConfig) {
|
|
|
995
1115
|
const {
|
|
996
1116
|
DicomMetaDictionary,
|
|
997
1117
|
DicomDict
|
|
998
|
-
} = dcmjs_es
|
|
1118
|
+
} = dcmjs_es/* default.data */.Ay.data;
|
|
999
1119
|
const {
|
|
1000
1120
|
naturalizeDataset,
|
|
1001
1121
|
denaturalizeDataset
|
|
@@ -1006,26 +1126,47 @@ const EXPLICIT_VR_LITTLE_ENDIAN = '1.2.840.10008.1.2.1';
|
|
|
1006
1126
|
const metadataProvider = src.classes.MetadataProvider;
|
|
1007
1127
|
|
|
1008
1128
|
/**
|
|
1129
|
+
* Creates a DICOM Web API based on the provided configuration.
|
|
1009
1130
|
*
|
|
1010
|
-
* @param {
|
|
1011
|
-
* @param {string}
|
|
1012
|
-
* @param {string}
|
|
1013
|
-
* @param {string}
|
|
1014
|
-
* @param {
|
|
1015
|
-
* @param {string}
|
|
1016
|
-
* @param {
|
|
1017
|
-
* @param {
|
|
1018
|
-
* @param {
|
|
1019
|
-
* @param {
|
|
1131
|
+
* @param {object} dicomWebConfig - Configuration for the DICOM Web API
|
|
1132
|
+
* @param {string} dicomWebConfig.name - Data source name
|
|
1133
|
+
* @param {string} dicomWebConfig.wadoUriRoot - Legacy? (potentially unused/replaced)
|
|
1134
|
+
* @param {string} dicomWebConfig.qidoRoot - Base URL to use for QIDO requests
|
|
1135
|
+
* @param {string} dicomWebConfig.wadoRoot - Base URL to use for WADO requests
|
|
1136
|
+
* @param {string} dicomWebConfig.wadoUri - Base URL to use for WADO URI requests
|
|
1137
|
+
* @param {boolean} dicomWebConfig.qidoSupportsIncludeField - Whether QIDO supports the "Include" option to request additional fields in response
|
|
1138
|
+
* @param {string} dicomWebConfig.imageRendering - wadors | ? (unsure of where/how this is used)
|
|
1139
|
+
* @param {string} dicomWebConfig.thumbnailRendering - wadors | ? (unsure of where/how this is used)
|
|
1140
|
+
* @param {boolean} dicomWebConfig.supportsReject - Whether the server supports reject calls (i.e. DCM4CHEE)
|
|
1141
|
+
* @param {boolean} dicomWebConfig.lazyLoadStudy - "enableStudyLazyLoad"; Request series meta async instead of blocking
|
|
1142
|
+
* @param {string|boolean} dicomWebConfig.singlepart - indicates if the retrieves can fetch singlepart. Options are bulkdata, video, image, or boolean true
|
|
1143
|
+
* @param {string} dicomWebConfig.requestTransferSyntaxUID - Transfer syntax to request from the server
|
|
1144
|
+
* @param {object} dicomWebConfig.acceptHeader - Accept header to use for requests
|
|
1145
|
+
* @param {boolean} dicomWebConfig.omitQuotationForMultipartRequest - Whether to omit quotation marks for multipart requests
|
|
1146
|
+
* @param {boolean} dicomWebConfig.supportsFuzzyMatching - Whether the server supports fuzzy matching
|
|
1147
|
+
* @param {boolean} dicomWebConfig.supportsWildcard - Whether the server supports wildcard matching
|
|
1148
|
+
* @param {boolean} dicomWebConfig.supportsNativeDICOMModel - Whether the server supports the native DICOM model
|
|
1149
|
+
* @param {boolean} dicomWebConfig.enableStudyLazyLoad - Whether to enable study lazy loading
|
|
1150
|
+
* @param {boolean} dicomWebConfig.enableRequestTag - Whether to enable request tag
|
|
1151
|
+
* @param {boolean} dicomWebConfig.enableStudyLazyLoad - Whether to enable study lazy loading
|
|
1152
|
+
* @param {boolean} dicomWebConfig.bulkDataURI - Whether to enable bulkDataURI
|
|
1153
|
+
* @param {function} dicomWebConfig.onConfiguration - Function that is called after the configuration is initialized
|
|
1154
|
+
* @param {boolean} dicomWebConfig.staticWado - Whether to use the static WADO client
|
|
1155
|
+
* @param {object} userAuthenticationService - User authentication service
|
|
1156
|
+
* @param {object} userAuthenticationService.getAuthorizationHeader - Function that returns the authorization header
|
|
1157
|
+
* @returns {object} - DICOM Web API object
|
|
1020
1158
|
*/
|
|
1021
|
-
function createDicomWebApi(dicomWebConfig,
|
|
1159
|
+
function createDicomWebApi(dicomWebConfig, servicesManager) {
|
|
1160
|
+
const {
|
|
1161
|
+
userAuthenticationService,
|
|
1162
|
+
customizationService
|
|
1163
|
+
} = servicesManager.services;
|
|
1022
1164
|
let dicomWebConfigCopy, qidoConfig, wadoConfig, qidoDicomWebClient, wadoDicomWebClient, getAuthrorizationHeader, generateWadoHeader;
|
|
1023
1165
|
const implementation = {
|
|
1024
|
-
initialize:
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
} = _ref;
|
|
1166
|
+
initialize: ({
|
|
1167
|
+
params,
|
|
1168
|
+
query
|
|
1169
|
+
}) => {
|
|
1029
1170
|
if (dicomWebConfig.onConfiguration && typeof dicomWebConfig.onConfiguration === 'function') {
|
|
1030
1171
|
dicomWebConfig = dicomWebConfig.onConfiguration(dicomWebConfig, {
|
|
1031
1172
|
params,
|
|
@@ -1055,20 +1196,20 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1055
1196
|
staticWado: dicomWebConfig.staticWado,
|
|
1056
1197
|
singlepart: dicomWebConfig.singlepart,
|
|
1057
1198
|
headers: userAuthenticationService.getAuthorizationHeader(),
|
|
1058
|
-
errorInterceptor: src/* errorHandler */.
|
|
1199
|
+
errorInterceptor: src/* errorHandler */.r_.getHTTPErrorHandler()
|
|
1059
1200
|
};
|
|
1060
1201
|
wadoConfig = {
|
|
1061
1202
|
url: dicomWebConfig.wadoRoot,
|
|
1062
1203
|
staticWado: dicomWebConfig.staticWado,
|
|
1063
1204
|
singlepart: dicomWebConfig.singlepart,
|
|
1064
1205
|
headers: userAuthenticationService.getAuthorizationHeader(),
|
|
1065
|
-
errorInterceptor: src/* errorHandler */.
|
|
1206
|
+
errorInterceptor: src/* errorHandler */.r_.getHTTPErrorHandler()
|
|
1066
1207
|
};
|
|
1067
1208
|
|
|
1068
1209
|
// TODO -> Two clients sucks, but its better than 1000.
|
|
1069
1210
|
// TODO -> We'll need to merge auth later.
|
|
1070
|
-
qidoDicomWebClient = dicomWebConfig.staticWado ? new StaticWadoClient(qidoConfig) : new dicomweb_client_es
|
|
1071
|
-
wadoDicomWebClient = dicomWebConfig.staticWado ? new StaticWadoClient(wadoConfig) : new dicomweb_client_es
|
|
1211
|
+
qidoDicomWebClient = dicomWebConfig.staticWado ? new StaticWadoClient(qidoConfig) : new dicomweb_client_es/* api */.FH.DICOMwebClient(qidoConfig);
|
|
1212
|
+
wadoDicomWebClient = dicomWebConfig.staticWado ? new StaticWadoClient(wadoConfig) : new dicomweb_client_es/* api */.FH.DICOMwebClient(wadoConfig);
|
|
1072
1213
|
},
|
|
1073
1214
|
query: {
|
|
1074
1215
|
studies: {
|
|
@@ -1097,11 +1238,10 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1097
1238
|
}
|
|
1098
1239
|
// processResults: processResults.bind(),
|
|
1099
1240
|
},
|
|
1100
|
-
|
|
1101
1241
|
instances: {
|
|
1102
1242
|
search: (studyInstanceUid, queryParameters) => {
|
|
1103
1243
|
qidoDicomWebClient.headers = getAuthrorizationHeader();
|
|
1104
|
-
search.call(undefined, qidoDicomWebClient, studyInstanceUid, null, queryParameters);
|
|
1244
|
+
return search.call(undefined, qidoDicomWebClient, studyInstanceUid, null, queryParameters);
|
|
1105
1245
|
}
|
|
1106
1246
|
}
|
|
1107
1247
|
},
|
|
@@ -1123,11 +1263,10 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1123
1263
|
singlepart: dicomWebConfig.singlepart
|
|
1124
1264
|
}, params);
|
|
1125
1265
|
},
|
|
1126
|
-
bulkDataURI: async
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
} = _ref2;
|
|
1266
|
+
bulkDataURI: async ({
|
|
1267
|
+
StudyInstanceUID,
|
|
1268
|
+
BulkDataURI
|
|
1269
|
+
}) => {
|
|
1131
1270
|
qidoDicomWebClient.headers = getAuthrorizationHeader();
|
|
1132
1271
|
const options = {
|
|
1133
1272
|
multipart: false,
|
|
@@ -1140,26 +1279,26 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1140
1279
|
});
|
|
1141
1280
|
},
|
|
1142
1281
|
series: {
|
|
1143
|
-
metadata: async
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1282
|
+
metadata: async ({
|
|
1283
|
+
StudyInstanceUID,
|
|
1284
|
+
filters,
|
|
1285
|
+
sortCriteria,
|
|
1286
|
+
sortFunction,
|
|
1287
|
+
madeInClient = false,
|
|
1288
|
+
returnPromises = false
|
|
1289
|
+
} = {}) => {
|
|
1151
1290
|
if (!StudyInstanceUID) {
|
|
1152
1291
|
throw new Error('Unable to query for SeriesMetadata without StudyInstanceUID');
|
|
1153
1292
|
}
|
|
1154
1293
|
if (dicomWebConfig.enableStudyLazyLoad) {
|
|
1155
|
-
return implementation._retrieveSeriesMetadataAsync(StudyInstanceUID, filters, sortCriteria, sortFunction, madeInClient);
|
|
1294
|
+
return implementation._retrieveSeriesMetadataAsync(StudyInstanceUID, filters, sortCriteria, sortFunction, madeInClient, returnPromises);
|
|
1156
1295
|
}
|
|
1157
1296
|
return implementation._retrieveSeriesMetadataSync(StudyInstanceUID, filters, sortCriteria, sortFunction, madeInClient);
|
|
1158
1297
|
}
|
|
1159
1298
|
}
|
|
1160
1299
|
},
|
|
1161
1300
|
store: {
|
|
1162
|
-
dicom: async (dataset, request) => {
|
|
1301
|
+
dicom: async (dataset, request, dicomDict) => {
|
|
1163
1302
|
wadoDicomWebClient.headers = getAuthrorizationHeader();
|
|
1164
1303
|
if (dataset instanceof ArrayBuffer) {
|
|
1165
1304
|
const options = {
|
|
@@ -1168,18 +1307,22 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1168
1307
|
};
|
|
1169
1308
|
await wadoDicomWebClient.storeInstances(options);
|
|
1170
1309
|
} else {
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1310
|
+
let effectiveDicomDict = dicomDict;
|
|
1311
|
+
if (!dicomDict) {
|
|
1312
|
+
const meta = {
|
|
1313
|
+
FileMetaInformationVersion: dataset._meta?.FileMetaInformationVersion?.Value,
|
|
1314
|
+
MediaStorageSOPClassUID: dataset.SOPClassUID,
|
|
1315
|
+
MediaStorageSOPInstanceUID: dataset.SOPInstanceUID,
|
|
1316
|
+
TransferSyntaxUID: EXPLICIT_VR_LITTLE_ENDIAN,
|
|
1317
|
+
ImplementationClassUID,
|
|
1318
|
+
ImplementationVersionName
|
|
1319
|
+
};
|
|
1320
|
+
const denaturalized = denaturalizeDataset(meta);
|
|
1321
|
+
const defaultDicomDict = new DicomDict(denaturalized);
|
|
1322
|
+
defaultDicomDict.dict = denaturalizeDataset(dataset);
|
|
1323
|
+
effectiveDicomDict = defaultDicomDict;
|
|
1324
|
+
}
|
|
1325
|
+
const part10Buffer = effectiveDicomDict.write();
|
|
1183
1326
|
const options = {
|
|
1184
1327
|
datasets: [part10Buffer],
|
|
1185
1328
|
request
|
|
@@ -1192,7 +1335,7 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1192
1335
|
const enableStudyLazyLoad = false;
|
|
1193
1336
|
wadoDicomWebClient.headers = generateWadoHeader();
|
|
1194
1337
|
// data is all SOPInstanceUIDs
|
|
1195
|
-
const data = await retrieveStudyMetadata(wadoDicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction);
|
|
1338
|
+
const data = await retrieveStudyMetadata(wadoDicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction, dicomWebConfig);
|
|
1196
1339
|
|
|
1197
1340
|
// first naturalize the data
|
|
1198
1341
|
const naturalizedInstancesMetadata = data.map(naturalizeDataset);
|
|
@@ -1233,16 +1376,16 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1233
1376
|
const seriesMetadata = Object.values(seriesSummaryMetadata);
|
|
1234
1377
|
src.DicomMetadataStore.addSeriesMetadata(seriesMetadata, madeInClient);
|
|
1235
1378
|
Object.keys(instancesPerSeries).forEach(seriesInstanceUID => src.DicomMetadataStore.addInstances(instancesPerSeries[seriesInstanceUID], madeInClient));
|
|
1379
|
+
return seriesSummaryMetadata;
|
|
1236
1380
|
},
|
|
1237
|
-
_retrieveSeriesMetadataAsync: async
|
|
1238
|
-
let madeInClient = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
1381
|
+
_retrieveSeriesMetadataAsync: async (StudyInstanceUID, filters, sortCriteria, sortFunction, madeInClient = false, returnPromises = false) => {
|
|
1239
1382
|
const enableStudyLazyLoad = true;
|
|
1240
1383
|
wadoDicomWebClient.headers = generateWadoHeader();
|
|
1241
1384
|
// Get Series
|
|
1242
1385
|
const {
|
|
1243
1386
|
preLoadData: seriesSummaryMetadata,
|
|
1244
1387
|
promises: seriesPromises
|
|
1245
|
-
} = await retrieveStudyMetadata(wadoDicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction);
|
|
1388
|
+
} = await retrieveStudyMetadata(wadoDicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction, dicomWebConfig);
|
|
1246
1389
|
|
|
1247
1390
|
/**
|
|
1248
1391
|
* naturalizes the dataset, and adds a retrieve bulkdata method
|
|
@@ -1264,10 +1407,13 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1264
1407
|
// in which case it isn't necessary to re-read this.
|
|
1265
1408
|
if (value && value.BulkDataURI && !value.Value) {
|
|
1266
1409
|
// Provide a method to fetch bulkdata
|
|
1267
|
-
value.retrieveBulkData = () => {
|
|
1410
|
+
value.retrieveBulkData = (options = {}) => {
|
|
1268
1411
|
// handle the scenarios where bulkDataURI is relative path
|
|
1269
1412
|
fixBulkDataURI(value, naturalized, dicomWebConfig);
|
|
1270
|
-
const
|
|
1413
|
+
const {
|
|
1414
|
+
mediaType
|
|
1415
|
+
} = options;
|
|
1416
|
+
const useOptions = {
|
|
1271
1417
|
// The bulkdata fetches work with either multipart or
|
|
1272
1418
|
// singlepart, so set multipart to false to let the server
|
|
1273
1419
|
// decide which type to respond with.
|
|
@@ -1277,10 +1423,16 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1277
1423
|
// is relative - that isn't disallowed by DICOMweb, but
|
|
1278
1424
|
// isn't well specified in the standard, but is needed in
|
|
1279
1425
|
// any implementation that stores static copies of the metadata
|
|
1280
|
-
StudyInstanceUID: naturalized.StudyInstanceUID
|
|
1426
|
+
StudyInstanceUID: naturalized.StudyInstanceUID,
|
|
1427
|
+
mediaTypes: mediaType ? [{
|
|
1428
|
+
mediaType
|
|
1429
|
+
}, {
|
|
1430
|
+
mediaType: 'application/octet-stream'
|
|
1431
|
+
}] : undefined,
|
|
1432
|
+
...options
|
|
1281
1433
|
};
|
|
1282
1434
|
// Todo: this needs to be from wado dicom web client
|
|
1283
|
-
return qidoDicomWebClient.retrieveBulkData(
|
|
1435
|
+
return qidoDicomWebClient.retrieveBulkData(useOptions).then(val => {
|
|
1284
1436
|
// There are DICOM PDF cases where the first ArrayBuffer in the array is
|
|
1285
1437
|
// the bulk data and DICOM video cases where the second ArrayBuffer is
|
|
1286
1438
|
// the bulk data. Here we play it safe and do a find.
|
|
@@ -1299,7 +1451,7 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1299
1451
|
const naturalizedInstances = instances.map(addRetrieveBulkData);
|
|
1300
1452
|
|
|
1301
1453
|
// Adding instanceMetadata to OHIF MetadataProvider
|
|
1302
|
-
naturalizedInstances.forEach(
|
|
1454
|
+
naturalizedInstances.forEach(instance => {
|
|
1303
1455
|
instance.wadoRoot = dicomWebConfig.wadoRoot;
|
|
1304
1456
|
instance.wadoUri = dicomWebConfig.wadoUri;
|
|
1305
1457
|
const imageId = implementation.getImageIdsForInstance({
|
|
@@ -1323,7 +1475,10 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1323
1475
|
src.DicomMetadataStore.addInstances(naturalizedInstances, madeInClient);
|
|
1324
1476
|
}
|
|
1325
1477
|
function setSuccessFlag() {
|
|
1326
|
-
const study = src.DicomMetadataStore.getStudy(StudyInstanceUID
|
|
1478
|
+
const study = src.DicomMetadataStore.getStudy(StudyInstanceUID);
|
|
1479
|
+
if (!study) {
|
|
1480
|
+
return;
|
|
1481
|
+
}
|
|
1327
1482
|
study.isLoaded = true;
|
|
1328
1483
|
}
|
|
1329
1484
|
|
|
@@ -1333,11 +1488,22 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1333
1488
|
aSeries.StudyInstanceUID = StudyInstanceUID;
|
|
1334
1489
|
});
|
|
1335
1490
|
src.DicomMetadataStore.addSeriesMetadata(seriesSummaryMetadata, madeInClient);
|
|
1336
|
-
const seriesDeliveredPromises = seriesPromises.map(promise =>
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1491
|
+
const seriesDeliveredPromises = seriesPromises.map(promise => {
|
|
1492
|
+
if (!returnPromises) {
|
|
1493
|
+
promise?.start();
|
|
1494
|
+
}
|
|
1495
|
+
return promise.then(instances => {
|
|
1496
|
+
storeInstances(instances);
|
|
1497
|
+
});
|
|
1498
|
+
});
|
|
1499
|
+
if (returnPromises) {
|
|
1500
|
+
Promise.all(seriesDeliveredPromises).then(() => setSuccessFlag());
|
|
1501
|
+
return seriesPromises;
|
|
1502
|
+
} else {
|
|
1503
|
+
await Promise.all(seriesDeliveredPromises);
|
|
1504
|
+
setSuccessFlag();
|
|
1505
|
+
}
|
|
1506
|
+
return seriesSummaryMetadata;
|
|
1341
1507
|
},
|
|
1342
1508
|
deleteStudyMetadataPromise: deleteStudyMetadataPromise,
|
|
1343
1509
|
getImageIdsForDisplaySet(displaySet) {
|
|
@@ -1365,11 +1531,10 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1365
1531
|
});
|
|
1366
1532
|
return imageIds;
|
|
1367
1533
|
},
|
|
1368
|
-
getImageIdsForInstance(
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
} = _ref3;
|
|
1534
|
+
getImageIdsForInstance({
|
|
1535
|
+
instance,
|
|
1536
|
+
frame = undefined
|
|
1537
|
+
}) {
|
|
1373
1538
|
const imageIds = getImageId({
|
|
1374
1539
|
instance,
|
|
1375
1540
|
frame,
|
|
@@ -1380,11 +1545,10 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1380
1545
|
getConfig() {
|
|
1381
1546
|
return dicomWebConfigCopy;
|
|
1382
1547
|
},
|
|
1383
|
-
getStudyInstanceUIDs(
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
} = _ref4;
|
|
1548
|
+
getStudyInstanceUIDs({
|
|
1549
|
+
params,
|
|
1550
|
+
query
|
|
1551
|
+
}) {
|
|
1388
1552
|
const {
|
|
1389
1553
|
StudyInstanceUIDs: paramsStudyInstanceUIDs
|
|
1390
1554
|
} = params;
|
|
@@ -1397,7 +1561,7 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1397
1561
|
if (dicomWebConfig.supportsReject) {
|
|
1398
1562
|
implementation.reject = dcm4cheeReject(dicomWebConfig.wadoRoot);
|
|
1399
1563
|
}
|
|
1400
|
-
return src/* IWebApiDataSource */.
|
|
1564
|
+
return src/* IWebApiDataSource */.pt.create(implementation);
|
|
1401
1565
|
}
|
|
1402
1566
|
|
|
1403
1567
|
;// CONCATENATED MODULE: ../../../extensions/default/src/DicomJSONDataSource/index.js
|
|
@@ -1405,7 +1569,7 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
|
|
|
1405
1569
|
|
|
1406
1570
|
|
|
1407
1571
|
|
|
1408
|
-
const DicomJSONDataSource_metadataProvider = src
|
|
1572
|
+
const DicomJSONDataSource_metadataProvider = src/* default.classes */.Ay.classes.MetadataProvider;
|
|
1409
1573
|
const mappings = {
|
|
1410
1574
|
studyInstanceUid: 'StudyInstanceUID',
|
|
1411
1575
|
patientId: 'PatientID'
|
|
@@ -1423,7 +1587,20 @@ let _store = {
|
|
|
1423
1587
|
// }
|
|
1424
1588
|
// }
|
|
1425
1589
|
};
|
|
1426
|
-
|
|
1590
|
+
function wrapSequences(obj) {
|
|
1591
|
+
return Object.keys(obj).reduce((acc, key) => {
|
|
1592
|
+
if (typeof obj[key] === 'object' && obj[key] !== null) {
|
|
1593
|
+
// Recursively wrap sequences for nested objects
|
|
1594
|
+
acc[key] = wrapSequences(obj[key]);
|
|
1595
|
+
} else {
|
|
1596
|
+
acc[key] = obj[key];
|
|
1597
|
+
}
|
|
1598
|
+
if (key.endsWith('Sequence')) {
|
|
1599
|
+
acc[key] = src/* default.utils */.Ay.utils.addAccessors(acc[key]);
|
|
1600
|
+
}
|
|
1601
|
+
return acc;
|
|
1602
|
+
}, Array.isArray(obj) ? [] : {});
|
|
1603
|
+
}
|
|
1427
1604
|
const getMetaDataByURL = url => {
|
|
1428
1605
|
return _store.urls.find(metaData => metaData.url === url);
|
|
1429
1606
|
};
|
|
@@ -1443,11 +1620,10 @@ function createDicomJSONApi(dicomJsonConfig) {
|
|
|
1443
1620
|
wadoRoot
|
|
1444
1621
|
} = dicomJsonConfig;
|
|
1445
1622
|
const implementation = {
|
|
1446
|
-
initialize: async
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
} = _ref;
|
|
1623
|
+
initialize: async ({
|
|
1624
|
+
query,
|
|
1625
|
+
url
|
|
1626
|
+
}) => {
|
|
1451
1627
|
if (!url) {
|
|
1452
1628
|
url = query.get('url');
|
|
1453
1629
|
}
|
|
@@ -1548,12 +1724,11 @@ function createDicomJSONApi(dicomJsonConfig) {
|
|
|
1548
1724
|
return utils_getDirectURL(wadoRoot, params);
|
|
1549
1725
|
},
|
|
1550
1726
|
series: {
|
|
1551
|
-
metadata: async
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1727
|
+
metadata: async ({
|
|
1728
|
+
StudyInstanceUID,
|
|
1729
|
+
madeInClient = false,
|
|
1730
|
+
customSort
|
|
1731
|
+
} = {}) => {
|
|
1557
1732
|
if (!StudyInstanceUID) {
|
|
1558
1733
|
throw new Error('Unable to query for SeriesMetadata without StudyInstanceUID');
|
|
1559
1734
|
}
|
|
@@ -1585,8 +1760,13 @@ function createDicomJSONApi(dicomJsonConfig) {
|
|
|
1585
1760
|
const numberOfSeries = series.length;
|
|
1586
1761
|
series.forEach((series, index) => {
|
|
1587
1762
|
const instances = series.instances.map(instance => {
|
|
1763
|
+
// for instance.metadata if the key ends with sequence then
|
|
1764
|
+
// we need to add a proxy to the first item in the sequence
|
|
1765
|
+
// so that we can access the value of the sequence
|
|
1766
|
+
// by using sequenceName.value
|
|
1767
|
+
const modifiedMetadata = wrapSequences(instance.metadata);
|
|
1588
1768
|
const obj = {
|
|
1589
|
-
...
|
|
1769
|
+
...modifiedMetadata,
|
|
1590
1770
|
url: instance.url,
|
|
1591
1771
|
imageId: instance.url,
|
|
1592
1772
|
...series,
|
|
@@ -1636,34 +1816,32 @@ function createDicomJSONApi(dicomJsonConfig) {
|
|
|
1636
1816
|
});
|
|
1637
1817
|
return imageIds;
|
|
1638
1818
|
},
|
|
1639
|
-
getImageIdsForInstance(
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
} = _ref2;
|
|
1819
|
+
getImageIdsForInstance({
|
|
1820
|
+
instance,
|
|
1821
|
+
frame
|
|
1822
|
+
}) {
|
|
1644
1823
|
const imageIds = getImageId({
|
|
1645
1824
|
instance,
|
|
1646
1825
|
frame
|
|
1647
1826
|
});
|
|
1648
1827
|
return imageIds;
|
|
1649
1828
|
},
|
|
1650
|
-
getStudyInstanceUIDs:
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
} = _ref3;
|
|
1829
|
+
getStudyInstanceUIDs: ({
|
|
1830
|
+
params,
|
|
1831
|
+
query
|
|
1832
|
+
}) => {
|
|
1655
1833
|
const url = query.get('url');
|
|
1656
1834
|
return _store.studyInstanceUIDMap.get(url);
|
|
1657
1835
|
}
|
|
1658
1836
|
};
|
|
1659
|
-
return src/* IWebApiDataSource */.
|
|
1837
|
+
return src/* IWebApiDataSource */.pt.create(implementation);
|
|
1660
1838
|
}
|
|
1661
1839
|
|
|
1662
1840
|
;// CONCATENATED MODULE: ../../../extensions/default/src/DicomLocalDataSource/index.js
|
|
1663
1841
|
|
|
1664
1842
|
|
|
1665
1843
|
|
|
1666
|
-
const DicomLocalDataSource_metadataProvider = src
|
|
1844
|
+
const DicomLocalDataSource_metadataProvider = src/* default.classes */.Ay.classes.MetadataProvider;
|
|
1667
1845
|
const {
|
|
1668
1846
|
EVENTS
|
|
1669
1847
|
} = src.DicomMetadataStore;
|
|
@@ -1672,8 +1850,7 @@ const END_MODALITIES = {
|
|
|
1672
1850
|
SEG: true,
|
|
1673
1851
|
DOC: true
|
|
1674
1852
|
};
|
|
1675
|
-
const compareValue =
|
|
1676
|
-
let def = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1853
|
+
const compareValue = (v1, v2, def = 0) => {
|
|
1677
1854
|
if (v1 === v2) {
|
|
1678
1855
|
return def;
|
|
1679
1856
|
}
|
|
@@ -1705,12 +1882,10 @@ function createDicomLocalApi(dicomLocalConfig) {
|
|
|
1705
1882
|
name
|
|
1706
1883
|
} = dicomLocalConfig;
|
|
1707
1884
|
const implementation = {
|
|
1708
|
-
initialize:
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
} = _ref;
|
|
1713
|
-
},
|
|
1885
|
+
initialize: ({
|
|
1886
|
+
params,
|
|
1887
|
+
query
|
|
1888
|
+
}) => {},
|
|
1714
1889
|
query: {
|
|
1715
1890
|
studies: {
|
|
1716
1891
|
mapParams: () => {},
|
|
@@ -1789,11 +1964,10 @@ function createDicomLocalApi(dicomLocalConfig) {
|
|
|
1789
1964
|
}
|
|
1790
1965
|
},
|
|
1791
1966
|
series: {
|
|
1792
|
-
metadata: async
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1967
|
+
metadata: async ({
|
|
1968
|
+
StudyInstanceUID,
|
|
1969
|
+
madeInClient = false
|
|
1970
|
+
} = {}) => {
|
|
1797
1971
|
if (!StudyInstanceUID) {
|
|
1798
1972
|
throw new Error('Unable to query for SeriesMetadata without StudyInstanceUID');
|
|
1799
1973
|
}
|
|
@@ -1839,7 +2013,7 @@ function createDicomLocalApi(dicomLocalConfig) {
|
|
|
1839
2013
|
},
|
|
1840
2014
|
store: {
|
|
1841
2015
|
dicom: naturalizedReport => {
|
|
1842
|
-
const reportBlob = dcmjs_es
|
|
2016
|
+
const reportBlob = dcmjs_es/* default.data */.Ay.data.datasetToBlob(naturalizedReport);
|
|
1843
2017
|
|
|
1844
2018
|
//Create a URL for the binary.
|
|
1845
2019
|
var objectUrl = URL.createObjectURL(reportBlob);
|
|
@@ -1872,11 +2046,10 @@ function createDicomLocalApi(dicomLocalConfig) {
|
|
|
1872
2046
|
});
|
|
1873
2047
|
return imageIds;
|
|
1874
2048
|
},
|
|
1875
|
-
getImageIdsForInstance(
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
} = _ref2;
|
|
2049
|
+
getImageIdsForInstance({
|
|
2050
|
+
instance,
|
|
2051
|
+
frame
|
|
2052
|
+
}) {
|
|
1880
2053
|
const {
|
|
1881
2054
|
StudyInstanceUID,
|
|
1882
2055
|
SeriesInstanceUID,
|
|
@@ -1892,11 +2065,10 @@ function createDicomLocalApi(dicomLocalConfig) {
|
|
|
1892
2065
|
deleteStudyMetadataPromise() {
|
|
1893
2066
|
console.log('deleteStudyMetadataPromise not implemented');
|
|
1894
2067
|
},
|
|
1895
|
-
getStudyInstanceUIDs:
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
} = _ref3;
|
|
2068
|
+
getStudyInstanceUIDs: ({
|
|
2069
|
+
params,
|
|
2070
|
+
query
|
|
2071
|
+
}) => {
|
|
1900
2072
|
const {
|
|
1901
2073
|
StudyInstanceUIDs: paramsStudyInstanceUIDs
|
|
1902
2074
|
} = params;
|
|
@@ -1916,7 +2088,7 @@ function createDicomLocalApi(dicomLocalConfig) {
|
|
|
1916
2088
|
return isStudyInCache ? StudyInstanceUIDsAsArray : [];
|
|
1917
2089
|
}
|
|
1918
2090
|
};
|
|
1919
|
-
return src/* IWebApiDataSource */.
|
|
2091
|
+
return src/* IWebApiDataSource */.pt.create(implementation);
|
|
1920
2092
|
}
|
|
1921
2093
|
|
|
1922
2094
|
;// CONCATENATED MODULE: ../../../extensions/default/src/DicomWebProxyDataSource/index.js
|
|
@@ -1931,17 +2103,16 @@ function createDicomLocalApi(dicomLocalConfig) {
|
|
|
1931
2103
|
* dicomWeb configuration array
|
|
1932
2104
|
*
|
|
1933
2105
|
*/
|
|
1934
|
-
function createDicomWebProxyApi(dicomWebProxyConfig,
|
|
2106
|
+
function createDicomWebProxyApi(dicomWebProxyConfig, servicesManager) {
|
|
1935
2107
|
const {
|
|
1936
2108
|
name
|
|
1937
2109
|
} = dicomWebProxyConfig;
|
|
1938
2110
|
let dicomWebDelegate = undefined;
|
|
1939
2111
|
const implementation = {
|
|
1940
|
-
initialize: async
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
} = _ref;
|
|
2112
|
+
initialize: async ({
|
|
2113
|
+
params,
|
|
2114
|
+
query
|
|
2115
|
+
}) => {
|
|
1945
2116
|
const url = query.get('url');
|
|
1946
2117
|
if (!url) {
|
|
1947
2118
|
throw new Error(`No url for '${name}'`);
|
|
@@ -1951,7 +2122,7 @@ function createDicomWebProxyApi(dicomWebProxyConfig, UserAuthenticationService)
|
|
|
1951
2122
|
if (!data.servers?.dicomWeb?.[0]) {
|
|
1952
2123
|
throw new Error('Invalid configuration returned by url');
|
|
1953
2124
|
}
|
|
1954
|
-
dicomWebDelegate = createDicomWebApi(data.servers.dicomWeb[0].configuration,
|
|
2125
|
+
dicomWebDelegate = createDicomWebApi(data.servers.dicomWeb[0].configuration, servicesManager);
|
|
1955
2126
|
dicomWebDelegate.initialize({
|
|
1956
2127
|
params,
|
|
1957
2128
|
query
|
|
@@ -1963,43 +2134,28 @@ function createDicomWebProxyApi(dicomWebProxyConfig, UserAuthenticationService)
|
|
|
1963
2134
|
search: params => dicomWebDelegate.query.studies.search(params)
|
|
1964
2135
|
},
|
|
1965
2136
|
series: {
|
|
1966
|
-
search:
|
|
1967
|
-
return dicomWebDelegate.query.series.search(...arguments);
|
|
1968
|
-
}
|
|
2137
|
+
search: (...args) => dicomWebDelegate.query.series.search(...args)
|
|
1969
2138
|
},
|
|
1970
2139
|
instances: {
|
|
1971
2140
|
search: (studyInstanceUid, queryParameters) => dicomWebDelegate.query.instances.search(studyInstanceUid, queryParameters)
|
|
1972
2141
|
}
|
|
1973
2142
|
},
|
|
1974
2143
|
retrieve: {
|
|
1975
|
-
directURL:
|
|
1976
|
-
return dicomWebDelegate.retrieve.directURL(...arguments);
|
|
1977
|
-
},
|
|
2144
|
+
directURL: (...args) => dicomWebDelegate.retrieve.directURL(...args),
|
|
1978
2145
|
series: {
|
|
1979
|
-
metadata: async
|
|
1980
|
-
return dicomWebDelegate.retrieve.series.metadata(...arguments);
|
|
1981
|
-
}
|
|
2146
|
+
metadata: async (...args) => dicomWebDelegate.retrieve.series.metadata(...args)
|
|
1982
2147
|
}
|
|
1983
2148
|
},
|
|
1984
2149
|
store: {
|
|
1985
|
-
dicom:
|
|
1986
|
-
return dicomWebDelegate.store(...arguments);
|
|
1987
|
-
}
|
|
2150
|
+
dicom: (...args) => dicomWebDelegate.store(...args)
|
|
1988
2151
|
},
|
|
1989
|
-
deleteStudyMetadataPromise:
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
return dicomWebDelegate.getImageIdsForInstance(...arguments);
|
|
1997
|
-
},
|
|
1998
|
-
getStudyInstanceUIDs(_ref2) {
|
|
1999
|
-
let {
|
|
2000
|
-
params,
|
|
2001
|
-
query
|
|
2002
|
-
} = _ref2;
|
|
2152
|
+
deleteStudyMetadataPromise: (...args) => dicomWebDelegate.deleteStudyMetadataPromise(...args),
|
|
2153
|
+
getImageIdsForDisplaySet: (...args) => dicomWebDelegate.getImageIdsForDisplaySet(...args),
|
|
2154
|
+
getImageIdsForInstance: (...args) => dicomWebDelegate.getImageIdsForInstance(...args),
|
|
2155
|
+
getStudyInstanceUIDs({
|
|
2156
|
+
params,
|
|
2157
|
+
query
|
|
2158
|
+
}) {
|
|
2003
2159
|
let studyInstanceUIDs = [];
|
|
2004
2160
|
|
|
2005
2161
|
// there seem to be a couple of variations of the case for this parameter
|
|
@@ -2011,7 +2167,278 @@ function createDicomWebProxyApi(dicomWebProxyConfig, UserAuthenticationService)
|
|
|
2011
2167
|
return studyInstanceUIDs;
|
|
2012
2168
|
}
|
|
2013
2169
|
};
|
|
2014
|
-
return src/* IWebApiDataSource */.
|
|
2170
|
+
return src/* IWebApiDataSource */.pt.create(implementation);
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
// EXTERNAL MODULE: ../../../node_modules/lodash/lodash.js
|
|
2174
|
+
var lodash = __webpack_require__(5517);
|
|
2175
|
+
;// CONCATENATED MODULE: ../../../extensions/default/src/MergeDataSource/index.ts
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
const mergeMap = {
|
|
2179
|
+
'query.studies.search': {
|
|
2180
|
+
mergeKey: 'studyInstanceUid',
|
|
2181
|
+
tagFunc: x => x
|
|
2182
|
+
},
|
|
2183
|
+
'query.series.search': {
|
|
2184
|
+
mergeKey: 'seriesInstanceUid',
|
|
2185
|
+
tagFunc: (series, sourceName) => {
|
|
2186
|
+
series.forEach(series => {
|
|
2187
|
+
series.RetrieveAETitle = sourceName;
|
|
2188
|
+
src.DicomMetadataStore.updateSeriesMetadata(series);
|
|
2189
|
+
});
|
|
2190
|
+
return series;
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
};
|
|
2194
|
+
|
|
2195
|
+
/**
|
|
2196
|
+
* Calls all data sources asynchronously and merges the results.
|
|
2197
|
+
* @param {CallForAllDataSourcesAsyncOptions} options - The options for calling all data sources.
|
|
2198
|
+
* @param {string} options.path - The path to the function to be called on each data source.
|
|
2199
|
+
* @param {unknown[]} options.args - The arguments to be passed to the function.
|
|
2200
|
+
* @param {ExtensionManager} options.extensionManager - The extension manager.
|
|
2201
|
+
* @param {string[]} options.dataSourceNames - The names of the data sources to be called.
|
|
2202
|
+
* @param {string} options.defaultDataSourceName - The name of the default data source.
|
|
2203
|
+
* @returns {Promise<unknown[]>} - A promise that resolves to the merged data from all data sources.
|
|
2204
|
+
*/
|
|
2205
|
+
const callForAllDataSourcesAsync = async ({
|
|
2206
|
+
mergeMap,
|
|
2207
|
+
path,
|
|
2208
|
+
args,
|
|
2209
|
+
extensionManager,
|
|
2210
|
+
dataSourceNames,
|
|
2211
|
+
defaultDataSourceName
|
|
2212
|
+
}) => {
|
|
2213
|
+
const {
|
|
2214
|
+
mergeKey,
|
|
2215
|
+
tagFunc
|
|
2216
|
+
} = mergeMap[path] || {
|
|
2217
|
+
tagFunc: x => x
|
|
2218
|
+
};
|
|
2219
|
+
|
|
2220
|
+
/** Sort by default data source */
|
|
2221
|
+
const defs = Object.values(extensionManager.dataSourceDefs);
|
|
2222
|
+
const defaultDataSourceDef = defs.find(def => def.sourceName === defaultDataSourceName);
|
|
2223
|
+
const dataSourceDefs = defs.filter(def => def.sourceName !== defaultDataSourceName);
|
|
2224
|
+
if (defaultDataSourceDef) {
|
|
2225
|
+
dataSourceDefs.unshift(defaultDataSourceDef);
|
|
2226
|
+
}
|
|
2227
|
+
const promises = [];
|
|
2228
|
+
const sourceNames = [];
|
|
2229
|
+
for (const dataSourceDef of dataSourceDefs) {
|
|
2230
|
+
const {
|
|
2231
|
+
configuration,
|
|
2232
|
+
sourceName
|
|
2233
|
+
} = dataSourceDef;
|
|
2234
|
+
if (!!configuration && dataSourceNames.includes(sourceName)) {
|
|
2235
|
+
const [dataSource] = extensionManager.getDataSources(sourceName);
|
|
2236
|
+
const func = (0,lodash.get)(dataSource, path);
|
|
2237
|
+
const promise = func.apply(dataSource, args);
|
|
2238
|
+
promises.push(promise);
|
|
2239
|
+
sourceNames.push(sourceName);
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
2242
|
+
const data = await Promise.allSettled(promises);
|
|
2243
|
+
const mergedData = data.map((data, i) => tagFunc(data.value, sourceNames[i]));
|
|
2244
|
+
let results = [];
|
|
2245
|
+
if (mergeKey) {
|
|
2246
|
+
results = (0,lodash.uniqBy)(mergedData.flat(), obj => (0,lodash.get)(obj, mergeKey));
|
|
2247
|
+
} else {
|
|
2248
|
+
results = mergedData.flat();
|
|
2249
|
+
}
|
|
2250
|
+
return results;
|
|
2251
|
+
};
|
|
2252
|
+
|
|
2253
|
+
/**
|
|
2254
|
+
* Calls all data sources that match the provided names and merges their data.
|
|
2255
|
+
* @param options - The options for calling all data sources.
|
|
2256
|
+
* @param options.path - The path to the function to be called on each data source.
|
|
2257
|
+
* @param options.args - The arguments to be passed to the function.
|
|
2258
|
+
* @param options.extensionManager - The extension manager instance.
|
|
2259
|
+
* @param options.dataSourceNames - The names of the data sources to be called.
|
|
2260
|
+
* @param options.defaultDataSourceName - The name of the default data source.
|
|
2261
|
+
* @returns The merged data from all the matching data sources.
|
|
2262
|
+
*/
|
|
2263
|
+
const callForAllDataSources = ({
|
|
2264
|
+
path,
|
|
2265
|
+
args,
|
|
2266
|
+
extensionManager,
|
|
2267
|
+
dataSourceNames,
|
|
2268
|
+
defaultDataSourceName
|
|
2269
|
+
}) => {
|
|
2270
|
+
/** Sort by default data source */
|
|
2271
|
+
const defs = Object.values(extensionManager.dataSourceDefs);
|
|
2272
|
+
const defaultDataSourceDef = defs.find(def => def.sourceName === defaultDataSourceName);
|
|
2273
|
+
const dataSourceDefs = defs.filter(def => def.sourceName !== defaultDataSourceName);
|
|
2274
|
+
if (defaultDataSourceDef) {
|
|
2275
|
+
dataSourceDefs.unshift(defaultDataSourceDef);
|
|
2276
|
+
}
|
|
2277
|
+
const mergedData = [];
|
|
2278
|
+
for (const dataSourceDef of dataSourceDefs) {
|
|
2279
|
+
const {
|
|
2280
|
+
configuration,
|
|
2281
|
+
sourceName
|
|
2282
|
+
} = dataSourceDef;
|
|
2283
|
+
if (!!configuration && dataSourceNames.includes(sourceName)) {
|
|
2284
|
+
const [dataSource] = extensionManager.getDataSources(sourceName);
|
|
2285
|
+
const func = (0,lodash.get)(dataSource, path);
|
|
2286
|
+
const data = func.apply(dataSource, args);
|
|
2287
|
+
mergedData.push(data);
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
return mergedData.flat();
|
|
2291
|
+
};
|
|
2292
|
+
|
|
2293
|
+
/**
|
|
2294
|
+
* Calls the default data source function specified by the given path with the provided arguments.
|
|
2295
|
+
* @param {CallForDefaultDataSourceOptions} options - The options for calling the default data source.
|
|
2296
|
+
* @param {string} options.path - The path to the function within the default data source.
|
|
2297
|
+
* @param {unknown[]} options.args - The arguments to pass to the function.
|
|
2298
|
+
* @param {string} options.defaultDataSourceName - The name of the default data source.
|
|
2299
|
+
* @param {ExtensionManager} options.extensionManager - The extension manager instance.
|
|
2300
|
+
* @returns {unknown} - The result of calling the default data source function.
|
|
2301
|
+
*/
|
|
2302
|
+
const callForDefaultDataSource = ({
|
|
2303
|
+
path,
|
|
2304
|
+
args,
|
|
2305
|
+
defaultDataSourceName,
|
|
2306
|
+
extensionManager
|
|
2307
|
+
}) => {
|
|
2308
|
+
const [dataSource] = extensionManager.getDataSources(defaultDataSourceName);
|
|
2309
|
+
const func = (0,lodash.get)(dataSource, path);
|
|
2310
|
+
return func.apply(dataSource, args);
|
|
2311
|
+
};
|
|
2312
|
+
|
|
2313
|
+
/**
|
|
2314
|
+
* Calls the data source specified by the RetrieveAETitle of the given display set.
|
|
2315
|
+
* @typedef {Object} CallByRetrieveAETitleOptions
|
|
2316
|
+
* @property {string} path - The path of the method to call on the data source.
|
|
2317
|
+
* @property {any[]} args - The arguments to pass to the method.
|
|
2318
|
+
* @property {string} defaultDataSourceName - The name of the default data source.
|
|
2319
|
+
* @property {ExtensionManager} extensionManager - The extension manager.
|
|
2320
|
+
*/
|
|
2321
|
+
const callByRetrieveAETitle = ({
|
|
2322
|
+
path,
|
|
2323
|
+
args,
|
|
2324
|
+
defaultDataSourceName,
|
|
2325
|
+
extensionManager
|
|
2326
|
+
}) => {
|
|
2327
|
+
const [displaySet] = args;
|
|
2328
|
+
const seriesMetadata = src.DicomMetadataStore.getSeries(displaySet.StudyInstanceUID, displaySet.SeriesInstanceUID);
|
|
2329
|
+
const [dataSource] = extensionManager.getDataSources(seriesMetadata.RetrieveAETitle || defaultDataSourceName);
|
|
2330
|
+
return dataSource[path](...args);
|
|
2331
|
+
};
|
|
2332
|
+
function createMergeDataSourceApi(mergeConfig, servicesManager, extensionManager) {
|
|
2333
|
+
const {
|
|
2334
|
+
seriesMerge
|
|
2335
|
+
} = mergeConfig;
|
|
2336
|
+
const {
|
|
2337
|
+
dataSourceNames,
|
|
2338
|
+
defaultDataSourceName
|
|
2339
|
+
} = seriesMerge;
|
|
2340
|
+
const implementation = {
|
|
2341
|
+
initialize: (...args) => callForAllDataSources({
|
|
2342
|
+
path: 'initialize',
|
|
2343
|
+
args,
|
|
2344
|
+
extensionManager,
|
|
2345
|
+
dataSourceNames,
|
|
2346
|
+
defaultDataSourceName
|
|
2347
|
+
}),
|
|
2348
|
+
query: {
|
|
2349
|
+
studies: {
|
|
2350
|
+
search: (...args) => callForAllDataSourcesAsync({
|
|
2351
|
+
mergeMap,
|
|
2352
|
+
path: 'query.studies.search',
|
|
2353
|
+
args,
|
|
2354
|
+
extensionManager,
|
|
2355
|
+
dataSourceNames,
|
|
2356
|
+
defaultDataSourceName
|
|
2357
|
+
})
|
|
2358
|
+
},
|
|
2359
|
+
series: {
|
|
2360
|
+
search: (...args) => callForAllDataSourcesAsync({
|
|
2361
|
+
mergeMap,
|
|
2362
|
+
path: 'query.series.search',
|
|
2363
|
+
args,
|
|
2364
|
+
extensionManager,
|
|
2365
|
+
dataSourceNames,
|
|
2366
|
+
defaultDataSourceName
|
|
2367
|
+
})
|
|
2368
|
+
},
|
|
2369
|
+
instances: {
|
|
2370
|
+
search: (...args) => callForAllDataSourcesAsync({
|
|
2371
|
+
mergeMap,
|
|
2372
|
+
path: 'query.instances.search',
|
|
2373
|
+
args,
|
|
2374
|
+
extensionManager,
|
|
2375
|
+
dataSourceNames,
|
|
2376
|
+
defaultDataSourceName
|
|
2377
|
+
})
|
|
2378
|
+
}
|
|
2379
|
+
},
|
|
2380
|
+
retrieve: {
|
|
2381
|
+
bulkDataURI: (...args) => callForAllDataSourcesAsync({
|
|
2382
|
+
mergeMap,
|
|
2383
|
+
path: 'retrieve.bulkDataURI',
|
|
2384
|
+
args,
|
|
2385
|
+
extensionManager,
|
|
2386
|
+
dataSourceNames,
|
|
2387
|
+
defaultDataSourceName
|
|
2388
|
+
}),
|
|
2389
|
+
directURL: (...args) => callForDefaultDataSource({
|
|
2390
|
+
path: 'retrieve.directURL',
|
|
2391
|
+
args,
|
|
2392
|
+
defaultDataSourceName,
|
|
2393
|
+
extensionManager
|
|
2394
|
+
}),
|
|
2395
|
+
series: {
|
|
2396
|
+
metadata: (...args) => callForAllDataSourcesAsync({
|
|
2397
|
+
mergeMap,
|
|
2398
|
+
path: 'retrieve.series.metadata',
|
|
2399
|
+
args,
|
|
2400
|
+
extensionManager,
|
|
2401
|
+
dataSourceNames,
|
|
2402
|
+
defaultDataSourceName
|
|
2403
|
+
})
|
|
2404
|
+
}
|
|
2405
|
+
},
|
|
2406
|
+
store: {
|
|
2407
|
+
dicom: (...args) => callForDefaultDataSource({
|
|
2408
|
+
path: 'store.dicom',
|
|
2409
|
+
args,
|
|
2410
|
+
defaultDataSourceName,
|
|
2411
|
+
extensionManager
|
|
2412
|
+
})
|
|
2413
|
+
},
|
|
2414
|
+
deleteStudyMetadataPromise: (...args) => callForAllDataSources({
|
|
2415
|
+
path: 'deleteStudyMetadataPromise',
|
|
2416
|
+
args,
|
|
2417
|
+
extensionManager,
|
|
2418
|
+
dataSourceNames,
|
|
2419
|
+
defaultDataSourceName
|
|
2420
|
+
}),
|
|
2421
|
+
getImageIdsForDisplaySet: (...args) => callByRetrieveAETitle({
|
|
2422
|
+
path: 'getImageIdsForDisplaySet',
|
|
2423
|
+
args,
|
|
2424
|
+
defaultDataSourceName,
|
|
2425
|
+
extensionManager
|
|
2426
|
+
}),
|
|
2427
|
+
getImageIdsForInstance: (...args) => callByRetrieveAETitle({
|
|
2428
|
+
path: 'getImageIdsForDisplaySet',
|
|
2429
|
+
args,
|
|
2430
|
+
defaultDataSourceName,
|
|
2431
|
+
extensionManager
|
|
2432
|
+
}),
|
|
2433
|
+
getStudyInstanceUIDs: (...args) => callForAllDataSources({
|
|
2434
|
+
path: 'getStudyInstanceUIDs',
|
|
2435
|
+
args,
|
|
2436
|
+
extensionManager,
|
|
2437
|
+
dataSourceNames,
|
|
2438
|
+
defaultDataSourceName
|
|
2439
|
+
})
|
|
2440
|
+
};
|
|
2441
|
+
return src/* IWebApiDataSource */.pt.create(implementation);
|
|
2015
2442
|
}
|
|
2016
2443
|
|
|
2017
2444
|
;// CONCATENATED MODULE: ../../../extensions/default/src/getDataSourcesModule.js
|
|
@@ -2024,6 +2451,7 @@ function createDicomWebProxyApi(dicomWebProxyConfig, UserAuthenticationService)
|
|
|
2024
2451
|
|
|
2025
2452
|
|
|
2026
2453
|
|
|
2454
|
+
|
|
2027
2455
|
/**
|
|
2028
2456
|
*
|
|
2029
2457
|
*/
|
|
@@ -2044,42 +2472,45 @@ function getDataSourcesModule() {
|
|
|
2044
2472
|
name: 'dicomlocal',
|
|
2045
2473
|
type: 'localApi',
|
|
2046
2474
|
createDataSource: createDicomLocalApi
|
|
2475
|
+
}, {
|
|
2476
|
+
name: 'merge',
|
|
2477
|
+
type: 'mergeApi',
|
|
2478
|
+
createDataSource: createMergeDataSourceApi
|
|
2047
2479
|
}];
|
|
2048
2480
|
}
|
|
2049
2481
|
/* harmony default export */ const src_getDataSourcesModule = (getDataSourcesModule);
|
|
2050
2482
|
// EXTERNAL MODULE: ../../../node_modules/react/index.js
|
|
2051
|
-
var react = __webpack_require__(
|
|
2483
|
+
var react = __webpack_require__(41766);
|
|
2052
2484
|
// EXTERNAL MODULE: ../../../node_modules/prop-types/index.js
|
|
2053
|
-
var prop_types = __webpack_require__(
|
|
2485
|
+
var prop_types = __webpack_require__(11374);
|
|
2054
2486
|
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
2055
|
-
// EXTERNAL MODULE: ../../ui/src/index.js +
|
|
2056
|
-
var ui_src = __webpack_require__(
|
|
2487
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 487 modules
|
|
2488
|
+
var ui_src = __webpack_require__(55395);
|
|
2057
2489
|
// EXTERNAL MODULE: ./state/index.js + 1 modules
|
|
2058
|
-
var state = __webpack_require__(
|
|
2490
|
+
var state = __webpack_require__(15575);
|
|
2059
2491
|
// EXTERNAL MODULE: ../node_modules/react-router-dom/dist/index.js
|
|
2060
|
-
var dist = __webpack_require__(
|
|
2492
|
+
var dist = __webpack_require__(37396);
|
|
2061
2493
|
// EXTERNAL MODULE: ../../../node_modules/react-i18next/dist/es/index.js + 15 modules
|
|
2062
|
-
var es = __webpack_require__(
|
|
2494
|
+
var es = __webpack_require__(80619);
|
|
2063
2495
|
// EXTERNAL MODULE: ../node_modules/react-router/dist/index.js
|
|
2064
|
-
var react_router_dist = __webpack_require__(
|
|
2065
|
-
// EXTERNAL MODULE: ../../i18n/src/index.js +
|
|
2066
|
-
var i18n_src = __webpack_require__(
|
|
2496
|
+
var react_router_dist = __webpack_require__(10971);
|
|
2497
|
+
// EXTERNAL MODULE: ../../i18n/src/index.js + 148 modules
|
|
2498
|
+
var i18n_src = __webpack_require__(69536);
|
|
2067
2499
|
// EXTERNAL MODULE: ../../../node_modules/classnames/index.js
|
|
2068
|
-
var classnames = __webpack_require__(
|
|
2500
|
+
var classnames = __webpack_require__(61466);
|
|
2069
2501
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
2070
2502
|
;// CONCATENATED MODULE: ../../../extensions/default/src/Toolbar/Toolbar.tsx
|
|
2071
2503
|
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
2504
|
|
|
2073
2505
|
|
|
2074
2506
|
|
|
2075
|
-
function Toolbar(
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
} = _ref;
|
|
2507
|
+
function Toolbar({
|
|
2508
|
+
servicesManager
|
|
2509
|
+
}) {
|
|
2079
2510
|
const {
|
|
2080
2511
|
toolbarService
|
|
2081
2512
|
} = servicesManager.services;
|
|
2082
|
-
const [viewportGrid, viewportGridService] = (0,ui_src/* useViewportGrid */.
|
|
2513
|
+
const [viewportGrid, viewportGridService] = (0,ui_src/* useViewportGrid */.ih)();
|
|
2083
2514
|
const [toolbarButtons, setToolbarButtons] = (0,react.useState)([]);
|
|
2084
2515
|
(0,react.useEffect)(() => {
|
|
2085
2516
|
const updateToolbar = () => {
|
|
@@ -2131,16 +2562,15 @@ const {
|
|
|
2131
2562
|
availableLanguages,
|
|
2132
2563
|
defaultLanguage,
|
|
2133
2564
|
currentLanguage
|
|
2134
|
-
} = i18n_src
|
|
2135
|
-
function ViewerHeader(
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
const
|
|
2142
|
-
const
|
|
2143
|
-
const location = (0,react_router_dist/* useLocation */.TH)();
|
|
2565
|
+
} = i18n_src/* default */.A;
|
|
2566
|
+
function ViewerHeader({
|
|
2567
|
+
hotkeysManager,
|
|
2568
|
+
extensionManager,
|
|
2569
|
+
servicesManager
|
|
2570
|
+
}) {
|
|
2571
|
+
const [appConfig] = (0,state/* useAppConfig */.r)();
|
|
2572
|
+
const navigate = (0,dist/* useNavigate */.Zp)();
|
|
2573
|
+
const location = (0,react_router_dist/* useLocation */.zy)();
|
|
2144
2574
|
const onClickReturnButton = () => {
|
|
2145
2575
|
const {
|
|
2146
2576
|
pathname
|
|
@@ -2164,23 +2594,23 @@ function ViewerHeader(_ref) {
|
|
|
2164
2594
|
};
|
|
2165
2595
|
const {
|
|
2166
2596
|
t
|
|
2167
|
-
} = (0,es/* useTranslation
|
|
2597
|
+
} = (0,es/* useTranslation */.Bd)();
|
|
2168
2598
|
const {
|
|
2169
2599
|
show,
|
|
2170
2600
|
hide
|
|
2171
|
-
} = (0,ui_src/* useModal */.
|
|
2601
|
+
} = (0,ui_src/* useModal */.hS)();
|
|
2172
2602
|
const {
|
|
2173
2603
|
hotkeyDefinitions,
|
|
2174
2604
|
hotkeyDefaults
|
|
2175
2605
|
} = hotkeysManager;
|
|
2176
|
-
const versionNumber = "3.8.0-beta.
|
|
2177
|
-
const commitHash = "
|
|
2606
|
+
const versionNumber = "3.8.0-beta.60";
|
|
2607
|
+
const commitHash = "f7fe91c5f6c4f05f3f3f5f640d3a119bd40a5870";
|
|
2178
2608
|
const menuOptions = [{
|
|
2179
2609
|
title: t('Header:About'),
|
|
2180
2610
|
icon: 'info',
|
|
2181
2611
|
onClick: () => show({
|
|
2182
|
-
content: ui_src/* AboutModal */.
|
|
2183
|
-
title: 'About OHIF Viewer',
|
|
2612
|
+
content: ui_src/* AboutModal */.VT,
|
|
2613
|
+
title: t('AboutModal:About OHIF Viewer'),
|
|
2184
2614
|
contentProps: {
|
|
2185
2615
|
versionNumber,
|
|
2186
2616
|
commitHash
|
|
@@ -2190,8 +2620,8 @@ function ViewerHeader(_ref) {
|
|
|
2190
2620
|
title: t('Header:Preferences'),
|
|
2191
2621
|
icon: 'settings',
|
|
2192
2622
|
onClick: () => show({
|
|
2193
|
-
title: t('UserPreferencesModal:User
|
|
2194
|
-
content: ui_src/* UserPreferences */.
|
|
2623
|
+
title: t('UserPreferencesModal:User preferences'),
|
|
2624
|
+
content: ui_src/* UserPreferences */.im,
|
|
2195
2625
|
contentProps: {
|
|
2196
2626
|
hotkeyDefaults: hotkeysManager.getValidHotkeyDefinitions(hotkeyDefaults),
|
|
2197
2627
|
hotkeyDefinitions,
|
|
@@ -2199,23 +2629,22 @@ function ViewerHeader(_ref) {
|
|
|
2199
2629
|
availableLanguages,
|
|
2200
2630
|
defaultLanguage,
|
|
2201
2631
|
onCancel: () => {
|
|
2202
|
-
src/* hotkeys */.
|
|
2203
|
-
src/* hotkeys */.
|
|
2632
|
+
src/* hotkeys */.ot.stopRecord();
|
|
2633
|
+
src/* hotkeys */.ot.unpause();
|
|
2204
2634
|
hide();
|
|
2205
2635
|
},
|
|
2206
|
-
onSubmit:
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
} = _ref2;
|
|
2636
|
+
onSubmit: ({
|
|
2637
|
+
hotkeyDefinitions,
|
|
2638
|
+
language
|
|
2639
|
+
}) => {
|
|
2211
2640
|
if (language.value !== currentLanguage().value) {
|
|
2212
|
-
i18n_src
|
|
2641
|
+
i18n_src/* default */.A.changeLanguage(language.value);
|
|
2213
2642
|
}
|
|
2214
2643
|
hotkeysManager.setHotkeys(hotkeyDefinitions);
|
|
2215
2644
|
hide();
|
|
2216
2645
|
},
|
|
2217
2646
|
onReset: () => hotkeysManager.restoreDefaultBindings(),
|
|
2218
|
-
hotkeysModule: src/* hotkeys */.
|
|
2647
|
+
hotkeysModule: src/* hotkeys */.ot
|
|
2219
2648
|
}
|
|
2220
2649
|
})
|
|
2221
2650
|
}];
|
|
@@ -2228,12 +2657,12 @@ function ViewerHeader(_ref) {
|
|
|
2228
2657
|
}
|
|
2229
2658
|
});
|
|
2230
2659
|
}
|
|
2231
|
-
return /*#__PURE__*/react.createElement(ui_src/* Header */.
|
|
2660
|
+
return /*#__PURE__*/react.createElement(ui_src/* Header */.Y9, {
|
|
2232
2661
|
menuOptions: menuOptions,
|
|
2233
2662
|
isReturnEnabled: !!appConfig.showStudyList,
|
|
2234
2663
|
onClickReturnButton: onClickReturnButton,
|
|
2235
2664
|
WhiteLabeling: appConfig.whiteLabeling
|
|
2236
|
-
}, /*#__PURE__*/react.createElement(ui_src/* ErrorBoundary */.
|
|
2665
|
+
}, /*#__PURE__*/react.createElement(ui_src/* ErrorBoundary */.tH, {
|
|
2237
2666
|
context: "Primary Toolbar"
|
|
2238
2667
|
}, /*#__PURE__*/react.createElement("div", {
|
|
2239
2668
|
className: "relative flex justify-center"
|
|
@@ -2245,14 +2674,14 @@ function ViewerHeader(_ref) {
|
|
|
2245
2674
|
;// CONCATENATED MODULE: ../../../extensions/default/src/Components/SidePanelWithServices.tsx
|
|
2246
2675
|
|
|
2247
2676
|
|
|
2248
|
-
const SidePanelWithServices =
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2677
|
+
const SidePanelWithServices = ({
|
|
2678
|
+
servicesManager,
|
|
2679
|
+
side,
|
|
2680
|
+
className,
|
|
2681
|
+
activeTabIndex: activeTabIndexProp,
|
|
2682
|
+
tabs,
|
|
2683
|
+
expandedWidth
|
|
2684
|
+
}) => {
|
|
2256
2685
|
const panelService = servicesManager?.services?.panelService;
|
|
2257
2686
|
|
|
2258
2687
|
// Tracks whether this SidePanel has been opened at least once since this SidePanel was inserted into the DOM.
|
|
@@ -2274,14 +2703,15 @@ const SidePanelWithServices = _ref => {
|
|
|
2274
2703
|
};
|
|
2275
2704
|
}
|
|
2276
2705
|
}, [tabs, hasBeenOpened, panelService]);
|
|
2277
|
-
return /*#__PURE__*/react.createElement(ui_src/* SidePanel */.
|
|
2706
|
+
return /*#__PURE__*/react.createElement(ui_src/* SidePanel */.wv, {
|
|
2278
2707
|
side: side,
|
|
2279
2708
|
className: className,
|
|
2280
2709
|
activeTabIndex: activeTabIndex,
|
|
2281
2710
|
tabs: tabs,
|
|
2282
2711
|
onOpen: () => {
|
|
2283
2712
|
setHasBeenOpened(true);
|
|
2284
|
-
}
|
|
2713
|
+
},
|
|
2714
|
+
expandedWidth: expandedWidth
|
|
2285
2715
|
});
|
|
2286
2716
|
};
|
|
2287
2717
|
/* harmony default export */ const Components_SidePanelWithServices = (SidePanelWithServices);
|
|
@@ -2293,22 +2723,21 @@ const SidePanelWithServices = _ref => {
|
|
|
2293
2723
|
|
|
2294
2724
|
|
|
2295
2725
|
|
|
2296
|
-
function ViewerLayout(
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
const [appConfig] = (0,state/* useAppConfig */.M)();
|
|
2726
|
+
function ViewerLayout({
|
|
2727
|
+
// From Extension Module Params
|
|
2728
|
+
extensionManager,
|
|
2729
|
+
servicesManager,
|
|
2730
|
+
hotkeysManager,
|
|
2731
|
+
commandsManager,
|
|
2732
|
+
// From Modes
|
|
2733
|
+
viewports,
|
|
2734
|
+
ViewportGridComp,
|
|
2735
|
+
leftPanels = [],
|
|
2736
|
+
rightPanels = [],
|
|
2737
|
+
leftPanelDefaultClosed = false,
|
|
2738
|
+
rightPanelDefaultClosed = false
|
|
2739
|
+
}) {
|
|
2740
|
+
const [appConfig] = (0,state/* useAppConfig */.r)();
|
|
2312
2741
|
const {
|
|
2313
2742
|
hangingProtocolService
|
|
2314
2743
|
} = servicesManager.services;
|
|
@@ -2360,7 +2789,7 @@ function ViewerLayout(_ref) {
|
|
|
2360
2789
|
(0,react.useEffect)(() => {
|
|
2361
2790
|
const {
|
|
2362
2791
|
unsubscribe
|
|
2363
|
-
} = hangingProtocolService.subscribe(src/* HangingProtocolService */.
|
|
2792
|
+
} = hangingProtocolService.subscribe(src/* HangingProtocolService */.Qe.EVENTS.PROTOCOL_CHANGED,
|
|
2364
2793
|
// Todo: right now to set the loading indicator to false, we need to wait for the
|
|
2365
2794
|
// hangingProtocolService to finish applying the viewport matching to each viewport,
|
|
2366
2795
|
// however, this might not be the only approach to set the loading indicator to false. we need to explore this further.
|
|
@@ -2392,9 +2821,9 @@ function ViewerLayout(_ref) {
|
|
|
2392
2821
|
style: {
|
|
2393
2822
|
height: 'calc(100vh - 52px'
|
|
2394
2823
|
}
|
|
2395
|
-
}, /*#__PURE__*/react.createElement(react.Fragment, null, showLoadingIndicator && /*#__PURE__*/react.createElement(ui_src/* LoadingIndicatorProgress */.
|
|
2824
|
+
}, /*#__PURE__*/react.createElement(react.Fragment, null, showLoadingIndicator && /*#__PURE__*/react.createElement(ui_src/* LoadingIndicatorProgress */.Jx, {
|
|
2396
2825
|
className: "h-full w-full bg-black"
|
|
2397
|
-
}), leftPanelComponents.length ? /*#__PURE__*/react.createElement(ui_src/* ErrorBoundary */.
|
|
2826
|
+
}), leftPanelComponents.length ? /*#__PURE__*/react.createElement(ui_src/* ErrorBoundary */.tH, {
|
|
2398
2827
|
context: "Left Panel"
|
|
2399
2828
|
}, /*#__PURE__*/react.createElement(Components_SidePanelWithServices, {
|
|
2400
2829
|
side: "left",
|
|
@@ -2405,13 +2834,13 @@ function ViewerLayout(_ref) {
|
|
|
2405
2834
|
className: "flex h-full flex-1 flex-col"
|
|
2406
2835
|
}, /*#__PURE__*/react.createElement("div", {
|
|
2407
2836
|
className: "relative flex h-full flex-1 items-center justify-center overflow-hidden bg-black"
|
|
2408
|
-
}, /*#__PURE__*/react.createElement(ui_src/* ErrorBoundary */.
|
|
2837
|
+
}, /*#__PURE__*/react.createElement(ui_src/* ErrorBoundary */.tH, {
|
|
2409
2838
|
context: "Grid"
|
|
2410
2839
|
}, /*#__PURE__*/react.createElement(ViewportGridComp, {
|
|
2411
2840
|
servicesManager: servicesManager,
|
|
2412
2841
|
viewportComponents: viewportComponents,
|
|
2413
2842
|
commandsManager: commandsManager
|
|
2414
|
-
})))), rightPanelComponents.length ? /*#__PURE__*/react.createElement(ui_src/* ErrorBoundary */.
|
|
2843
|
+
})))), rightPanelComponents.length ? /*#__PURE__*/react.createElement(ui_src/* ErrorBoundary */.tH, {
|
|
2415
2844
|
context: "Right Panel"
|
|
2416
2845
|
}, /*#__PURE__*/react.createElement(Components_SidePanelWithServices, {
|
|
2417
2846
|
side: "right",
|
|
@@ -2425,8 +2854,8 @@ ViewerLayout.propTypes = {
|
|
|
2425
2854
|
extensionManager: prop_types_default().shape({
|
|
2426
2855
|
getModuleEntry: (prop_types_default()).func.isRequired
|
|
2427
2856
|
}).isRequired,
|
|
2428
|
-
commandsManager: prop_types_default().instanceOf(src/* CommandsManager */.
|
|
2429
|
-
servicesManager: prop_types_default().instanceOf(src/* ServicesManager */.
|
|
2857
|
+
commandsManager: prop_types_default().instanceOf(src/* CommandsManager */.Sp),
|
|
2858
|
+
servicesManager: prop_types_default().instanceOf(src/* ServicesManager */.CS),
|
|
2430
2859
|
// From modes
|
|
2431
2860
|
leftPanels: (prop_types_default()).array,
|
|
2432
2861
|
rightPanels: (prop_types_default()).array,
|
|
@@ -2445,13 +2874,12 @@ ViewerLayout.propTypes = {
|
|
|
2445
2874
|
- Init layout based on the displaySets and the objects.
|
|
2446
2875
|
*/
|
|
2447
2876
|
|
|
2448
|
-
/* harmony default export */ function getLayoutTemplateModule(
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
} = _ref;
|
|
2877
|
+
/* harmony default export */ function getLayoutTemplateModule({
|
|
2878
|
+
servicesManager,
|
|
2879
|
+
extensionManager,
|
|
2880
|
+
commandsManager,
|
|
2881
|
+
hotkeysManager
|
|
2882
|
+
}) {
|
|
2455
2883
|
function ViewerLayoutWithServices(props) {
|
|
2456
2884
|
return src_ViewerLayout({
|
|
2457
2885
|
servicesManager,
|
|
@@ -2485,31 +2913,30 @@ const {
|
|
|
2485
2913
|
*
|
|
2486
2914
|
* @param {*} param0
|
|
2487
2915
|
*/
|
|
2488
|
-
function PanelStudyBrowser(
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
} = _ref;
|
|
2916
|
+
function PanelStudyBrowser({
|
|
2917
|
+
servicesManager,
|
|
2918
|
+
getImageSrc,
|
|
2919
|
+
getStudiesForPatientByMRN,
|
|
2920
|
+
requestDisplaySetCreationForStudy,
|
|
2921
|
+
dataSource
|
|
2922
|
+
}) {
|
|
2496
2923
|
const {
|
|
2497
2924
|
hangingProtocolService,
|
|
2498
2925
|
displaySetService,
|
|
2499
2926
|
uiNotificationService
|
|
2500
2927
|
} = servicesManager.services;
|
|
2501
|
-
const navigate = (0,dist/* useNavigate */.
|
|
2928
|
+
const navigate = (0,dist/* useNavigate */.Zp)();
|
|
2502
2929
|
|
|
2503
2930
|
// Normally you nest the components so the tree isn't so deep, and the data
|
|
2504
2931
|
// doesn't have to have such an intense shape. This works well enough for now.
|
|
2505
2932
|
// Tabs --> Studies --> DisplaySets --> Thumbnails
|
|
2506
2933
|
const {
|
|
2507
2934
|
StudyInstanceUIDs
|
|
2508
|
-
} = (0,ui_src/* useImageViewer */.
|
|
2935
|
+
} = (0,ui_src/* useImageViewer */.Bz)();
|
|
2509
2936
|
const [{
|
|
2510
2937
|
activeViewportId,
|
|
2511
2938
|
viewports
|
|
2512
|
-
}, viewportGridService] = (0,ui_src/* useViewportGrid */.
|
|
2939
|
+
}, viewportGridService] = (0,ui_src/* useViewportGrid */.ih)();
|
|
2513
2940
|
const [activeTabName, setActiveTabName] = (0,react.useState)('primary');
|
|
2514
2941
|
const [expandedStudyInstanceUIDs, setExpandedStudyInstanceUIDs] = (0,react.useState)([...StudyInstanceUIDs]);
|
|
2515
2942
|
const [studyDisplayList, setStudyDisplayList] = (0,react.useState)([]);
|
|
@@ -2675,7 +3102,7 @@ function PanelStudyBrowser(_ref) {
|
|
|
2675
3102
|
}
|
|
2676
3103
|
}
|
|
2677
3104
|
const activeDisplaySetInstanceUIDs = viewports.get(activeViewportId)?.displaySetInstanceUIDs;
|
|
2678
|
-
return /*#__PURE__*/react.createElement(ui_src/* StudyBrowser */.
|
|
3105
|
+
return /*#__PURE__*/react.createElement(ui_src/* StudyBrowser */.M4, {
|
|
2679
3106
|
tabs: tabs,
|
|
2680
3107
|
servicesManager: servicesManager,
|
|
2681
3108
|
activeTabName: activeTabName,
|
|
@@ -2745,7 +3172,6 @@ function _mapDisplaySets(displaySets, thumbnailImageSrcMap) {
|
|
|
2745
3172
|
displaySetInstanceUID: ds.displaySetInstanceUID
|
|
2746
3173
|
// .. Any other data to pass
|
|
2747
3174
|
},
|
|
2748
|
-
|
|
2749
3175
|
isHydratedForDerivedDisplaySet: ds.isHydrated
|
|
2750
3176
|
});
|
|
2751
3177
|
});
|
|
@@ -2860,17 +3286,16 @@ function requestDisplaySetCreationForStudy(dataSource, displaySetService, StudyI
|
|
|
2860
3286
|
* @param {object} commandsManager
|
|
2861
3287
|
* @param {object} extensionManager
|
|
2862
3288
|
*/
|
|
2863
|
-
function WrappedPanelStudyBrowser(
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
} = _ref;
|
|
3289
|
+
function WrappedPanelStudyBrowser({
|
|
3290
|
+
commandsManager,
|
|
3291
|
+
extensionManager,
|
|
3292
|
+
servicesManager
|
|
3293
|
+
}) {
|
|
2869
3294
|
// TODO: This should be made available a different way; route should have
|
|
2870
3295
|
// already determined our datasource
|
|
2871
3296
|
const dataSource = extensionManager.getDataSources()[0];
|
|
2872
3297
|
const _getStudiesForPatientByMRN = Panels_getStudiesForPatientByMRN.bind(null, dataSource);
|
|
2873
|
-
const _getImageSrcFromImageId = _createGetImageSrcFromImageIdFn(extensionManager);
|
|
3298
|
+
const _getImageSrcFromImageId = (0,react.useCallback)(_createGetImageSrcFromImageIdFn(extensionManager), []);
|
|
2874
3299
|
const _requestDisplaySetCreationForStudy = Panels_requestDisplaySetCreationForStudy.bind(null, dataSource);
|
|
2875
3300
|
return /*#__PURE__*/react.createElement(Panels_PanelStudyBrowser, {
|
|
2876
3301
|
servicesManager: servicesManager,
|
|
@@ -2912,21 +3337,20 @@ WrappedPanelStudyBrowser.propTypes = {
|
|
|
2912
3337
|
|
|
2913
3338
|
|
|
2914
3339
|
|
|
2915
|
-
function ActionButtons(
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
} = _ref;
|
|
3340
|
+
function ActionButtons({
|
|
3341
|
+
onExportClick,
|
|
3342
|
+
onCreateReportClick
|
|
3343
|
+
}) {
|
|
2920
3344
|
const {
|
|
2921
3345
|
t
|
|
2922
|
-
} = (0,es/* useTranslation
|
|
2923
|
-
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(ui_src/* LegacyButtonGroup */.
|
|
3346
|
+
} = (0,es/* useTranslation */.Bd)('MeasurementTable');
|
|
3347
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(ui_src/* LegacyButtonGroup */.xA, {
|
|
2924
3348
|
color: "black",
|
|
2925
3349
|
size: "inherit"
|
|
2926
|
-
}, /*#__PURE__*/react.createElement(ui_src/* LegacyButton */.
|
|
3350
|
+
}, /*#__PURE__*/react.createElement(ui_src/* LegacyButton */._H, {
|
|
2927
3351
|
className: "px-2 py-2 text-base",
|
|
2928
3352
|
onClick: onExportClick
|
|
2929
|
-
}, t('Export CSV')), /*#__PURE__*/react.createElement(ui_src/* LegacyButton */.
|
|
3353
|
+
}, t('Export CSV')), /*#__PURE__*/react.createElement(ui_src/* LegacyButton */._H, {
|
|
2930
3354
|
className: "px-2 py-2 text-base",
|
|
2931
3355
|
onClick: onCreateReportClick
|
|
2932
3356
|
}, t('Create Report'))));
|
|
@@ -2941,7 +3365,7 @@ ActionButtons.defaultProps = {
|
|
|
2941
3365
|
};
|
|
2942
3366
|
/* harmony default export */ const Panels_ActionButtons = (ActionButtons);
|
|
2943
3367
|
// EXTERNAL MODULE: ../../../node_modules/lodash.debounce/index.js
|
|
2944
|
-
var lodash_debounce = __webpack_require__(
|
|
3368
|
+
var lodash_debounce = __webpack_require__(14771);
|
|
2945
3369
|
var lodash_debounce_default = /*#__PURE__*/__webpack_require__.n(lodash_debounce);
|
|
2946
3370
|
;// CONCATENATED MODULE: ../../../extensions/default/src/Panels/createReportDialogPrompt.tsx
|
|
2947
3371
|
|
|
@@ -2950,10 +3374,9 @@ const CREATE_REPORT_DIALOG_RESPONSE = {
|
|
|
2950
3374
|
CANCEL: 0,
|
|
2951
3375
|
CREATE_REPORT: 1
|
|
2952
3376
|
};
|
|
2953
|
-
function CreateReportDialogPrompt(uiDialogService,
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
} = _ref;
|
|
3377
|
+
function CreateReportDialogPrompt(uiDialogService, {
|
|
3378
|
+
extensionManager
|
|
3379
|
+
}) {
|
|
2957
3380
|
return new Promise(function (resolve, reject) {
|
|
2958
3381
|
let dialogId = undefined;
|
|
2959
3382
|
const _handleClose = () => {
|
|
@@ -2974,11 +3397,10 @@ function CreateReportDialogPrompt(uiDialogService, _ref) {
|
|
|
2974
3397
|
* @param {string} param0.action - value of action performed
|
|
2975
3398
|
* @param {string} param0.value - value from input field
|
|
2976
3399
|
*/
|
|
2977
|
-
const _handleFormSubmit =
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
} = _ref2;
|
|
3400
|
+
const _handleFormSubmit = ({
|
|
3401
|
+
action,
|
|
3402
|
+
value
|
|
3403
|
+
}) => {
|
|
2982
3404
|
uiDialogService.dismiss({
|
|
2983
3405
|
id: dialogId
|
|
2984
3406
|
});
|
|
@@ -3013,7 +3435,7 @@ function CreateReportDialogPrompt(uiDialogService, _ref) {
|
|
|
3013
3435
|
dialogId = uiDialogService.create({
|
|
3014
3436
|
centralize: true,
|
|
3015
3437
|
isDraggable: false,
|
|
3016
|
-
content: ui_src/* Dialog */.
|
|
3438
|
+
content: ui_src/* Dialog */.lG,
|
|
3017
3439
|
useLastPosition: false,
|
|
3018
3440
|
showOverlay: true,
|
|
3019
3441
|
contentProps: {
|
|
@@ -3027,19 +3449,18 @@ function CreateReportDialogPrompt(uiDialogService, _ref) {
|
|
|
3027
3449
|
actions: [{
|
|
3028
3450
|
id: 'cancel',
|
|
3029
3451
|
text: 'Cancel',
|
|
3030
|
-
type: ui_src/* ButtonEnums.type */.
|
|
3452
|
+
type: ui_src/* ButtonEnums.type */.Ny.NW.secondary
|
|
3031
3453
|
}, {
|
|
3032
3454
|
id: 'save',
|
|
3033
3455
|
text: 'Save',
|
|
3034
|
-
type: ui_src/* ButtonEnums.type */.
|
|
3456
|
+
type: ui_src/* ButtonEnums.type */.Ny.NW.primary
|
|
3035
3457
|
}],
|
|
3036
3458
|
// TODO: Should be on button press...
|
|
3037
3459
|
onSubmit: _handleFormSubmit,
|
|
3038
|
-
body:
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
} = _ref3;
|
|
3460
|
+
body: ({
|
|
3461
|
+
value,
|
|
3462
|
+
setValue
|
|
3463
|
+
}) => {
|
|
3043
3464
|
const onChangeHandler = event => {
|
|
3044
3465
|
event.persist();
|
|
3045
3466
|
setValue(value => ({
|
|
@@ -3060,7 +3481,7 @@ function CreateReportDialogPrompt(uiDialogService, _ref) {
|
|
|
3060
3481
|
};
|
|
3061
3482
|
return /*#__PURE__*/react.createElement(react.Fragment, null, dataSourcesOpts.length > 1 && window.config?.allowMultiSelectExport && /*#__PURE__*/react.createElement("div", null, /*#__PURE__*/react.createElement("label", {
|
|
3062
3483
|
className: "text-[14px] leading-[1.2] text-white"
|
|
3063
|
-
}, "Data Source"), /*#__PURE__*/react.createElement(ui_src/* Select */.
|
|
3484
|
+
}, "Data Source"), /*#__PURE__*/react.createElement(ui_src/* Select */.l6, {
|
|
3064
3485
|
closeMenuOnSelect: true,
|
|
3065
3486
|
className: "border-primary-main mt-2 bg-black",
|
|
3066
3487
|
options: dataSourcesOpts,
|
|
@@ -3075,7 +3496,7 @@ function CreateReportDialogPrompt(uiDialogService, _ref) {
|
|
|
3075
3496
|
isClearable: false
|
|
3076
3497
|
})), /*#__PURE__*/react.createElement("div", {
|
|
3077
3498
|
className: "mt-3"
|
|
3078
|
-
}, /*#__PURE__*/react.createElement(ui_src/* Input */.
|
|
3499
|
+
}, /*#__PURE__*/react.createElement(ui_src/* Input */.pd, {
|
|
3079
3500
|
autoFocus: true,
|
|
3080
3501
|
label: "Enter the report name",
|
|
3081
3502
|
labelClassName: "text-white text-[14px] leading-[1.2]",
|
|
@@ -3099,12 +3520,11 @@ function CreateReportDialogPrompt(uiDialogService, _ref) {
|
|
|
3099
3520
|
*
|
|
3100
3521
|
* @param {*} servicesManager
|
|
3101
3522
|
*/
|
|
3102
|
-
async function createReportAsync(
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
} = _ref;
|
|
3523
|
+
async function createReportAsync({
|
|
3524
|
+
servicesManager,
|
|
3525
|
+
getReport,
|
|
3526
|
+
reportType = 'measurement'
|
|
3527
|
+
}) {
|
|
3108
3528
|
const {
|
|
3109
3529
|
displaySetService,
|
|
3110
3530
|
uiNotificationService,
|
|
@@ -3215,16 +3635,19 @@ function findSRWithSameSeriesDescription(SeriesDescription, displaySetService) {
|
|
|
3215
3635
|
|
|
3216
3636
|
|
|
3217
3637
|
|
|
3638
|
+
|
|
3218
3639
|
const {
|
|
3219
3640
|
downloadCSVReport
|
|
3220
3641
|
} = src.utils;
|
|
3221
|
-
function PanelMeasurementTable(
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3642
|
+
function PanelMeasurementTable({
|
|
3643
|
+
servicesManager,
|
|
3644
|
+
commandsManager,
|
|
3645
|
+
extensionManager
|
|
3646
|
+
}) {
|
|
3647
|
+
const {
|
|
3648
|
+
t
|
|
3649
|
+
} = (0,es/* useTranslation */.Bd)('MeasurementTable');
|
|
3650
|
+
const [viewportGrid, viewportGridService] = (0,ui_src/* useViewportGrid */.ih)();
|
|
3228
3651
|
const {
|
|
3229
3652
|
activeViewportId,
|
|
3230
3653
|
viewports
|
|
@@ -3310,31 +3733,28 @@ function PanelMeasurementTable(_ref) {
|
|
|
3310
3733
|
});
|
|
3311
3734
|
}
|
|
3312
3735
|
}
|
|
3313
|
-
const jumpToImage =
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
} = _ref2;
|
|
3736
|
+
const jumpToImage = ({
|
|
3737
|
+
uid,
|
|
3738
|
+
isActive
|
|
3739
|
+
}) => {
|
|
3318
3740
|
measurementService.jumpToMeasurement(viewportGrid.activeViewportId, uid);
|
|
3319
3741
|
onMeasurementItemClickHandler({
|
|
3320
3742
|
uid,
|
|
3321
3743
|
isActive
|
|
3322
3744
|
});
|
|
3323
3745
|
};
|
|
3324
|
-
const onMeasurementItemEditHandler =
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
} = _ref3;
|
|
3746
|
+
const onMeasurementItemEditHandler = ({
|
|
3747
|
+
uid,
|
|
3748
|
+
isActive
|
|
3749
|
+
}) => {
|
|
3329
3750
|
const measurement = measurementService.getMeasurement(uid);
|
|
3330
3751
|
//Todo: why we are jumping to image?
|
|
3331
3752
|
// jumpToImage({ id, isActive });
|
|
3332
3753
|
|
|
3333
|
-
const onSubmitHandler =
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
} = _ref4;
|
|
3754
|
+
const onSubmitHandler = ({
|
|
3755
|
+
action,
|
|
3756
|
+
value
|
|
3757
|
+
}) => {
|
|
3338
3758
|
switch (action.id) {
|
|
3339
3759
|
case 'save':
|
|
3340
3760
|
{
|
|
@@ -3353,18 +3773,17 @@ function PanelMeasurementTable(_ref) {
|
|
|
3353
3773
|
centralize: true,
|
|
3354
3774
|
isDraggable: false,
|
|
3355
3775
|
showOverlay: true,
|
|
3356
|
-
content: ui_src/* Dialog */.
|
|
3776
|
+
content: ui_src/* Dialog */.lG,
|
|
3357
3777
|
contentProps: {
|
|
3358
3778
|
title: 'Annotation',
|
|
3359
3779
|
noCloseButton: true,
|
|
3360
3780
|
value: {
|
|
3361
3781
|
label: measurement.label || ''
|
|
3362
3782
|
},
|
|
3363
|
-
body:
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
} = _ref5;
|
|
3783
|
+
body: ({
|
|
3784
|
+
value,
|
|
3785
|
+
setValue
|
|
3786
|
+
}) => {
|
|
3368
3787
|
const onChangeHandler = event => {
|
|
3369
3788
|
event.persist();
|
|
3370
3789
|
setValue(value => ({
|
|
@@ -3382,7 +3801,7 @@ function PanelMeasurementTable(_ref) {
|
|
|
3382
3801
|
});
|
|
3383
3802
|
}
|
|
3384
3803
|
};
|
|
3385
|
-
return /*#__PURE__*/react.createElement(ui_src/* Input */.
|
|
3804
|
+
return /*#__PURE__*/react.createElement(ui_src/* Input */.pd, {
|
|
3386
3805
|
label: "Enter your annotation",
|
|
3387
3806
|
labelClassName: "text-white text-[14px] leading-[1.2]",
|
|
3388
3807
|
autoFocus: true,
|
|
@@ -3397,21 +3816,20 @@ function PanelMeasurementTable(_ref) {
|
|
|
3397
3816
|
actions: [{
|
|
3398
3817
|
id: 'cancel',
|
|
3399
3818
|
text: 'Cancel',
|
|
3400
|
-
type: ui_src/* ButtonEnums.type */.
|
|
3819
|
+
type: ui_src/* ButtonEnums.type */.Ny.NW.secondary
|
|
3401
3820
|
}, {
|
|
3402
3821
|
id: 'save',
|
|
3403
3822
|
text: 'Save',
|
|
3404
|
-
type: ui_src/* ButtonEnums.type */.
|
|
3823
|
+
type: ui_src/* ButtonEnums.type */.Ny.NW.primary
|
|
3405
3824
|
}],
|
|
3406
3825
|
onSubmit: onSubmitHandler
|
|
3407
3826
|
}
|
|
3408
3827
|
});
|
|
3409
3828
|
};
|
|
3410
|
-
const onMeasurementItemClickHandler =
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
} = _ref6;
|
|
3829
|
+
const onMeasurementItemClickHandler = ({
|
|
3830
|
+
uid,
|
|
3831
|
+
isActive
|
|
3832
|
+
}) => {
|
|
3415
3833
|
if (!isActive) {
|
|
3416
3834
|
const measurements = [...displayMeasurements];
|
|
3417
3835
|
const measurement = measurements.find(m => m.uid === uid);
|
|
@@ -3423,8 +3841,8 @@ function PanelMeasurementTable(_ref) {
|
|
|
3423
3841
|
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
3424
3842
|
className: "ohif-scrollbar overflow-y-auto overflow-x-hidden",
|
|
3425
3843
|
"data-cy": 'measurements-panel'
|
|
3426
|
-
}, /*#__PURE__*/react.createElement(ui_src/* MeasurementTable */.
|
|
3427
|
-
title: "Measurements",
|
|
3844
|
+
}, /*#__PURE__*/react.createElement(ui_src/* MeasurementTable */.V, {
|
|
3845
|
+
title: t("Measurements"),
|
|
3428
3846
|
servicesManager: servicesManager,
|
|
3429
3847
|
data: displayMeasurements,
|
|
3430
3848
|
onClick: jumpToImage,
|
|
@@ -3438,7 +3856,7 @@ function PanelMeasurementTable(_ref) {
|
|
|
3438
3856
|
})));
|
|
3439
3857
|
}
|
|
3440
3858
|
PanelMeasurementTable.propTypes = {
|
|
3441
|
-
servicesManager: prop_types_default().instanceOf(src/* ServicesManager */.
|
|
3859
|
+
servicesManager: prop_types_default().instanceOf(src/* ServicesManager */.CS).isRequired
|
|
3442
3860
|
};
|
|
3443
3861
|
function _getMappedMeasurements(measurementService) {
|
|
3444
3862
|
const measurements = measurementService.getMeasurements();
|
|
@@ -3495,21 +3913,23 @@ function _mapMeasurementToDisplay(measurement, index, types) {
|
|
|
3495
3913
|
|
|
3496
3914
|
|
|
3497
3915
|
|
|
3916
|
+
// EXTERNAL MODULE: ../../../node_modules/i18next/dist/esm/i18next.js
|
|
3917
|
+
var i18next = __webpack_require__(92344);
|
|
3498
3918
|
;// CONCATENATED MODULE: ../../../extensions/default/src/getPanelModule.tsx
|
|
3499
3919
|
|
|
3500
3920
|
|
|
3501
3921
|
|
|
3922
|
+
|
|
3502
3923
|
// TODO:
|
|
3503
3924
|
// - No loading UI exists yet
|
|
3504
3925
|
// - cancel promises when component is destroyed
|
|
3505
3926
|
// - show errors in UI for thumbnails if promise fails
|
|
3506
3927
|
|
|
3507
|
-
function getPanelModule(
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
} = _ref;
|
|
3928
|
+
function getPanelModule({
|
|
3929
|
+
commandsManager,
|
|
3930
|
+
extensionManager,
|
|
3931
|
+
servicesManager
|
|
3932
|
+
}) {
|
|
3513
3933
|
const wrappedMeasurementPanel = () => {
|
|
3514
3934
|
return /*#__PURE__*/react.createElement(PanelMeasurementTable, {
|
|
3515
3935
|
commandsManager: commandsManager,
|
|
@@ -3521,7 +3941,7 @@ function getPanelModule(_ref) {
|
|
|
3521
3941
|
name: 'seriesList',
|
|
3522
3942
|
iconName: 'tab-studies',
|
|
3523
3943
|
iconLabel: 'Studies',
|
|
3524
|
-
label: 'Studies',
|
|
3944
|
+
label: i18next/* default */.A.t('SidePanel:Studies'),
|
|
3525
3945
|
component: Panels_WrappedPanelStudyBrowser.bind(null, {
|
|
3526
3946
|
commandsManager,
|
|
3527
3947
|
extensionManager,
|
|
@@ -3531,28 +3951,28 @@ function getPanelModule(_ref) {
|
|
|
3531
3951
|
name: 'measure',
|
|
3532
3952
|
iconName: 'tab-linear',
|
|
3533
3953
|
iconLabel: 'Measure',
|
|
3534
|
-
label: 'Measurements',
|
|
3535
|
-
secondaryLabel: 'Measurements',
|
|
3954
|
+
label: i18next/* default */.A.t('SidePanel:Measurements'),
|
|
3955
|
+
secondaryLabel: i18next/* default */.A.t('SidePanel:Measurements'),
|
|
3536
3956
|
component: wrappedMeasurementPanel
|
|
3537
3957
|
}];
|
|
3538
3958
|
}
|
|
3539
3959
|
/* harmony default export */ const src_getPanelModule = (getPanelModule);
|
|
3540
3960
|
// EXTERNAL MODULE: ../../core/src/utils/isImage.js
|
|
3541
|
-
var isImage = __webpack_require__(
|
|
3961
|
+
var isImage = __webpack_require__(8094);
|
|
3542
3962
|
// EXTERNAL MODULE: ../../core/src/utils/sopClassDictionary.js
|
|
3543
|
-
var sopClassDictionary = __webpack_require__(
|
|
3963
|
+
var sopClassDictionary = __webpack_require__(48085);
|
|
3544
3964
|
// EXTERNAL MODULE: ../../core/src/classes/ImageSet.ts
|
|
3545
|
-
var ImageSet = __webpack_require__(
|
|
3965
|
+
var ImageSet = __webpack_require__(14169);
|
|
3546
3966
|
// EXTERNAL MODULE: ../../core/src/utils/isDisplaySetReconstructable.js
|
|
3547
|
-
var isDisplaySetReconstructable = __webpack_require__(
|
|
3967
|
+
var isDisplaySetReconstructable = __webpack_require__(13835);
|
|
3548
3968
|
;// CONCATENATED MODULE: ../../../extensions/default/package.json
|
|
3549
|
-
const package_namespaceObject = JSON.parse('{"
|
|
3969
|
+
const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/extension-default"}');
|
|
3550
3970
|
;// CONCATENATED MODULE: ../../../extensions/default/src/id.js
|
|
3551
3971
|
|
|
3552
|
-
const id = package_namespaceObject.
|
|
3972
|
+
const id = package_namespaceObject.UU;
|
|
3553
3973
|
|
|
3554
3974
|
// EXTERNAL MODULE: ../../core/src/utils/sortInstancesByPosition.ts
|
|
3555
|
-
var sortInstancesByPosition = __webpack_require__(
|
|
3975
|
+
var sortInstancesByPosition = __webpack_require__(44563);
|
|
3556
3976
|
;// CONCATENATED MODULE: ../../../extensions/default/src/utils/validations/checkMultiframe.ts
|
|
3557
3977
|
|
|
3558
3978
|
|
|
@@ -3563,18 +3983,18 @@ var sortInstancesByPosition = __webpack_require__(87425);
|
|
|
3563
3983
|
* @param {*} warnings
|
|
3564
3984
|
*/
|
|
3565
3985
|
function checkMultiFrame(multiFrameInstance, messages) {
|
|
3566
|
-
if (!(0,isDisplaySetReconstructable/* hasPixelMeasurements */.
|
|
3567
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
3986
|
+
if (!(0,isDisplaySetReconstructable/* hasPixelMeasurements */.Yt)(multiFrameInstance)) {
|
|
3987
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.MULTIFRAME_NO_PIXEL_MEASUREMENTS);
|
|
3568
3988
|
}
|
|
3569
|
-
if (!(0,isDisplaySetReconstructable/* hasOrientation */.
|
|
3570
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
3989
|
+
if (!(0,isDisplaySetReconstructable/* hasOrientation */.VX)(multiFrameInstance)) {
|
|
3990
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.MULTIFRAME_NO_ORIENTATION);
|
|
3571
3991
|
}
|
|
3572
|
-
if (!(0,isDisplaySetReconstructable/* hasPosition */.
|
|
3573
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
3992
|
+
if (!(0,isDisplaySetReconstructable/* hasPosition */.sL)(multiFrameInstance)) {
|
|
3993
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.MULTIFRAME_NO_POSITION_INFORMATION);
|
|
3574
3994
|
}
|
|
3575
3995
|
}
|
|
3576
3996
|
// EXTERNAL MODULE: ../../core/src/utils/toNumber.js
|
|
3577
|
-
var toNumber = __webpack_require__(
|
|
3997
|
+
var toNumber = __webpack_require__(58099);
|
|
3578
3998
|
;// CONCATENATED MODULE: ../../../extensions/default/src/utils/validations/areAllImageDimensionsEqual.ts
|
|
3579
3999
|
|
|
3580
4000
|
|
|
@@ -3588,8 +4008,8 @@ function areAllImageDimensionsEqual(instances) {
|
|
|
3588
4008
|
return false;
|
|
3589
4009
|
}
|
|
3590
4010
|
const firstImage = instances[0];
|
|
3591
|
-
const firstImageRows = (0,toNumber/* default */.
|
|
3592
|
-
const firstImageColumns = (0,toNumber/* default */.
|
|
4011
|
+
const firstImageRows = (0,toNumber/* default */.A)(firstImage.Rows);
|
|
4012
|
+
const firstImageColumns = (0,toNumber/* default */.A)(firstImage.Columns);
|
|
3593
4013
|
for (let i = 1; i < instances.length; i++) {
|
|
3594
4014
|
const instance = instances[i];
|
|
3595
4015
|
const {
|
|
@@ -3615,7 +4035,7 @@ function areAllImageComponentsEqual(instances) {
|
|
|
3615
4035
|
return false;
|
|
3616
4036
|
}
|
|
3617
4037
|
const firstImage = instances[0];
|
|
3618
|
-
const firstImageSamplesPerPixel = (0,toNumber/* default */.
|
|
4038
|
+
const firstImageSamplesPerPixel = (0,toNumber/* default */.A)(firstImage.SamplesPerPixel);
|
|
3619
4039
|
for (let i = 1; i < instances.length; i++) {
|
|
3620
4040
|
const instance = instances[i];
|
|
3621
4041
|
const {
|
|
@@ -3641,18 +4061,18 @@ function areAllImageOrientationsEqual(instances) {
|
|
|
3641
4061
|
return false;
|
|
3642
4062
|
}
|
|
3643
4063
|
const firstImage = instances[0];
|
|
3644
|
-
const firstImageOrientationPatient = (0,toNumber/* default */.
|
|
4064
|
+
const firstImageOrientationPatient = (0,toNumber/* default */.A)(firstImage.ImageOrientationPatient);
|
|
3645
4065
|
for (let i = 1; i < instances.length; i++) {
|
|
3646
4066
|
const instance = instances[i];
|
|
3647
|
-
const imageOrientationPatient = (0,toNumber/* default */.
|
|
3648
|
-
if (!(0,isDisplaySetReconstructable/* _isSameOrientation */.
|
|
4067
|
+
const imageOrientationPatient = (0,toNumber/* default */.A)(instance.ImageOrientationPatient);
|
|
4068
|
+
if (!(0,isDisplaySetReconstructable/* _isSameOrientation */.sW)(imageOrientationPatient, firstImageOrientationPatient)) {
|
|
3649
4069
|
return false;
|
|
3650
4070
|
}
|
|
3651
4071
|
}
|
|
3652
4072
|
return true;
|
|
3653
4073
|
}
|
|
3654
4074
|
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 10 modules
|
|
3655
|
-
var esm = __webpack_require__(
|
|
4075
|
+
var esm = __webpack_require__(83636);
|
|
3656
4076
|
;// CONCATENATED MODULE: ../../../extensions/default/src/utils/calculateScanAxisNormal.ts
|
|
3657
4077
|
|
|
3658
4078
|
|
|
@@ -3662,9 +4082,9 @@ var esm = __webpack_require__(45451);
|
|
|
3662
4082
|
* @returns
|
|
3663
4083
|
*/
|
|
3664
4084
|
function calculateScanAxisNormal(imageOrientation) {
|
|
3665
|
-
const rowCosineVec = esm/* vec3.fromValues */.
|
|
3666
|
-
const colCosineVec = esm/* vec3.fromValues */.
|
|
3667
|
-
return esm/* vec3.cross */.
|
|
4085
|
+
const rowCosineVec = esm/* vec3.fromValues */.eR.fromValues(imageOrientation[0], imageOrientation[1], imageOrientation[2]);
|
|
4086
|
+
const colCosineVec = esm/* vec3.fromValues */.eR.fromValues(imageOrientation[3], imageOrientation[4], imageOrientation[5]);
|
|
4087
|
+
return esm/* vec3.cross */.eR.cross(esm/* vec3.create */.eR.create(), rowCosineVec, colCosineVec);
|
|
3668
4088
|
}
|
|
3669
4089
|
;// CONCATENATED MODULE: ../../../extensions/default/src/utils/validations/areAllImagePositionsEqual.ts
|
|
3670
4090
|
|
|
@@ -3683,8 +4103,8 @@ function calculateScanAxisNormal(imageOrientation) {
|
|
|
3683
4103
|
function _checkSeriesPositionShift(previousPosition, actualPosition, scanAxisNormal, averageSpacingBetweenFrames) {
|
|
3684
4104
|
// predicted position should be the previous position added by the multiplication
|
|
3685
4105
|
// of the scanAxisNormal and the average spacing between frames
|
|
3686
|
-
const predictedPosition = esm/* vec3.scaleAndAdd */.
|
|
3687
|
-
return esm/* vec3.distance */.
|
|
4106
|
+
const predictedPosition = esm/* vec3.scaleAndAdd */.eR.scaleAndAdd(esm/* vec3.create */.eR.create(), previousPosition, scanAxisNormal, averageSpacingBetweenFrames);
|
|
4107
|
+
return esm/* vec3.distance */.eR.distance(actualPosition, predictedPosition) > averageSpacingBetweenFrames;
|
|
3688
4108
|
}
|
|
3689
4109
|
|
|
3690
4110
|
/**
|
|
@@ -3696,18 +4116,18 @@ function areAllImagePositionsEqual(instances) {
|
|
|
3696
4116
|
if (!instances?.length) {
|
|
3697
4117
|
return false;
|
|
3698
4118
|
}
|
|
3699
|
-
const firstImageOrientationPatient = (0,toNumber/* default */.
|
|
4119
|
+
const firstImageOrientationPatient = (0,toNumber/* default */.A)(instances[0].ImageOrientationPatient);
|
|
3700
4120
|
if (!firstImageOrientationPatient) {
|
|
3701
4121
|
return false;
|
|
3702
4122
|
}
|
|
3703
4123
|
const scanAxisNormal = calculateScanAxisNormal(firstImageOrientationPatient);
|
|
3704
|
-
const firstImagePositionPatient = (0,toNumber/* default */.
|
|
3705
|
-
const lastIpp = (0,toNumber/* default */.
|
|
3706
|
-
const averageSpacingBetweenFrames = (0,isDisplaySetReconstructable/* _getPerpendicularDistance */.
|
|
4124
|
+
const firstImagePositionPatient = (0,toNumber/* default */.A)(instances[0].ImagePositionPatient);
|
|
4125
|
+
const lastIpp = (0,toNumber/* default */.A)(instances[instances.length - 1].ImagePositionPatient);
|
|
4126
|
+
const averageSpacingBetweenFrames = (0,isDisplaySetReconstructable/* _getPerpendicularDistance */.jj)(firstImagePositionPatient, lastIpp) / (instances.length - 1);
|
|
3707
4127
|
let previousImagePositionPatient = firstImagePositionPatient;
|
|
3708
4128
|
for (let i = 1; i < instances.length; i++) {
|
|
3709
4129
|
const instance = instances[i];
|
|
3710
|
-
const imagePositionPatient = (0,toNumber/* default */.
|
|
4130
|
+
const imagePositionPatient = (0,toNumber/* default */.A)(instance.ImagePositionPatient);
|
|
3711
4131
|
if (_checkSeriesPositionShift(previousImagePositionPatient, imagePositionPatient, scanAxisNormal, averageSpacingBetweenFrames)) {
|
|
3712
4132
|
return false;
|
|
3713
4133
|
}
|
|
@@ -3728,29 +4148,29 @@ function areAllImageSpacingEqual(instances, messages) {
|
|
|
3728
4148
|
if (!instances?.length) {
|
|
3729
4149
|
return;
|
|
3730
4150
|
}
|
|
3731
|
-
const firstImagePositionPatient = (0,toNumber/* default */.
|
|
4151
|
+
const firstImagePositionPatient = (0,toNumber/* default */.A)(instances[0].ImagePositionPatient);
|
|
3732
4152
|
if (!firstImagePositionPatient) {
|
|
3733
4153
|
return;
|
|
3734
4154
|
}
|
|
3735
|
-
const lastIpp = (0,toNumber/* default */.
|
|
3736
|
-
const averageSpacingBetweenFrames = (0,isDisplaySetReconstructable/* _getPerpendicularDistance */.
|
|
4155
|
+
const lastIpp = (0,toNumber/* default */.A)(instances[instances.length - 1].ImagePositionPatient);
|
|
4156
|
+
const averageSpacingBetweenFrames = (0,isDisplaySetReconstructable/* _getPerpendicularDistance */.jj)(firstImagePositionPatient, lastIpp) / (instances.length - 1);
|
|
3737
4157
|
let previousImagePositionPatient = firstImagePositionPatient;
|
|
3738
4158
|
const issuesFound = [];
|
|
3739
4159
|
for (let i = 1; i < instances.length; i++) {
|
|
3740
4160
|
const instance = instances[i];
|
|
3741
|
-
const imagePositionPatient = (0,toNumber/* default */.
|
|
3742
|
-
const spacingBetweenFrames = (0,isDisplaySetReconstructable/* _getPerpendicularDistance */.
|
|
3743
|
-
const spacingIssue = (0,isDisplaySetReconstructable/* _getSpacingIssue */.
|
|
4161
|
+
const imagePositionPatient = (0,toNumber/* default */.A)(instance.ImagePositionPatient);
|
|
4162
|
+
const spacingBetweenFrames = (0,isDisplaySetReconstructable/* _getPerpendicularDistance */.jj)(imagePositionPatient, previousImagePositionPatient);
|
|
4163
|
+
const spacingIssue = (0,isDisplaySetReconstructable/* _getSpacingIssue */.Op)(spacingBetweenFrames, averageSpacingBetweenFrames);
|
|
3744
4164
|
if (spacingIssue) {
|
|
3745
4165
|
const issue = spacingIssue.issue;
|
|
3746
4166
|
|
|
3747
4167
|
// avoid multiple warning of the same thing
|
|
3748
4168
|
if (!issuesFound.includes(issue)) {
|
|
3749
4169
|
issuesFound.push(issue);
|
|
3750
|
-
if (issue === isDisplaySetReconstructable/* reconstructionIssues */.
|
|
3751
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
3752
|
-
} else if (issue === isDisplaySetReconstructable/* reconstructionIssues */.
|
|
3753
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
4170
|
+
if (issue === isDisplaySetReconstructable/* reconstructionIssues */.JG.MISSING_FRAMES) {
|
|
4171
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.MISSING_FRAMES);
|
|
4172
|
+
} else if (issue === isDisplaySetReconstructable/* reconstructionIssues */.JG.IRREGULAR_SPACING) {
|
|
4173
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.IRREGULAR_SPACING);
|
|
3754
4174
|
}
|
|
3755
4175
|
}
|
|
3756
4176
|
// we just want to find issues not how many
|
|
@@ -3777,16 +4197,16 @@ function areAllImageSpacingEqual(instances, messages) {
|
|
|
3777
4197
|
function checkSingleFrames(instances, messages) {
|
|
3778
4198
|
if (instances.length > 2) {
|
|
3779
4199
|
if (!areAllImageDimensionsEqual(instances)) {
|
|
3780
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
4200
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.INCONSISTENT_DIMENSIONS);
|
|
3781
4201
|
}
|
|
3782
4202
|
if (!areAllImageComponentsEqual(instances)) {
|
|
3783
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
4203
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.INCONSISTENT_COMPONENTS);
|
|
3784
4204
|
}
|
|
3785
4205
|
if (!areAllImageOrientationsEqual(instances)) {
|
|
3786
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
4206
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.INCONSISTENT_ORIENTATIONS);
|
|
3787
4207
|
}
|
|
3788
4208
|
if (!areAllImagePositionsEqual(instances)) {
|
|
3789
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
4209
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.INCONSISTENT_POSITION_INFORMATION);
|
|
3790
4210
|
}
|
|
3791
4211
|
areAllImageSpacingEqual(instances, messages);
|
|
3792
4212
|
}
|
|
@@ -3803,9 +4223,9 @@ function checkSingleFrames(instances, messages) {
|
|
|
3803
4223
|
* @param {Object[]} instances An array of `OHIFInstanceMetadata` objects.
|
|
3804
4224
|
*/
|
|
3805
4225
|
function getDisplaySetMessages(instances, isReconstructable) {
|
|
3806
|
-
const messages = new src/* DisplaySetMessageList */.
|
|
4226
|
+
const messages = new src/* DisplaySetMessageList */.WZ();
|
|
3807
4227
|
if (!instances.length) {
|
|
3808
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
4228
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.NO_VALID_INSTANCES);
|
|
3809
4229
|
return;
|
|
3810
4230
|
}
|
|
3811
4231
|
const firstInstance = instances[0];
|
|
@@ -3818,18 +4238,18 @@ function getDisplaySetMessages(instances, isReconstructable) {
|
|
|
3818
4238
|
if (ImageType?.includes('LOCALIZER')) {
|
|
3819
4239
|
return messages;
|
|
3820
4240
|
}
|
|
3821
|
-
if (!isDisplaySetReconstructable/* constructableModalities */.
|
|
4241
|
+
if (!isDisplaySetReconstructable/* constructableModalities */.Hf.includes(Modality)) {
|
|
3822
4242
|
return messages;
|
|
3823
4243
|
}
|
|
3824
4244
|
const isMultiframe = NumberOfFrames > 1;
|
|
3825
4245
|
// Can't reconstruct if all instances don't have the ImagePositionPatient.
|
|
3826
4246
|
if (!isMultiframe && !instances.every(instance => instance.ImagePositionPatient)) {
|
|
3827
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
4247
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.NO_POSITION_INFORMATION);
|
|
3828
4248
|
}
|
|
3829
|
-
const sortedInstances = (0,sortInstancesByPosition/* default */.
|
|
4249
|
+
const sortedInstances = (0,sortInstancesByPosition/* default */.A)(instances);
|
|
3830
4250
|
isMultiframe ? checkMultiFrame(sortedInstances[0], messages) : checkSingleFrames(sortedInstances, messages);
|
|
3831
4251
|
if (!isReconstructable) {
|
|
3832
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
4252
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.NOT_RECONSTRUCTABLE);
|
|
3833
4253
|
}
|
|
3834
4254
|
return messages;
|
|
3835
4255
|
}
|
|
@@ -3840,9 +4260,9 @@ function getDisplaySetMessages(instances, isReconstructable) {
|
|
|
3840
4260
|
* Default handler for a instance list with an unsupported sopClassUID
|
|
3841
4261
|
*/
|
|
3842
4262
|
function getDisplaySetsFromUnsupportedSeries(instances) {
|
|
3843
|
-
const imageSet = new ImageSet/* default */.
|
|
3844
|
-
const messages = new src/* DisplaySetMessageList */.
|
|
3845
|
-
messages.addMessage(src/* DisplaySetMessage */.
|
|
4263
|
+
const imageSet = new ImageSet/* default */.A(instances);
|
|
4264
|
+
const messages = new src/* DisplaySetMessageList */.WZ();
|
|
4265
|
+
messages.addMessage(src/* DisplaySetMessage */.Ob.CODES.UNSUPPORTED_DISPLAYSET);
|
|
3846
4266
|
const instance = instances[0];
|
|
3847
4267
|
imageSet.setAttributes({
|
|
3848
4268
|
displaySetInstanceUID: imageSet.uid,
|
|
@@ -3878,11 +4298,11 @@ const isMultiFrame = instance => {
|
|
|
3878
4298
|
};
|
|
3879
4299
|
const makeDisplaySet = instances => {
|
|
3880
4300
|
const instance = instances[0];
|
|
3881
|
-
const imageSet = new ImageSet/* default */.
|
|
4301
|
+
const imageSet = new ImageSet/* default */.A(instances);
|
|
3882
4302
|
const {
|
|
3883
4303
|
value: isReconstructable,
|
|
3884
4304
|
averageSpacingBetweenFrames
|
|
3885
|
-
} = (0,isDisplaySetReconstructable/* default */.
|
|
4305
|
+
} = (0,isDisplaySetReconstructable/* default */.Ay)(instances);
|
|
3886
4306
|
// set appropriate attributes to image set...
|
|
3887
4307
|
const messages = getDisplaySetMessages(instances, isReconstructable);
|
|
3888
4308
|
imageSet.setAttributes({
|
|
@@ -3967,7 +4387,7 @@ function getDisplaySetsFromSeries(instances) {
|
|
|
3967
4387
|
const stackableInstances = [];
|
|
3968
4388
|
instances.forEach(instance => {
|
|
3969
4389
|
// All imaging modalities must have a valid value for sopClassUid (x00080016) or rows (x00280010)
|
|
3970
|
-
if (!(0,isImage/* isImage */.
|
|
4390
|
+
if (!(0,isImage/* isImage */.w)(instance.SOPClassUID) && !instance.Rows) {
|
|
3971
4391
|
return;
|
|
3972
4392
|
}
|
|
3973
4393
|
let displaySet;
|
|
@@ -4003,7 +4423,7 @@ function getDisplaySetsFromSeries(instances) {
|
|
|
4003
4423
|
}
|
|
4004
4424
|
return displaySets;
|
|
4005
4425
|
}
|
|
4006
|
-
const sopClassUids = [sopClassDictionary/* default */.
|
|
4426
|
+
const sopClassUids = [sopClassDictionary/* default */.A.ComputedRadiographyImageStorage, sopClassDictionary/* default */.A.DigitalXRayImageStorageForPresentation, sopClassDictionary/* default */.A.DigitalXRayImageStorageForProcessing, sopClassDictionary/* default */.A.DigitalMammographyXRayImageStorageForPresentation, sopClassDictionary/* default */.A.DigitalMammographyXRayImageStorageForProcessing, sopClassDictionary/* default */.A.DigitalIntraOralXRayImageStorageForPresentation, sopClassDictionary/* default */.A.DigitalIntraOralXRayImageStorageForProcessing, sopClassDictionary/* default */.A.CTImageStorage, sopClassDictionary/* default */.A.EnhancedCTImageStorage, sopClassDictionary/* default */.A.LegacyConvertedEnhancedCTImageStorage, sopClassDictionary/* default */.A.UltrasoundMultiframeImageStorage, sopClassDictionary/* default */.A.MRImageStorage, sopClassDictionary/* default */.A.EnhancedMRImageStorage, sopClassDictionary/* default */.A.EnhancedMRColorImageStorage, sopClassDictionary/* default */.A.LegacyConvertedEnhancedMRImageStorage, sopClassDictionary/* default */.A.UltrasoundImageStorage, sopClassDictionary/* default */.A.UltrasoundImageStorageRET, sopClassDictionary/* default */.A.SecondaryCaptureImageStorage, sopClassDictionary/* default */.A.MultiframeSingleBitSecondaryCaptureImageStorage, sopClassDictionary/* default */.A.MultiframeGrayscaleByteSecondaryCaptureImageStorage, sopClassDictionary/* default */.A.MultiframeGrayscaleWordSecondaryCaptureImageStorage, sopClassDictionary/* default */.A.MultiframeTrueColorSecondaryCaptureImageStorage, sopClassDictionary/* default */.A.XRayAngiographicImageStorage, sopClassDictionary/* default */.A.EnhancedXAImageStorage, sopClassDictionary/* default */.A.XRayRadiofluoroscopicImageStorage, sopClassDictionary/* default */.A.EnhancedXRFImageStorage, sopClassDictionary/* default */.A.XRay3DAngiographicImageStorage, sopClassDictionary/* default */.A.XRay3DCraniofacialImageStorage, sopClassDictionary/* default */.A.BreastTomosynthesisImageStorage, sopClassDictionary/* default */.A.BreastProjectionXRayImageStorageForPresentation, sopClassDictionary/* default */.A.BreastProjectionXRayImageStorageForProcessing, sopClassDictionary/* default */.A.IntravascularOpticalCoherenceTomographyImageStorageForPresentation, sopClassDictionary/* default */.A.IntravascularOpticalCoherenceTomographyImageStorageForProcessing, sopClassDictionary/* default */.A.NuclearMedicineImageStorage, sopClassDictionary/* default */.A.VLEndoscopicImageStorage, sopClassDictionary/* default */.A.VideoEndoscopicImageStorage, sopClassDictionary/* default */.A.VLMicroscopicImageStorage, sopClassDictionary/* default */.A.VideoMicroscopicImageStorage, sopClassDictionary/* default */.A.VLSlideCoordinatesMicroscopicImageStorage, sopClassDictionary/* default */.A.VLPhotographicImageStorage, sopClassDictionary/* default */.A.VideoPhotographicImageStorage, sopClassDictionary/* default */.A.OphthalmicPhotography8BitImageStorage, sopClassDictionary/* default */.A.OphthalmicPhotography16BitImageStorage, sopClassDictionary/* default */.A.OphthalmicTomographyImageStorage, sopClassDictionary/* default */.A.VLWholeSlideMicroscopyImageStorage, sopClassDictionary/* default */.A.PositronEmissionTomographyImageStorage, sopClassDictionary/* default */.A.EnhancedPETImageStorage, sopClassDictionary/* default */.A.LegacyConvertedEnhancedPETImageStorage, sopClassDictionary/* default */.A.RTImageStorage, sopClassDictionary/* default */.A.EnhancedUSVolumeStorage];
|
|
4007
4427
|
function getSopClassHandlerModule() {
|
|
4008
4428
|
return [{
|
|
4009
4429
|
name: sopClassHandlerName,
|
|
@@ -4029,11 +4449,10 @@ function ToolbarLayoutSelector_extends() { ToolbarLayoutSelector_extends = Objec
|
|
|
4029
4449
|
|
|
4030
4450
|
|
|
4031
4451
|
|
|
4032
|
-
function ToolbarLayoutSelectorWithServices(
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
} = _ref;
|
|
4452
|
+
function ToolbarLayoutSelectorWithServices({
|
|
4453
|
+
servicesManager,
|
|
4454
|
+
...props
|
|
4455
|
+
}) {
|
|
4037
4456
|
const {
|
|
4038
4457
|
toolbarService
|
|
4039
4458
|
} = servicesManager.services;
|
|
@@ -4053,14 +4472,13 @@ function ToolbarLayoutSelectorWithServices(_ref) {
|
|
|
4053
4472
|
onSelection: onSelection
|
|
4054
4473
|
}));
|
|
4055
4474
|
}
|
|
4056
|
-
function LayoutSelector(
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
} = _ref2;
|
|
4475
|
+
function LayoutSelector({
|
|
4476
|
+
rows,
|
|
4477
|
+
columns,
|
|
4478
|
+
className,
|
|
4479
|
+
onSelection,
|
|
4480
|
+
...rest
|
|
4481
|
+
}) {
|
|
4064
4482
|
const [isOpen, setIsOpen] = (0,react.useState)(false);
|
|
4065
4483
|
const closeOnOutsideClick = () => {
|
|
4066
4484
|
if (isOpen) {
|
|
@@ -4074,8 +4492,8 @@ function LayoutSelector(_ref2) {
|
|
|
4074
4492
|
};
|
|
4075
4493
|
}, [isOpen]);
|
|
4076
4494
|
const onInteractionHandler = () => setIsOpen(!isOpen);
|
|
4077
|
-
const DropdownContent = isOpen ? ui_src/* LayoutSelector */.
|
|
4078
|
-
return /*#__PURE__*/react.createElement(ui_src/* ToolbarButton */.
|
|
4495
|
+
const DropdownContent = isOpen ? ui_src/* LayoutSelector */.sG : null;
|
|
4496
|
+
return /*#__PURE__*/react.createElement(ui_src/* ToolbarButton */.IB, {
|
|
4079
4497
|
id: "Layout",
|
|
4080
4498
|
label: "Grid Layout",
|
|
4081
4499
|
icon: "tool-layout",
|
|
@@ -4095,7 +4513,7 @@ LayoutSelector.propTypes = {
|
|
|
4095
4513
|
rows: (prop_types_default()).number,
|
|
4096
4514
|
columns: (prop_types_default()).number,
|
|
4097
4515
|
onLayoutChange: (prop_types_default()).func,
|
|
4098
|
-
servicesManager: prop_types_default().instanceOf(src/* ServicesManager */.
|
|
4516
|
+
servicesManager: prop_types_default().instanceOf(src/* ServicesManager */.CS)
|
|
4099
4517
|
};
|
|
4100
4518
|
LayoutSelector.defaultProps = {
|
|
4101
4519
|
rows: 3,
|
|
@@ -4109,18 +4527,17 @@ function ToolbarSplitButtonWithServices_extends() { ToolbarSplitButtonWithServic
|
|
|
4109
4527
|
|
|
4110
4528
|
|
|
4111
4529
|
|
|
4112
|
-
function ToolbarSplitButtonWithServices(
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
} = _ref;
|
|
4530
|
+
function ToolbarSplitButtonWithServices({
|
|
4531
|
+
isRadio,
|
|
4532
|
+
isAction,
|
|
4533
|
+
groupId,
|
|
4534
|
+
primary,
|
|
4535
|
+
secondary,
|
|
4536
|
+
items,
|
|
4537
|
+
renderer,
|
|
4538
|
+
onInteraction,
|
|
4539
|
+
servicesManager
|
|
4540
|
+
}) {
|
|
4124
4541
|
const {
|
|
4125
4542
|
toolbarService
|
|
4126
4543
|
} = servicesManager?.services;
|
|
@@ -4168,7 +4585,7 @@ function ToolbarSplitButtonWithServices(_ref) {
|
|
|
4168
4585
|
} = buttonsState;
|
|
4169
4586
|
const isPrimaryToggle = state.primary.type === 'toggle';
|
|
4170
4587
|
const isPrimaryActive = state.primary.type === 'tool' && primaryToolId === state.primary.id || isPrimaryToggle && toggles[state.primary.id] === true;
|
|
4171
|
-
const PrimaryButtonComponent = toolbarService?.getButtonComponentForUIType(state.primary.uiType) ?? ui_src/* ToolbarButton */.
|
|
4588
|
+
const PrimaryButtonComponent = toolbarService?.getButtonComponentForUIType(state.primary.uiType) ?? ui_src/* ToolbarButton */.IB;
|
|
4172
4589
|
(0,react.useEffect)(() => {
|
|
4173
4590
|
const {
|
|
4174
4591
|
unsubscribe
|
|
@@ -4193,20 +4610,19 @@ function ToolbarSplitButtonWithServices(_ref) {
|
|
|
4193
4610
|
isActive
|
|
4194
4611
|
};
|
|
4195
4612
|
});
|
|
4196
|
-
const DefaultListItemRenderer =
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
} = _ref2;
|
|
4613
|
+
const DefaultListItemRenderer = ({
|
|
4614
|
+
type,
|
|
4615
|
+
icon,
|
|
4616
|
+
label,
|
|
4617
|
+
t,
|
|
4618
|
+
id
|
|
4619
|
+
}) => {
|
|
4204
4620
|
const isActive = type === 'toggle' && toggles[id] === true;
|
|
4205
4621
|
return /*#__PURE__*/react.createElement("div", {
|
|
4206
4622
|
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')
|
|
4207
4623
|
}, icon && /*#__PURE__*/react.createElement("span", {
|
|
4208
4624
|
className: "mr-4"
|
|
4209
|
-
}, /*#__PURE__*/react.createElement(ui_src/* Icon */.
|
|
4625
|
+
}, /*#__PURE__*/react.createElement(ui_src/* Icon */.In, {
|
|
4210
4626
|
name: icon,
|
|
4211
4627
|
className: "h-5 w-5"
|
|
4212
4628
|
})), /*#__PURE__*/react.createElement("span", {
|
|
@@ -4214,7 +4630,7 @@ function ToolbarSplitButtonWithServices(_ref) {
|
|
|
4214
4630
|
}, t(label)));
|
|
4215
4631
|
};
|
|
4216
4632
|
const listItemRenderer = renderer || DefaultListItemRenderer;
|
|
4217
|
-
return /*#__PURE__*/react.createElement(ui_src/* SplitButton */.
|
|
4633
|
+
return /*#__PURE__*/react.createElement(ui_src/* SplitButton */.fk, {
|
|
4218
4634
|
isRadio: isRadio,
|
|
4219
4635
|
isAction: isAction,
|
|
4220
4636
|
primary: state.primary,
|
|
@@ -4271,15 +4687,14 @@ function ToolbarButtonWithServices_extends() { ToolbarButtonWithServices_extends
|
|
|
4271
4687
|
|
|
4272
4688
|
|
|
4273
4689
|
|
|
4274
|
-
function ToolbarButtonWithServices(
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
} = _ref;
|
|
4690
|
+
function ToolbarButtonWithServices({
|
|
4691
|
+
id,
|
|
4692
|
+
type,
|
|
4693
|
+
commands,
|
|
4694
|
+
onInteraction,
|
|
4695
|
+
servicesManager,
|
|
4696
|
+
...props
|
|
4697
|
+
}) {
|
|
4283
4698
|
const {
|
|
4284
4699
|
toolbarService
|
|
4285
4700
|
} = servicesManager?.services || {};
|
|
@@ -4304,7 +4719,7 @@ function ToolbarButtonWithServices(_ref) {
|
|
|
4304
4719
|
unsubscribe();
|
|
4305
4720
|
};
|
|
4306
4721
|
}, [toolbarService]);
|
|
4307
|
-
return /*#__PURE__*/react.createElement(ui_src/* ToolbarButton */.
|
|
4722
|
+
return /*#__PURE__*/react.createElement(ui_src/* ToolbarButton */.IB, ToolbarButtonWithServices_extends({
|
|
4308
4723
|
commands: commands,
|
|
4309
4724
|
id: id,
|
|
4310
4725
|
type: type,
|
|
@@ -4339,11 +4754,10 @@ ToolbarButtonWithServices.propTypes = {
|
|
|
4339
4754
|
|
|
4340
4755
|
|
|
4341
4756
|
|
|
4342
|
-
function getToolbarModule(
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
} = _ref;
|
|
4757
|
+
function getToolbarModule({
|
|
4758
|
+
commandsManager,
|
|
4759
|
+
servicesManager
|
|
4760
|
+
}) {
|
|
4347
4761
|
return [{
|
|
4348
4762
|
name: 'ohif.divider',
|
|
4349
4763
|
defaultComponent: ToolbarDivider,
|
|
@@ -4536,8 +4950,12 @@ function adaptItem(item, subProps) {
|
|
|
4536
4950
|
return newItem;
|
|
4537
4951
|
}
|
|
4538
4952
|
// EXTERNAL MODULE: ../../ui/src/components/ContextMenu/ContextMenu.tsx
|
|
4539
|
-
var ContextMenu = __webpack_require__(
|
|
4953
|
+
var ContextMenu = __webpack_require__(59852);
|
|
4954
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 14 modules
|
|
4955
|
+
var dist_esm = __webpack_require__(72980);
|
|
4540
4956
|
;// CONCATENATED MODULE: ../../../extensions/default/src/CustomizableContextMenu/ContextMenuController.tsx
|
|
4957
|
+
var _class;
|
|
4958
|
+
|
|
4541
4959
|
|
|
4542
4960
|
|
|
4543
4961
|
/**
|
|
@@ -4584,6 +5002,16 @@ class ContextMenuController {
|
|
|
4584
5002
|
menus,
|
|
4585
5003
|
selectorProps
|
|
4586
5004
|
} = contextMenuProps;
|
|
5005
|
+
const annotationManager = dist_esm.annotation.state.getAnnotationManager();
|
|
5006
|
+
const {
|
|
5007
|
+
locking
|
|
5008
|
+
} = dist_esm.annotation;
|
|
5009
|
+
const targetAnnotationId = selectorProps?.nearbyToolData?.annotationUID;
|
|
5010
|
+
const isLocked = locking.isAnnotationLocked(annotationManager.getAnnotation(targetAnnotationId));
|
|
5011
|
+
if (isLocked) {
|
|
5012
|
+
console.warn('Annotation is locked.');
|
|
5013
|
+
return;
|
|
5014
|
+
}
|
|
4587
5015
|
console.log('Getting items from', menus);
|
|
4588
5016
|
const items = getMenuItems(selectorProps || contextMenuProps, event, menus, menuId);
|
|
4589
5017
|
this.services.uiDialogService.dismiss({
|
|
@@ -4596,7 +5024,7 @@ class ContextMenuController {
|
|
|
4596
5024
|
preventCutOf: true,
|
|
4597
5025
|
defaultPosition: ContextMenuController._getDefaultPosition(defaultPointsPosition, event?.detail, viewportElement),
|
|
4598
5026
|
event,
|
|
4599
|
-
content: ContextMenu/* default */.
|
|
5027
|
+
content: ContextMenu/* default */.A,
|
|
4600
5028
|
// This naming is part of the uiDialogService convention
|
|
4601
5029
|
// Clicking outside simply closes the dialog box.
|
|
4602
5030
|
onClickOutside: () => this.services.uiDialogService.dismiss({
|
|
@@ -4642,6 +5070,7 @@ class ContextMenuController {
|
|
|
4642
5070
|
});
|
|
4643
5071
|
}
|
|
4644
5072
|
}
|
|
5073
|
+
_class = ContextMenuController;
|
|
4645
5074
|
ContextMenuController.getDefaultPosition = () => {
|
|
4646
5075
|
return {
|
|
4647
5076
|
x: 0,
|
|
@@ -4665,16 +5094,14 @@ ContextMenuController._getElementDefaultPosition = element => {
|
|
|
4665
5094
|
y: undefined
|
|
4666
5095
|
};
|
|
4667
5096
|
};
|
|
4668
|
-
ContextMenuController._getCanvasPointsPosition =
|
|
4669
|
-
|
|
4670
|
-
let element = arguments.length > 1 ? arguments[1] : undefined;
|
|
4671
|
-
const viewerPos = ContextMenuController._getElementDefaultPosition(element);
|
|
5097
|
+
ContextMenuController._getCanvasPointsPosition = (points = [], element) => {
|
|
5098
|
+
const viewerPos = _class._getElementDefaultPosition(element);
|
|
4672
5099
|
for (let pointIndex = 0; pointIndex < points.length; pointIndex++) {
|
|
4673
5100
|
const point = {
|
|
4674
5101
|
x: points[pointIndex][0] || points[pointIndex]['x'],
|
|
4675
5102
|
y: points[pointIndex][1] || points[pointIndex]['y']
|
|
4676
5103
|
};
|
|
4677
|
-
if (
|
|
5104
|
+
if (_class._isValidPosition(point) && _class._isValidPosition(viewerPos)) {
|
|
4678
5105
|
return {
|
|
4679
5106
|
x: point.x + viewerPos.x,
|
|
4680
5107
|
y: point.y + viewerPos.y
|
|
@@ -4690,17 +5117,17 @@ ContextMenuController._isValidPosition = source => {
|
|
|
4690
5117
|
*/
|
|
4691
5118
|
ContextMenuController._getDefaultPosition = (canvasPoints, eventDetail, viewerElement) => {
|
|
4692
5119
|
function* getPositionIterator() {
|
|
4693
|
-
yield
|
|
4694
|
-
yield
|
|
4695
|
-
yield
|
|
4696
|
-
yield
|
|
5120
|
+
yield _class._getCanvasPointsPosition(canvasPoints, viewerElement);
|
|
5121
|
+
yield _class._getEventDefaultPosition(eventDetail);
|
|
5122
|
+
yield _class._getElementDefaultPosition(viewerElement);
|
|
5123
|
+
yield _class.getDefaultPosition();
|
|
4697
5124
|
}
|
|
4698
5125
|
const positionIterator = getPositionIterator();
|
|
4699
5126
|
let current = positionIterator.next();
|
|
4700
5127
|
let position = current.value;
|
|
4701
5128
|
while (!current.done) {
|
|
4702
5129
|
position = current.value;
|
|
4703
|
-
if (
|
|
5130
|
+
if (_class._isValidPosition(position)) {
|
|
4704
5131
|
positionIterator.return();
|
|
4705
5132
|
}
|
|
4706
5133
|
current = positionIterator.next();
|
|
@@ -4715,12 +5142,9 @@ const defaultContextMenu = {
|
|
|
4715
5142
|
// Get the items from the UI Customization for the menu name (and have a custom name)
|
|
4716
5143
|
{
|
|
4717
5144
|
id: 'forExistingMeasurement',
|
|
4718
|
-
selector:
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
} = _ref;
|
|
4722
|
-
return !!nearbyToolData;
|
|
4723
|
-
},
|
|
5145
|
+
selector: ({
|
|
5146
|
+
nearbyToolData
|
|
5147
|
+
}) => !!nearbyToolData,
|
|
4724
5148
|
items: [{
|
|
4725
5149
|
label: 'Delete measurement',
|
|
4726
5150
|
commands: [{
|
|
@@ -4745,10 +5169,10 @@ const defaultContextMenu = {
|
|
|
4745
5169
|
|
|
4746
5170
|
|
|
4747
5171
|
// EXTERNAL MODULE: ../../../node_modules/moment/moment.js
|
|
4748
|
-
var moment = __webpack_require__(
|
|
5172
|
+
var moment = __webpack_require__(8291);
|
|
4749
5173
|
var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
|
|
4750
5174
|
// EXTERNAL MODULE: ../../../node_modules/react-window/dist/index.esm.js
|
|
4751
|
-
var index_esm = __webpack_require__(
|
|
5175
|
+
var index_esm = __webpack_require__(6943);
|
|
4752
5176
|
;// CONCATENATED MODULE: ../../../extensions/default/src/DicomTagBrowser/DicomTagTable.tsx
|
|
4753
5177
|
|
|
4754
5178
|
|
|
@@ -4765,13 +5189,12 @@ const rowStyle = {
|
|
|
4765
5189
|
borderBottomWidth: `${rowBottomBorderPx}px`,
|
|
4766
5190
|
...rowVerticalPaddingStyle
|
|
4767
5191
|
};
|
|
4768
|
-
function ColumnHeaders(
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
} = _ref;
|
|
5192
|
+
function ColumnHeaders({
|
|
5193
|
+
tagRef,
|
|
5194
|
+
vrRef,
|
|
5195
|
+
keywordRef,
|
|
5196
|
+
valueRef
|
|
5197
|
+
}) {
|
|
4775
5198
|
return /*#__PURE__*/react.createElement("div", {
|
|
4776
5199
|
className: classnames_default()('bg-secondary-dark ohif-scrollbar flex w-full flex-row overflow-y-scroll'),
|
|
4777
5200
|
style: rowVerticalPaddingStyle
|
|
@@ -4805,10 +5228,9 @@ function ColumnHeaders(_ref) {
|
|
|
4805
5228
|
className: "flex flex-row items-center focus:outline-none"
|
|
4806
5229
|
}, "Value"))));
|
|
4807
5230
|
}
|
|
4808
|
-
function DicomTagTable(
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
} = _ref2;
|
|
5231
|
+
function DicomTagTable({
|
|
5232
|
+
rows
|
|
5233
|
+
}) {
|
|
4812
5234
|
const listRef = (0,react.useRef)();
|
|
4813
5235
|
const canvasRef = (0,react.useRef)();
|
|
4814
5236
|
const [tagHeaderElem, setTagHeaderElem] = (0,react.useState)(null);
|
|
@@ -4862,11 +5284,10 @@ function DicomTagTable(_ref2) {
|
|
|
4862
5284
|
window.removeEventListener('resize', debouncedResize);
|
|
4863
5285
|
};
|
|
4864
5286
|
}, []);
|
|
4865
|
-
const Row = (0,react.useCallback)(
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
} = _ref3;
|
|
5287
|
+
const Row = (0,react.useCallback)(({
|
|
5288
|
+
index,
|
|
5289
|
+
style
|
|
5290
|
+
}) => {
|
|
4870
5291
|
const row = rows[index];
|
|
4871
5292
|
return /*#__PURE__*/react.createElement("div", {
|
|
4872
5293
|
style: {
|
|
@@ -4924,7 +5345,7 @@ function DicomTagTable(_ref2) {
|
|
|
4924
5345
|
style: {
|
|
4925
5346
|
height: '32rem'
|
|
4926
5347
|
}
|
|
4927
|
-
}, isHeaderRendered() && /*#__PURE__*/react.createElement(index_esm/* VariableSizeList */.
|
|
5348
|
+
}, isHeaderRendered() && /*#__PURE__*/react.createElement(index_esm/* VariableSizeList */._m, {
|
|
4928
5349
|
ref: listRef,
|
|
4929
5350
|
height: 500,
|
|
4930
5351
|
itemCount: rows.length,
|
|
@@ -4951,15 +5372,14 @@ const {
|
|
|
4951
5372
|
} = src.classes;
|
|
4952
5373
|
const {
|
|
4953
5374
|
DicomMetaDictionary: DicomTagBrowser_DicomMetaDictionary
|
|
4954
|
-
} = dcmjs_es
|
|
5375
|
+
} = dcmjs_es/* default.data */.Ay.data;
|
|
4955
5376
|
const {
|
|
4956
5377
|
nameMap
|
|
4957
5378
|
} = DicomTagBrowser_DicomMetaDictionary;
|
|
4958
|
-
const DicomTagBrowser =
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
} = _ref;
|
|
5379
|
+
const DicomTagBrowser = ({
|
|
5380
|
+
displaySets,
|
|
5381
|
+
displaySetInstanceUID
|
|
5382
|
+
}) => {
|
|
4963
5383
|
// The column indices that are to be excluded during a filter of the table.
|
|
4964
5384
|
// At present the column indices are:
|
|
4965
5385
|
// 0: DICOM tag
|
|
@@ -5042,12 +5462,12 @@ const DicomTagBrowser = _ref => {
|
|
|
5042
5462
|
className: "mb-6 flex flex-row items-center pl-1"
|
|
5043
5463
|
}, /*#__PURE__*/react.createElement("div", {
|
|
5044
5464
|
className: "flex w-1/2 flex-row items-center"
|
|
5045
|
-
}, /*#__PURE__*/react.createElement(ui_src/* Typography */.
|
|
5465
|
+
}, /*#__PURE__*/react.createElement(ui_src/* Typography */.o5, {
|
|
5046
5466
|
variant: "subtitle",
|
|
5047
5467
|
className: "mr-4"
|
|
5048
5468
|
}, "Series"), /*#__PURE__*/react.createElement("div", {
|
|
5049
5469
|
className: "mr-8 grow"
|
|
5050
|
-
}, /*#__PURE__*/react.createElement(ui_src/* Select */.
|
|
5470
|
+
}, /*#__PURE__*/react.createElement(ui_src/* Select */.l6, {
|
|
5051
5471
|
id: "display-set-selector",
|
|
5052
5472
|
isClearable: false,
|
|
5053
5473
|
onChange: onSelectChange,
|
|
@@ -5056,12 +5476,12 @@ const DicomTagBrowser = _ref => {
|
|
|
5056
5476
|
className: "text-white"
|
|
5057
5477
|
}))), /*#__PURE__*/react.createElement("div", {
|
|
5058
5478
|
className: "flex w-1/2 flex-row items-center"
|
|
5059
|
-
}, showInstanceList && /*#__PURE__*/react.createElement(ui_src/* Typography */.
|
|
5479
|
+
}, showInstanceList && /*#__PURE__*/react.createElement(ui_src/* Typography */.o5, {
|
|
5060
5480
|
variant: "subtitle",
|
|
5061
5481
|
className: "mr-4"
|
|
5062
5482
|
}, "Instance Number"), showInstanceList && /*#__PURE__*/react.createElement("div", {
|
|
5063
5483
|
className: "grow"
|
|
5064
|
-
}, /*#__PURE__*/react.createElement(ui_src/* InputRange */.
|
|
5484
|
+
}, /*#__PURE__*/react.createElement(ui_src/* InputRange */.Qr, {
|
|
5065
5485
|
value: instanceNumber,
|
|
5066
5486
|
key: selectedDisplaySetInstanceUID,
|
|
5067
5487
|
onChange: value => {
|
|
@@ -5077,7 +5497,7 @@ const DicomTagBrowser = _ref => {
|
|
|
5077
5497
|
className: "h-1 w-full bg-black"
|
|
5078
5498
|
}), /*#__PURE__*/react.createElement("div", {
|
|
5079
5499
|
className: "my-3 flex w-1/2 flex-row"
|
|
5080
|
-
}, /*#__PURE__*/react.createElement(ui_src/* InputFilterText */.
|
|
5500
|
+
}, /*#__PURE__*/react.createElement(ui_src/* InputFilterText */.Cv, {
|
|
5081
5501
|
className: "mr-8 block w-full",
|
|
5082
5502
|
placeholder: "Search metadata...",
|
|
5083
5503
|
onDebounceChange: setFilterValue
|
|
@@ -5101,7 +5521,7 @@ function getFormattedRowsFromTags(tags, metadata) {
|
|
|
5101
5521
|
} else {
|
|
5102
5522
|
if (tagInfo.vr === 'xs') {
|
|
5103
5523
|
try {
|
|
5104
|
-
const tag = dcmjs_es
|
|
5524
|
+
const tag = dcmjs_es/* default.data */.Ay.data.Tag.fromPString(tagInfo.tag).toCleanString();
|
|
5105
5525
|
const originalTagInfo = metadata[tag];
|
|
5106
5526
|
tagInfo.vr = originalTagInfo.vr;
|
|
5107
5527
|
} catch (error) {
|
|
@@ -5120,8 +5540,7 @@ function getSortedTags(metadata) {
|
|
|
5120
5540
|
_sortTagList(tagList);
|
|
5121
5541
|
return tagList;
|
|
5122
5542
|
}
|
|
5123
|
-
function getRows(metadata) {
|
|
5124
|
-
let depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
5543
|
+
function getRows(metadata, depth = 0) {
|
|
5125
5544
|
// Tag, Type, Value, Keyword
|
|
5126
5545
|
|
|
5127
5546
|
const keywords = Object.keys(metadata);
|
|
@@ -5132,7 +5551,6 @@ function getRows(metadata) {
|
|
|
5132
5551
|
if (depth > 0) {
|
|
5133
5552
|
tagIndent += ' '; // If indented, add a space after the indents.
|
|
5134
5553
|
}
|
|
5135
|
-
|
|
5136
5554
|
const rows = [];
|
|
5137
5555
|
for (let i = 0; i < keywords.length; i++) {
|
|
5138
5556
|
let keyword = keywords[i];
|
|
@@ -5373,11 +5791,10 @@ const findViewportsByPosition_findOrCreateViewport = (hangingProtocolService, vi
|
|
|
5373
5791
|
* @returns Set of states that can be applied to the state sync to remember
|
|
5374
5792
|
* the current view state.
|
|
5375
5793
|
*/
|
|
5376
|
-
const findViewportsByPosition = (state,
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
} = _ref;
|
|
5794
|
+
const findViewportsByPosition = (state, {
|
|
5795
|
+
numRows,
|
|
5796
|
+
numCols
|
|
5797
|
+
}, syncService) => {
|
|
5381
5798
|
const {
|
|
5382
5799
|
viewports
|
|
5383
5800
|
} = state;
|
|
@@ -5415,7 +5832,7 @@ const findViewportsByPosition = (state, _ref, syncService) => {
|
|
|
5415
5832
|
};
|
|
5416
5833
|
/* harmony default export */ const src_findViewportsByPosition = (findViewportsByPosition);
|
|
5417
5834
|
// EXTERNAL MODULE: ./index.js + 33 modules
|
|
5418
|
-
var index = __webpack_require__(
|
|
5835
|
+
var index = __webpack_require__(45573);
|
|
5419
5836
|
;// CONCATENATED MODULE: ../../../extensions/default/src/commandsModule.ts
|
|
5420
5837
|
|
|
5421
5838
|
|
|
@@ -5432,11 +5849,10 @@ const {
|
|
|
5432
5849
|
* commands module, but if others get added elsewhere this may need enhancing.
|
|
5433
5850
|
*/
|
|
5434
5851
|
const isHangingProtocolCommand = command => command && (command.commandName === 'setHangingProtocol' || command.commandName === 'toggleHangingProtocol');
|
|
5435
|
-
const commandsModule =
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
} = _ref;
|
|
5852
|
+
const commandsModule = ({
|
|
5853
|
+
servicesManager,
|
|
5854
|
+
commandsManager
|
|
5855
|
+
}) => {
|
|
5440
5856
|
const {
|
|
5441
5857
|
customizationService,
|
|
5442
5858
|
measurementService,
|
|
@@ -5491,12 +5907,11 @@ const commandsModule = _ref => {
|
|
|
5491
5907
|
closeContextMenu: () => {
|
|
5492
5908
|
contextMenuController.closeContextMenu();
|
|
5493
5909
|
},
|
|
5494
|
-
displayNotification:
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
} = _ref2;
|
|
5910
|
+
displayNotification: ({
|
|
5911
|
+
text,
|
|
5912
|
+
title,
|
|
5913
|
+
type
|
|
5914
|
+
}) => {
|
|
5500
5915
|
uiNotificationService.show({
|
|
5501
5916
|
title: title,
|
|
5502
5917
|
message: text,
|
|
@@ -5522,8 +5937,12 @@ const commandsModule = _ref => {
|
|
|
5522
5937
|
}
|
|
5523
5938
|
const {
|
|
5524
5939
|
commands,
|
|
5525
|
-
items
|
|
5940
|
+
items,
|
|
5941
|
+
primary
|
|
5526
5942
|
} = button.props || button;
|
|
5943
|
+
if (primary) {
|
|
5944
|
+
enableListener(primary);
|
|
5945
|
+
}
|
|
5527
5946
|
if (items) {
|
|
5528
5947
|
items.forEach(enableListener);
|
|
5529
5948
|
}
|
|
@@ -5565,14 +5984,13 @@ const commandsModule = _ref => {
|
|
|
5565
5984
|
* @param options.stageIndex - the index of the stage to go to.
|
|
5566
5985
|
* @param options.reset - flag to indicate if the HP should be reset to its original and not restored to a previous state
|
|
5567
5986
|
*/
|
|
5568
|
-
setHangingProtocol:
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
} = _ref3;
|
|
5987
|
+
setHangingProtocol: ({
|
|
5988
|
+
activeStudyUID = '',
|
|
5989
|
+
protocolId,
|
|
5990
|
+
stageId,
|
|
5991
|
+
stageIndex,
|
|
5992
|
+
reset = false
|
|
5993
|
+
}) => {
|
|
5576
5994
|
const primaryToolBeforeHPChange = toolbarService.getActivePrimaryTool();
|
|
5577
5995
|
try {
|
|
5578
5996
|
// Stores in the state the display set selector id to displaySetUID mapping
|
|
@@ -5633,9 +6051,6 @@ const commandsModule = _ref => {
|
|
|
5633
6051
|
delete displaySetSelectorMap[`${activeStudyUID || hpInfo.activeStudyUID}:activeDisplaySet:0`];
|
|
5634
6052
|
stateSyncService.store(stateSyncReduce);
|
|
5635
6053
|
// This is a default action applied
|
|
5636
|
-
const {
|
|
5637
|
-
protocol
|
|
5638
|
-
} = hangingProtocolService.getActiveProtocol();
|
|
5639
6054
|
actions.toggleHpTools();
|
|
5640
6055
|
|
|
5641
6056
|
// try to use the same tool in the new hanging protocol stage
|
|
@@ -5656,17 +6071,6 @@ const commandsModule = _ref => {
|
|
|
5656
6071
|
});
|
|
5657
6072
|
}
|
|
5658
6073
|
}
|
|
5659
|
-
|
|
5660
|
-
// Send the notification about updating the state
|
|
5661
|
-
if (protocolId !== hpInfo.protocolId) {
|
|
5662
|
-
// The old protocol callbacks are used for turning off things
|
|
5663
|
-
// like crosshairs when moving to the new HP
|
|
5664
|
-
commandsManager.run(oldProtocol.callbacks?.onProtocolExit);
|
|
5665
|
-
// The new protocol callback is used for things like
|
|
5666
|
-
// activating modes etc.
|
|
5667
|
-
}
|
|
5668
|
-
|
|
5669
|
-
commandsManager.run(protocol.callbacks?.onProtocolEnter);
|
|
5670
6074
|
return true;
|
|
5671
6075
|
} catch (e) {
|
|
5672
6076
|
console.error(e);
|
|
@@ -5680,11 +6084,10 @@ const commandsModule = _ref => {
|
|
|
5680
6084
|
return false;
|
|
5681
6085
|
}
|
|
5682
6086
|
},
|
|
5683
|
-
toggleHangingProtocol:
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
} = _ref4;
|
|
6087
|
+
toggleHangingProtocol: ({
|
|
6088
|
+
protocolId,
|
|
6089
|
+
stageIndex
|
|
6090
|
+
}) => {
|
|
5688
6091
|
const {
|
|
5689
6092
|
protocol,
|
|
5690
6093
|
stageIndex: desiredStageIndex,
|
|
@@ -5717,10 +6120,9 @@ const commandsModule = _ref => {
|
|
|
5717
6120
|
});
|
|
5718
6121
|
}
|
|
5719
6122
|
},
|
|
5720
|
-
deltaStage:
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
} = _ref5;
|
|
6123
|
+
deltaStage: ({
|
|
6124
|
+
direction
|
|
6125
|
+
}) => {
|
|
5724
6126
|
const {
|
|
5725
6127
|
protocolId,
|
|
5726
6128
|
stageIndex: oldStageIndex
|
|
@@ -5746,11 +6148,10 @@ const commandsModule = _ref => {
|
|
|
5746
6148
|
/**
|
|
5747
6149
|
* Changes the viewport grid layout in terms of the MxN layout.
|
|
5748
6150
|
*/
|
|
5749
|
-
setViewportGridLayout:
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
} = _ref6;
|
|
6151
|
+
setViewportGridLayout: ({
|
|
6152
|
+
numRows,
|
|
6153
|
+
numCols
|
|
6154
|
+
}) => {
|
|
5754
6155
|
const {
|
|
5755
6156
|
protocol
|
|
5756
6157
|
} = hangingProtocolService.getActiveProtocol();
|
|
@@ -5897,7 +6298,7 @@ const commandsModule = _ref => {
|
|
|
5897
6298
|
* for `replace` is false
|
|
5898
6299
|
*/
|
|
5899
6300
|
navigateHistory(historyArgs) {
|
|
5900
|
-
index/* history */.
|
|
6301
|
+
index/* history */.b.navigate(historyArgs.to, historyArgs.options);
|
|
5901
6302
|
},
|
|
5902
6303
|
openDICOMTagViewer() {
|
|
5903
6304
|
const {
|
|
@@ -5960,11 +6361,10 @@ const commandsModule = _ref => {
|
|
|
5960
6361
|
behavior: 'smooth'
|
|
5961
6362
|
});
|
|
5962
6363
|
},
|
|
5963
|
-
updateViewportDisplaySet:
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
} = _ref7;
|
|
6364
|
+
updateViewportDisplaySet: ({
|
|
6365
|
+
direction,
|
|
6366
|
+
excludeNonImageModalities
|
|
6367
|
+
}) => {
|
|
5968
6368
|
const nonImageModalities = ['SR', 'SEG', 'SM', 'RTSTRUCT', 'RTPLAN', 'RTDOSE'];
|
|
5969
6369
|
|
|
5970
6370
|
// Sort the display sets as per the hanging protocol service viewport/display set scoring system.
|
|
@@ -6480,6 +6880,9 @@ const defaultProtocol = {
|
|
|
6480
6880
|
editableBy: {},
|
|
6481
6881
|
protocolMatchingRules: [],
|
|
6482
6882
|
toolGroupIds: ['default'],
|
|
6883
|
+
hpInitiationCriteria: {
|
|
6884
|
+
minSeriesLoaded: 1
|
|
6885
|
+
},
|
|
6483
6886
|
// -1 would be used to indicate active only, whereas other values are
|
|
6484
6887
|
// the number of required priors referenced - so 0 means active with
|
|
6485
6888
|
// 0 or more priors.
|
|
@@ -6524,7 +6927,6 @@ const defaultProtocol = {
|
|
|
6524
6927
|
// studyMatchingRules: [],
|
|
6525
6928
|
}
|
|
6526
6929
|
},
|
|
6527
|
-
|
|
6528
6930
|
stages: [{
|
|
6529
6931
|
name: 'default',
|
|
6530
6932
|
viewportStructure: {
|
|
@@ -6550,7 +6952,6 @@ const defaultProtocol = {
|
|
|
6550
6952
|
// preset: 'middle', // 'first', 'last', 'middle'
|
|
6551
6953
|
// },
|
|
6552
6954
|
},
|
|
6553
|
-
|
|
6554
6955
|
displaySets: [{
|
|
6555
6956
|
id: 'defaultDisplaySetId'
|
|
6556
6957
|
}]
|
|
@@ -6582,8 +6983,8 @@ function getHangingProtocolModule() {
|
|
|
6582
6983
|
|
|
6583
6984
|
|
|
6584
6985
|
function DataSourceSelector() {
|
|
6585
|
-
const [appConfig] = (0,state/* useAppConfig */.
|
|
6586
|
-
const navigate = (0,dist/* useNavigate */.
|
|
6986
|
+
const [appConfig] = (0,state/* useAppConfig */.r)();
|
|
6987
|
+
const navigate = (0,dist/* useNavigate */.Zp)();
|
|
6587
6988
|
|
|
6588
6989
|
// This is frowned upon, but the raw config is needed here to provide
|
|
6589
6990
|
// the selector
|
|
@@ -6607,8 +7008,8 @@ function DataSourceSelector() {
|
|
|
6607
7008
|
key: ds.sourceName
|
|
6608
7009
|
}, /*#__PURE__*/react.createElement("h1", {
|
|
6609
7010
|
className: "text-white"
|
|
6610
|
-
}, ds.configuration?.friendlyName || ds.friendlyName), /*#__PURE__*/react.createElement(ui_src/* Button
|
|
6611
|
-
type: ui_src/* ButtonEnums.type */.
|
|
7011
|
+
}, ds.configuration?.friendlyName || ds.friendlyName), /*#__PURE__*/react.createElement(ui_src/* Button */.$n, {
|
|
7012
|
+
type: ui_src/* ButtonEnums.type */.Ny.NW.primary,
|
|
6612
7013
|
className: classnames_default()('ml-2'),
|
|
6613
7014
|
onClick: () => {
|
|
6614
7015
|
navigate({
|
|
@@ -6624,15 +7025,14 @@ function DataSourceSelector() {
|
|
|
6624
7025
|
|
|
6625
7026
|
|
|
6626
7027
|
|
|
6627
|
-
function ItemListComponent(
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
} = _ref;
|
|
7028
|
+
function ItemListComponent({
|
|
7029
|
+
itemLabel,
|
|
7030
|
+
itemList,
|
|
7031
|
+
onItemClicked
|
|
7032
|
+
}) {
|
|
6633
7033
|
const {
|
|
6634
7034
|
t
|
|
6635
|
-
} = (0,es/* useTranslation
|
|
7035
|
+
} = (0,es/* useTranslation */.Bd)('DataSourceConfiguration');
|
|
6636
7036
|
const [filterValue, setFilterValue] = (0,react.useState)('');
|
|
6637
7037
|
(0,react.useEffect)(() => {
|
|
6638
7038
|
setFilterValue('');
|
|
@@ -6643,18 +7043,18 @@ function ItemListComponent(_ref) {
|
|
|
6643
7043
|
className: "flex items-center justify-between"
|
|
6644
7044
|
}, /*#__PURE__*/react.createElement("div", {
|
|
6645
7045
|
className: "text-primary-light text-[20px]"
|
|
6646
|
-
}, t(`Select ${itemLabel}`)), /*#__PURE__*/react.createElement(ui_src/* InputFilterText */.
|
|
7046
|
+
}, t(`Select ${itemLabel}`)), /*#__PURE__*/react.createElement(ui_src/* InputFilterText */.Cv, {
|
|
6647
7047
|
className: "max-w-[40%] grow",
|
|
6648
7048
|
value: filterValue,
|
|
6649
7049
|
onDebounceChange: setFilterValue,
|
|
6650
7050
|
placeholder: t(`Search ${itemLabel} list`)
|
|
6651
7051
|
})), /*#__PURE__*/react.createElement("div", {
|
|
6652
7052
|
className: "relative flex min-h-[1px] grow flex-col bg-black text-[14px]"
|
|
6653
|
-
}, itemList == null ? /*#__PURE__*/react.createElement(ui_src/* LoadingIndicatorProgress */.
|
|
7053
|
+
}, itemList == null ? /*#__PURE__*/react.createElement(ui_src/* LoadingIndicatorProgress */.Jx, {
|
|
6654
7054
|
className: 'h-full w-full'
|
|
6655
7055
|
}) : itemList.length === 0 ? /*#__PURE__*/react.createElement("div", {
|
|
6656
7056
|
className: "text-primary-light flex h-full flex-col items-center justify-center px-6 py-4"
|
|
6657
|
-
}, /*#__PURE__*/react.createElement(ui_src/* Icon */.
|
|
7057
|
+
}, /*#__PURE__*/react.createElement(ui_src/* Icon */.In, {
|
|
6658
7058
|
name: "magnifier",
|
|
6659
7059
|
className: "mb-4"
|
|
6660
7060
|
}), /*#__PURE__*/react.createElement("span", null, t(`No ${itemLabel} available`))) : /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
@@ -6666,10 +7066,10 @@ function ItemListComponent(_ref) {
|
|
|
6666
7066
|
return /*#__PURE__*/react.createElement("div", {
|
|
6667
7067
|
className: classnames_default()('hover:text-primary-light hover:bg-primary-dark group mx-2 flex items-center justify-between px-6 py-2', border),
|
|
6668
7068
|
key: item.id
|
|
6669
|
-
}, /*#__PURE__*/react.createElement("div", null, item.name), /*#__PURE__*/react.createElement(ui_src/* Button
|
|
7069
|
+
}, /*#__PURE__*/react.createElement("div", null, item.name), /*#__PURE__*/react.createElement(ui_src/* Button */.$n, {
|
|
6670
7070
|
onClick: () => onItemClicked(item),
|
|
6671
7071
|
className: "invisible group-hover:visible",
|
|
6672
|
-
endIcon: /*#__PURE__*/react.createElement(ui_src/* Icon */.
|
|
7072
|
+
endIcon: /*#__PURE__*/react.createElement(ui_src/* Icon */.In, {
|
|
6673
7073
|
name: "arrow-left"
|
|
6674
7074
|
})
|
|
6675
7075
|
}, t('Select')));
|
|
@@ -6683,15 +7083,14 @@ function ItemListComponent(_ref) {
|
|
|
6683
7083
|
|
|
6684
7084
|
|
|
6685
7085
|
const NO_WRAP_ELLIPSIS_CLASS_NAMES = 'text-ellipsis whitespace-nowrap overflow-hidden';
|
|
6686
|
-
function DataSourceConfigurationModalComponent(
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
} = _ref;
|
|
7086
|
+
function DataSourceConfigurationModalComponent({
|
|
7087
|
+
configurationAPI,
|
|
7088
|
+
configuredItems,
|
|
7089
|
+
onHide
|
|
7090
|
+
}) {
|
|
6692
7091
|
const {
|
|
6693
7092
|
t
|
|
6694
|
-
} = (0,es/* useTranslation
|
|
7093
|
+
} = (0,es/* useTranslation */.Bd)('DataSourceConfiguration');
|
|
6695
7094
|
const [itemList, setItemList] = (0,react.useState)();
|
|
6696
7095
|
const [selectedItems, setSelectedItems] = (0,react.useState)(configuredItems);
|
|
6697
7096
|
const [errorMessage, setErrorMessage] = (0,react.useState)();
|
|
@@ -6765,9 +7164,9 @@ function DataSourceConfigurationModalComponent(_ref) {
|
|
|
6765
7164
|
} : undefined
|
|
6766
7165
|
}, /*#__PURE__*/react.createElement("div", {
|
|
6767
7166
|
className: "text- flex items-center gap-2"
|
|
6768
|
-
}, itemLabelIndex < selectedItems.length ? /*#__PURE__*/react.createElement(ui_src/* Icon */.
|
|
7167
|
+
}, itemLabelIndex < selectedItems.length ? /*#__PURE__*/react.createElement(ui_src/* Icon */.In, {
|
|
6769
7168
|
name: "status-tracked"
|
|
6770
|
-
}) : /*#__PURE__*/react.createElement(ui_src/* Icon */.
|
|
7169
|
+
}) : /*#__PURE__*/react.createElement(ui_src/* Icon */.In, {
|
|
6771
7170
|
name: "status-untracked"
|
|
6772
7171
|
}), /*#__PURE__*/react.createElement("div", {
|
|
6773
7172
|
className: classnames_default()(NO_WRAP_ELLIPSIS_CLASS_NAMES)
|
|
@@ -6795,18 +7194,17 @@ function DataSourceConfigurationModalComponent(_ref) {
|
|
|
6795
7194
|
|
|
6796
7195
|
|
|
6797
7196
|
|
|
6798
|
-
function DataSourceConfigurationComponent(
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
} = _ref;
|
|
7197
|
+
function DataSourceConfigurationComponent({
|
|
7198
|
+
servicesManager,
|
|
7199
|
+
extensionManager
|
|
7200
|
+
}) {
|
|
6803
7201
|
const {
|
|
6804
7202
|
t
|
|
6805
|
-
} = (0,es/* useTranslation
|
|
7203
|
+
} = (0,es/* useTranslation */.Bd)('DataSourceConfiguration');
|
|
6806
7204
|
const {
|
|
6807
7205
|
show,
|
|
6808
7206
|
hide
|
|
6809
|
-
} = (0,ui_src/* useModal */.
|
|
7207
|
+
} = (0,ui_src/* useModal */.hS)();
|
|
6810
7208
|
const {
|
|
6811
7209
|
customizationService
|
|
6812
7210
|
} = servicesManager.services;
|
|
@@ -6865,7 +7263,7 @@ function DataSourceConfigurationComponent(_ref) {
|
|
|
6865
7263
|
}, [configurationAPI, configuredItems, showConfigurationModal]);
|
|
6866
7264
|
return configuredItems ? /*#__PURE__*/react.createElement("div", {
|
|
6867
7265
|
className: "text-aqua-pale flex items-center overflow-hidden"
|
|
6868
|
-
}, /*#__PURE__*/react.createElement(ui_src/* Icon */.
|
|
7266
|
+
}, /*#__PURE__*/react.createElement(ui_src/* Icon */.In, {
|
|
6869
7267
|
name: "settings",
|
|
6870
7268
|
className: "mr-2.5 h-3.5 w-3.5 shrink-0 cursor-pointer",
|
|
6871
7269
|
onClick: showConfigurationModal
|
|
@@ -7017,9 +7415,7 @@ class GoogleCloudDataSourceConfigurationAPI {
|
|
|
7017
7415
|
* @param fetchSearchParams any search query params; currently only used for paging results
|
|
7018
7416
|
* @returns an array of items of the specified type
|
|
7019
7417
|
*/
|
|
7020
|
-
static async _doFetch(urlStr, fetchItemType) {
|
|
7021
|
-
let fetchOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
7022
|
-
let fetchSearchParams = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
7418
|
+
static async _doFetch(urlStr, fetchItemType, fetchOptions = {}, fetchSearchParams = {}) {
|
|
7023
7419
|
try {
|
|
7024
7420
|
const url = new URL(urlStr);
|
|
7025
7421
|
url.search = new URLSearchParams(fetchSearchParams).toString();
|
|
@@ -7064,11 +7460,10 @@ class GoogleCloudDataSourceConfigurationAPI {
|
|
|
7064
7460
|
* custom page for the user to view their profile, or to add a custom
|
|
7065
7461
|
* page for login etc.
|
|
7066
7462
|
*/
|
|
7067
|
-
function getCustomizationModule(
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
} = _ref;
|
|
7463
|
+
function getCustomizationModule({
|
|
7464
|
+
servicesManager,
|
|
7465
|
+
extensionManager
|
|
7466
|
+
}) {
|
|
7072
7467
|
return [{
|
|
7073
7468
|
name: 'helloPage',
|
|
7074
7469
|
value: {
|
|
@@ -7197,10 +7592,10 @@ function getCustomizationModule(_ref) {
|
|
|
7197
7592
|
}];
|
|
7198
7593
|
}
|
|
7199
7594
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/calculate-suv/dist/calculate-suv.esm.js
|
|
7200
|
-
var calculate_suv_esm = __webpack_require__(
|
|
7595
|
+
var calculate_suv_esm = __webpack_require__(79717);
|
|
7201
7596
|
;// CONCATENATED MODULE: ../../../extensions/default/src/getPTImageIdInstanceMetadata.ts
|
|
7202
7597
|
|
|
7203
|
-
const getPTImageIdInstanceMetadata_metadataProvider = src
|
|
7598
|
+
const getPTImageIdInstanceMetadata_metadataProvider = src/* default.classes */.Ay.classes.MetadataProvider;
|
|
7204
7599
|
function getPTImageIdInstanceMetadata(imageId) {
|
|
7205
7600
|
const dicomMetaData = getPTImageIdInstanceMetadata_metadataProvider.get('instance', imageId);
|
|
7206
7601
|
if (!dicomMetaData) {
|
|
@@ -7276,11 +7671,10 @@ const init_metadataProvider = src.classes.MetadataProvider;
|
|
|
7276
7671
|
* @param {Object} servicesManager
|
|
7277
7672
|
* @param {Object} configuration
|
|
7278
7673
|
*/
|
|
7279
|
-
function init(
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
} = _ref;
|
|
7674
|
+
function init({
|
|
7675
|
+
servicesManager,
|
|
7676
|
+
configuration = {}
|
|
7677
|
+
}) {
|
|
7284
7678
|
const {
|
|
7285
7679
|
stateSyncService
|
|
7286
7680
|
} = servicesManager.services;
|
|
@@ -7327,43 +7721,41 @@ function init(_ref) {
|
|
|
7327
7721
|
clearOnModeExit: true
|
|
7328
7722
|
});
|
|
7329
7723
|
}
|
|
7330
|
-
const handlePETImageMetadata =
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
} = _ref2;
|
|
7724
|
+
const handlePETImageMetadata = ({
|
|
7725
|
+
SeriesInstanceUID,
|
|
7726
|
+
StudyInstanceUID
|
|
7727
|
+
}) => {
|
|
7335
7728
|
const {
|
|
7336
7729
|
instances
|
|
7337
7730
|
} = src.DicomMetadataStore.getSeries(StudyInstanceUID, SeriesInstanceUID);
|
|
7731
|
+
if (!instances?.length) {
|
|
7732
|
+
return;
|
|
7733
|
+
}
|
|
7338
7734
|
const modality = instances[0].Modality;
|
|
7339
|
-
if (modality !== 'PT') {
|
|
7735
|
+
if (!modality || modality !== 'PT') {
|
|
7340
7736
|
return;
|
|
7341
7737
|
}
|
|
7342
7738
|
const imageIds = instances.map(instance => instance.imageId);
|
|
7343
7739
|
const instanceMetadataArray = [];
|
|
7344
|
-
imageIds.forEach(imageId => {
|
|
7345
|
-
const instanceMetadata = getPTImageIdInstanceMetadata(imageId);
|
|
7346
|
-
if (instanceMetadata) {
|
|
7347
|
-
instanceMetadataArray.push(instanceMetadata);
|
|
7348
|
-
}
|
|
7349
|
-
});
|
|
7350
|
-
if (!instanceMetadataArray.length) {
|
|
7351
|
-
return;
|
|
7352
|
-
}
|
|
7353
7740
|
|
|
7354
7741
|
// try except block to prevent errors when the metadata is not correct
|
|
7355
|
-
let suvScalingFactors;
|
|
7356
7742
|
try {
|
|
7357
|
-
|
|
7743
|
+
imageIds.forEach(imageId => {
|
|
7744
|
+
const instanceMetadata = getPTImageIdInstanceMetadata(imageId);
|
|
7745
|
+
if (instanceMetadata) {
|
|
7746
|
+
instanceMetadataArray.push(instanceMetadata);
|
|
7747
|
+
}
|
|
7748
|
+
});
|
|
7749
|
+
if (!instanceMetadataArray.length) {
|
|
7750
|
+
return;
|
|
7751
|
+
}
|
|
7752
|
+
const suvScalingFactors = (0,calculate_suv_esm/* calculateSUVScalingFactors */.C)(instanceMetadataArray);
|
|
7753
|
+
instanceMetadataArray.forEach((instanceMetadata, index) => {
|
|
7754
|
+
init_metadataProvider.addCustomMetadata(imageIds[index], 'scalingModule', suvScalingFactors[index]);
|
|
7755
|
+
});
|
|
7358
7756
|
} catch (error) {
|
|
7359
7757
|
console.log(error);
|
|
7360
7758
|
}
|
|
7361
|
-
if (!suvScalingFactors) {
|
|
7362
|
-
return;
|
|
7363
|
-
}
|
|
7364
|
-
instanceMetadataArray.forEach((instanceMetadata, index) => {
|
|
7365
|
-
init_metadataProvider.addCustomMetadata(imageIds[index], 'scalingModule', suvScalingFactors[index]);
|
|
7366
|
-
});
|
|
7367
7759
|
};
|
|
7368
7760
|
;// CONCATENATED MODULE: ../../../extensions/default/src/DicomWebDataSource/utils/index.ts
|
|
7369
7761
|
|
|
@@ -7397,10 +7789,9 @@ const defaultExtension = {
|
|
|
7397
7789
|
getSopClassHandlerModule: src_getSopClassHandlerModule,
|
|
7398
7790
|
getToolbarModule: getToolbarModule,
|
|
7399
7791
|
getCommandsModule: src_commandsModule,
|
|
7400
|
-
getUtilityModule(
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
} = _ref;
|
|
7792
|
+
getUtilityModule({
|
|
7793
|
+
servicesManager
|
|
7794
|
+
}) {
|
|
7404
7795
|
return [{
|
|
7405
7796
|
name: 'common',
|
|
7406
7797
|
exports: {
|