@ohif/app 3.8.0-beta.5 → 3.8.0-beta.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{12.bundle.1c0fcebb2e63f538b03b.js → 12.bundle.aebca43849fb89e4487c.js} +9 -11
- package/dist/{125.bundle.253395f320b72180da63.js → 125.bundle.df666cb677e5a8982157.js} +4 -5
- package/dist/{663.bundle.68a67d3504dc24cccc1a.js → 170.bundle.c897981826842ee375b5.js} +97 -89
- package/dist/{181.bundle.2ddc6f90740895a3949c.js → 181.bundle.aff453c348111303ceac.js} +107 -74
- package/dist/181.css +1 -1
- package/dist/{370.bundle.085badd6055e8feea84f.js → 185.bundle.87b32cd8145a37e8d07b.js} +338 -209
- package/dist/{19.bundle.05ccf775cb70682dfcdf.js → 19.bundle.89cb082532a16f04ce74.js} +127 -136
- package/dist/{99.bundle.51efd3493cd1de6bf63c.js → 199.bundle.08204857a65f29ec5dca.js} +215 -162
- package/dist/202.bundle.495cba6bbee744cf8f72.js +18239 -0
- package/dist/20fc4c659b85ccd2a9c0.wasm +0 -0
- package/dist/{220.bundle.f7e1c96c94245e70f2be.js → 223.bundle.d4ac6ef2cfe47a9c4afc.js} +4422 -3671
- package/dist/{23.bundle.e008ad788170f2ed5569.js → 23.bundle.9d989522a6e4fdcb9c72.js} +1 -1
- package/dist/{250.bundle.8084960e3318cda37317.js → 250.bundle.577da106dd763c7bf9d0.js} +22 -27
- package/dist/{281.bundle.64640869327edc0d2cae.js → 281.bundle.987f88c6aea8b8bc35e4.js} +23 -25
- package/dist/{82.bundle.9e269153bafc15562988.js → 290.bundle.fac1e48a4027ad949764.js} +1244 -695
- package/dist/{359.bundle.e2f5680a854894c32944.js → 359.bundle.deef89c05907539f5718.js} +27 -30
- package/dist/{410.bundle.8bb12b01e1f838340950.js → 410.bundle.0c7d688cd70a4980fdbb.js} +24 -28
- package/dist/{417.bundle.af0a207c29b109f84159.js → 417.bundle.5c66801d23d0e98c00e6.js} +2 -2
- package/dist/{451.bundle.9fd36f52ff69594f0669.js → 451.bundle.311cd3be9916e08450e9.js} +28 -41
- package/dist/{221.bundle.da7732c6f158b6f2b0d8.js → 466.bundle.e0169e052354437a4fd0.js} +161 -151
- package/dist/{471.bundle.b3d77b83b1593c09a504.js → 471.bundle.eeb78105b59e688832a6.js} +31 -35
- package/dist/{788.bundle.428c065311327135d817.js → 483.bundle.17425951eb8bd48dce01.js} +131 -180
- package/dist/{506.bundle.c3d01c4b6cc01096ce9e.js → 506.bundle.65012c25d91e5be25425.js} +13 -18
- package/dist/{530.bundle.a03b6f942ace3e1baa1e.js → 530.bundle.f904325ef4195d69ac0e.js} +10 -3
- package/dist/{613.bundle.de79995392c3fd2e9637.js → 613.bundle.a1e84b764ea6f872169a.js} +76 -50
- package/dist/{774.bundle.4b2dc46a35012b898e1a.js → 661.bundle.949c984fe2f9f753b65c.js} +1851 -8944
- package/dist/{686.bundle.dccef1f36e4bc79bcc48.js → 686.bundle.62c827fe4f0d054c164e.js} +4 -5
- package/dist/{687.bundle.763e03b2624b6cc03ad2.js → 687.bundle.72ba0b232154d01b3b5c.js} +19 -35
- package/dist/{342.bundle.22d2df5cf6d83b24acee.js → 738.bundle.443a3c3dd2aaa0d02a38.js} +925 -554
- package/dist/{814.bundle.d45ba7f8b856fbd4e75d.js → 814.bundle.f6d799e21bcc5b5b0ab3.js} +9 -11
- package/dist/{822.bundle.891f2e57b1b7bc2f4cb4.js → 822.bundle.8b745e28bc9eb9afbc61.js} +14 -16
- package/dist/{757.bundle.ec8301d8e70d2b990f65.js → 831.bundle.127a3064e8844d6d2c82.js} +1 -368
- package/dist/{886.bundle.d5116d9b8ea4964b68a0.js → 886.bundle.94a4536167d0f8cae1ae.js} +19 -23
- package/dist/95.bundle.2236101be3cc36b322e8.js +8769 -0
- package/dist/{236.bundle.09d155c6f44b5a44e4bf.js → 965.bundle.527f031a2bf5fc4202a0.js} +104 -126
- package/dist/{app.bundle.671d2bb084d88c0cf3b7.js → app.bundle.be53f58aee6b64f5a624.js} +185194 -61390
- package/dist/app.bundle.css +11 -11
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/{dicom-microscopy-viewer.bundle.2c146384eb9466d02ff8.js → dicom-microscopy-viewer.bundle.a7d5060eead13771e784.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/{index.worker.e62ecca63f1a2e124230.worker.js → index.worker.64c896c4316fcd506666.worker.js} +2 -2
- package/dist/index.worker.64c896c4316fcd506666.worker.js.map +1 -0
- package/dist/serve.json +12 -0
- package/dist/sw.js +1 -1
- package/package.json +21 -21
- package/dist/202.bundle.d3490836f71e001dd30f.js +0 -6336
- 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/957.bundle.9ea4506963ef8b2d84ba.js +0 -30077
- package/dist/index.worker.e62ecca63f1a2e124230.worker.js.map +0 -1
- /package/dist/{82.css → 290.css} +0 -0
- /package/dist/{221.css → 466.css} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[12],{
|
|
3
3
|
|
|
4
4
|
/***/ 85012:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
@@ -107,11 +107,10 @@ const _getDisplaySetsFromSeries = (instances, servicesManager, extensionManager)
|
|
|
107
107
|
return displaySet;
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
|
-
function getSopClassHandlerModule(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
} = _ref;
|
|
110
|
+
function getSopClassHandlerModule({
|
|
111
|
+
servicesManager,
|
|
112
|
+
extensionManager
|
|
113
|
+
}) {
|
|
115
114
|
const getDisplaySetsFromSeries = instances => {
|
|
116
115
|
return _getDisplaySetsFromSeries(instances, servicesManager, extensionManager);
|
|
117
116
|
};
|
|
@@ -149,11 +148,10 @@ const dicomVideoExtension = {
|
|
|
149
148
|
* @param {object} [configuration={}]
|
|
150
149
|
* @param {object|array} [configuration.csToolsConfig] - Passed directly to `initCornerstoneTools`
|
|
151
150
|
*/
|
|
152
|
-
getViewportModule(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
} = _ref;
|
|
151
|
+
getViewportModule({
|
|
152
|
+
servicesManager,
|
|
153
|
+
extensionManager
|
|
154
|
+
}) {
|
|
157
155
|
const ExtendedOHIFCornerstoneVideoViewport = props => {
|
|
158
156
|
return /*#__PURE__*/react.createElement(OHIFCornerstoneVideoViewport, _extends({
|
|
159
157
|
servicesManager: servicesManager,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[125],{
|
|
3
3
|
|
|
4
4
|
/***/ 39125:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
@@ -13,10 +13,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13
13
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
function OHIFCornerstonePdfViewport(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _ref;
|
|
16
|
+
function OHIFCornerstonePdfViewport({
|
|
17
|
+
displaySets
|
|
18
|
+
}) {
|
|
20
19
|
const [url, setUrl] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
21
20
|
if (displaySets && displaySets.length > 1) {
|
|
22
21
|
throw new Error('OHIFCornerstonePdfViewport: only one display set is supported for dicom pdf right now');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[170],{
|
|
2
3
|
|
|
3
4
|
/***/ 42170:
|
|
4
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5
6
|
|
|
6
|
-
"use strict";
|
|
7
7
|
// ESM COMPAT FLAG
|
|
8
8
|
__webpack_require__.r(__webpack_exports__);
|
|
9
9
|
|
|
@@ -29,10 +29,10 @@ const SOPClassHandlerId = `${id}.sopClassHandlerModule.${SOPClassHandlerName}`;
|
|
|
29
29
|
var src = __webpack_require__(71771);
|
|
30
30
|
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 10 modules
|
|
31
31
|
var esm = __webpack_require__(45451);
|
|
32
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js +
|
|
33
|
-
var dist_esm = __webpack_require__(
|
|
34
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
35
|
-
var core_dist_esm = __webpack_require__(
|
|
32
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 454 modules
|
|
33
|
+
var dist_esm = __webpack_require__(76634);
|
|
34
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 376 modules
|
|
35
|
+
var core_dist_esm = __webpack_require__(64225);
|
|
36
36
|
// EXTERNAL MODULE: ../../../extensions/cornerstone-dicom-sr/src/tools/modules/dicomSRModule.js
|
|
37
37
|
var dicomSRModule = __webpack_require__(64035);
|
|
38
38
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/constants/scoordTypes.js
|
|
@@ -49,11 +49,9 @@ var dicomSRModule = __webpack_require__(64035);
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
52
|
-
constructor(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
configuration: {}
|
|
56
|
-
};
|
|
52
|
+
constructor(toolProps = {}, defaultToolProps = {
|
|
53
|
+
configuration: {}
|
|
54
|
+
}) {
|
|
57
55
|
super(toolProps, defaultToolProps);
|
|
58
56
|
// This tool should not inherit from AnnotationTool and we should not need
|
|
59
57
|
// to add the following lines.
|
|
@@ -173,7 +171,6 @@ class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
|
173
171
|
});
|
|
174
172
|
return allCanvasCoordinates; // used for drawing textBox
|
|
175
173
|
}
|
|
176
|
-
|
|
177
174
|
renderMultipoint(svgDrawingHelper, viewport, renderableData, annotationUID, referencedImageId, options) {
|
|
178
175
|
let canvasCoordinates;
|
|
179
176
|
renderableData.map((data, index) => {
|
|
@@ -216,7 +213,6 @@ class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
|
216
213
|
});
|
|
217
214
|
return canvasCoordinates; // used for drawing textBox
|
|
218
215
|
}
|
|
219
|
-
|
|
220
216
|
renderEllipse(svgDrawingHelper, viewport, renderableData, annotationUID, referencedImageId, options) {
|
|
221
217
|
let canvasCoordinates;
|
|
222
218
|
renderableData.map((data, index) => {
|
|
@@ -242,8 +238,7 @@ class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
|
242
238
|
});
|
|
243
239
|
return canvasCoordinates;
|
|
244
240
|
}
|
|
245
|
-
renderTextBox(svgDrawingHelper, viewport, canvasCoordinates, canvasCoordinatesAdapter, annotation, styleSpecifier) {
|
|
246
|
-
let options = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
|
|
241
|
+
renderTextBox(svgDrawingHelper, viewport, canvasCoordinates, canvasCoordinatesAdapter, annotation, styleSpecifier, options = {}) {
|
|
247
242
|
if (!canvasCoordinates || !annotation) {
|
|
248
243
|
return;
|
|
249
244
|
}
|
|
@@ -264,7 +259,9 @@ class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
|
264
259
|
}
|
|
265
260
|
const textLines = this._getTextBoxLinesFromLabels(label);
|
|
266
261
|
const canvasTextBoxCoords = dist_esm.utilities.drawing.getTextBoxCoordsCanvas(adaptedCanvasCoordinates);
|
|
267
|
-
annotation.data
|
|
262
|
+
if (!annotation.data?.handles?.textBox?.worldPosition) {
|
|
263
|
+
annotation.data.handles.textBox.worldPosition = viewport.canvasToWorld(canvasTextBoxCoords);
|
|
264
|
+
}
|
|
268
265
|
const textBoxPosition = viewport.worldToCanvas(annotation.data.handles.textBox.worldPosition);
|
|
269
266
|
const textBoxUID = '1';
|
|
270
267
|
const textBoxOptions = this.getLinkedTextBoxStyle(styleSpecifier, annotation);
|
|
@@ -360,7 +357,7 @@ function addMeasurement(measurement, imageId, displaySetInstanceUID) {
|
|
|
360
357
|
data: {
|
|
361
358
|
label: measurement.labels,
|
|
362
359
|
handles: {
|
|
363
|
-
textBox: {}
|
|
360
|
+
textBox: measurement.textBox ?? {}
|
|
364
361
|
},
|
|
365
362
|
cachedStats: {
|
|
366
363
|
TrackingUniqueIdentifier: measurementData.TrackingUniqueIdentifier,
|
|
@@ -565,7 +562,6 @@ const sopClassUids = ['1.2.840.10008.5.1.4.1.1.88.11',
|
|
|
565
562
|
//COMPREHENSIVE_SR:
|
|
566
563
|
'1.2.840.10008.5.1.4.1.1.88.34' //COMPREHENSIVE_3D_SR:
|
|
567
564
|
];
|
|
568
|
-
|
|
569
565
|
const CORNERSTONE_3D_TOOLS_SOURCE_NAME = 'Cornerstone3DTools';
|
|
570
566
|
const CORNERSTONE_3D_TOOLS_SOURCE_VERSION = '0.1';
|
|
571
567
|
const validateSameStudyUID = (uid, instances) => {
|
|
@@ -589,7 +585,6 @@ const CodeNameCodeSequenceValues = {
|
|
|
589
585
|
// SRT
|
|
590
586
|
CornerstoneFreeText: Cornerstone3DCodeScheme.codeValues.CORNERSTONEFREETEXT //
|
|
591
587
|
};
|
|
592
|
-
|
|
593
588
|
const CodingSchemeDesignators = {
|
|
594
589
|
SRT: 'SRT',
|
|
595
590
|
CornerstoneCodeSchemes: [Cornerstone3DCodeScheme.CodingSchemeDesignator, 'CST4']
|
|
@@ -699,7 +694,7 @@ function _load(displaySet, servicesManager, extensionManager) {
|
|
|
699
694
|
|
|
700
695
|
// Check currently added displaySets and add measurements if the sources exist.
|
|
701
696
|
displaySetService.activeDisplaySets.forEach(activeDisplaySet => {
|
|
702
|
-
_checkIfCanAddMeasurementsToDisplaySet(displaySet, activeDisplaySet, dataSource);
|
|
697
|
+
_checkIfCanAddMeasurementsToDisplaySet(displaySet, activeDisplaySet, dataSource, servicesManager);
|
|
703
698
|
});
|
|
704
699
|
|
|
705
700
|
// Subscribe to new displaySets as the source may come in after.
|
|
@@ -710,11 +705,14 @@ function _load(displaySet, servicesManager, extensionManager) {
|
|
|
710
705
|
// If there are still some measurements that have not yet been loaded into cornerstone,
|
|
711
706
|
// See if we can load them onto any of the new displaySets.
|
|
712
707
|
displaySetsAdded.forEach(newDisplaySet => {
|
|
713
|
-
_checkIfCanAddMeasurementsToDisplaySet(displaySet, newDisplaySet, dataSource);
|
|
708
|
+
_checkIfCanAddMeasurementsToDisplaySet(displaySet, newDisplaySet, dataSource, servicesManager);
|
|
714
709
|
});
|
|
715
710
|
});
|
|
716
711
|
}
|
|
717
|
-
function _checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, newDisplaySet, dataSource) {
|
|
712
|
+
function _checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, newDisplaySet, dataSource, servicesManager) {
|
|
713
|
+
const {
|
|
714
|
+
customizationService
|
|
715
|
+
} = servicesManager.services;
|
|
718
716
|
let unloadedMeasurements = srDisplaySet.measurements.filter(measurement => measurement.loaded === false);
|
|
719
717
|
if (unloadedMeasurements.length === 0) {
|
|
720
718
|
// All already loaded!
|
|
@@ -724,9 +722,11 @@ function _checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, newDisplaySet, dat
|
|
|
724
722
|
// This also filters out _this_ displaySet, as it is not an ImageSet.
|
|
725
723
|
return;
|
|
726
724
|
}
|
|
725
|
+
if (newDisplaySet.unsupported) {
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
727
728
|
const {
|
|
728
|
-
sopClassUids
|
|
729
|
-
images
|
|
729
|
+
sopClassUids
|
|
730
730
|
} = newDisplaySet;
|
|
731
731
|
|
|
732
732
|
// Check if any have the newDisplaySet is the correct SOPClass.
|
|
@@ -759,7 +759,15 @@ function _checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, newDisplaySet, dat
|
|
|
759
759
|
} = metadataProvider.getUIDsFromImageID(imageId);
|
|
760
760
|
if (SOPInstanceUIDs.includes(SOPInstanceUID)) {
|
|
761
761
|
for (let j = unloadedMeasurements.length - 1; j >= 0; j--) {
|
|
762
|
-
|
|
762
|
+
let measurement = unloadedMeasurements[j];
|
|
763
|
+
const onBeforeSRAddMeasurement = customizationService.getModeCustomization('onBeforeSRAddMeasurement')?.value;
|
|
764
|
+
if (typeof onBeforeSRAddMeasurement === 'function') {
|
|
765
|
+
measurement = onBeforeSRAddMeasurement({
|
|
766
|
+
measurement,
|
|
767
|
+
StudyInstanceUID: srDisplaySet.StudyInstanceUID,
|
|
768
|
+
SeriesInstanceUID: srDisplaySet.SeriesInstanceUID
|
|
769
|
+
});
|
|
770
|
+
}
|
|
763
771
|
if (_measurementReferencesSOPInstanceUID(measurement, SOPInstanceUID, frameNumber)) {
|
|
764
772
|
addMeasurement(measurement, imageId, newDisplaySet.displaySetInstanceUID);
|
|
765
773
|
unloadedMeasurements.splice(j, 1);
|
|
@@ -789,11 +797,10 @@ function _measurementReferencesSOPInstanceUID(measurement, SOPInstanceUID, frame
|
|
|
789
797
|
}
|
|
790
798
|
}
|
|
791
799
|
}
|
|
792
|
-
function getSopClassHandlerModule(
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
} = _ref;
|
|
800
|
+
function getSopClassHandlerModule({
|
|
801
|
+
servicesManager,
|
|
802
|
+
extensionManager
|
|
803
|
+
}) {
|
|
797
804
|
const getDisplaySetsFromSeries = instances => {
|
|
798
805
|
return _getDisplaySetsFromSeries(instances, servicesManager, extensionManager);
|
|
799
806
|
};
|
|
@@ -978,7 +985,6 @@ function _getLabelFromMeasuredValueSequence(ConceptNameCodeSequence, MeasuredVal
|
|
|
978
985
|
value: `${formatedNumericValue} ${CodeValue}`
|
|
979
986
|
}; // E.g. Long Axis: 31.0 mm
|
|
980
987
|
}
|
|
981
|
-
|
|
982
988
|
function _getReferencedImagesList(ImagingMeasurementReportContentSequence) {
|
|
983
989
|
const ImageLibrary = ImagingMeasurementReportContentSequence.find(item => item.ConceptNameCodeSequence.CodeValue === CodeNameCodeSequenceValues.ImageLibrary);
|
|
984
990
|
const ImageLibraryGroup = _getSequenceAsArray(ImageLibrary.ContentSequence).find(item => item.ConceptNameCodeSequence.CodeValue === CodeNameCodeSequenceValues.ImageLibraryGroup);
|
|
@@ -1078,10 +1084,9 @@ function getHangingProtocolModule() {
|
|
|
1078
1084
|
|
|
1079
1085
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/onModeEnter.js
|
|
1080
1086
|
|
|
1081
|
-
function onModeEnter(
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
} = _ref;
|
|
1087
|
+
function onModeEnter({
|
|
1088
|
+
servicesManager
|
|
1089
|
+
}) {
|
|
1085
1090
|
const {
|
|
1086
1091
|
displaySetService
|
|
1087
1092
|
} = servicesManager.services;
|
|
@@ -1200,8 +1205,7 @@ const {
|
|
|
1200
1205
|
* @param options Naturalized DICOM JSON headers to merge into the displaySet.
|
|
1201
1206
|
*
|
|
1202
1207
|
*/
|
|
1203
|
-
const _generateReport =
|
|
1204
|
-
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1208
|
+
const _generateReport = (measurementData, additionalFindingTypes, options = {}) => {
|
|
1205
1209
|
const filteredToolState = utils_getFilteredCornerstoneToolState(measurementData, additionalFindingTypes);
|
|
1206
1210
|
const report = MeasurementReport.generateReport(filteredToolState, core_dist_esm.metaData, core_dist_esm.utilities.worldToImageCoords, options);
|
|
1207
1211
|
const {
|
|
@@ -1215,8 +1219,13 @@ const _generateReport = function (measurementData, additionalFindingTypes) {
|
|
|
1215
1219
|
}
|
|
1216
1220
|
return dataset;
|
|
1217
1221
|
};
|
|
1218
|
-
const commandsModule =
|
|
1219
|
-
|
|
1222
|
+
const commandsModule = props => {
|
|
1223
|
+
const {
|
|
1224
|
+
servicesManager
|
|
1225
|
+
} = props;
|
|
1226
|
+
const {
|
|
1227
|
+
customizationService
|
|
1228
|
+
} = servicesManager.services;
|
|
1220
1229
|
const actions = {
|
|
1221
1230
|
/**
|
|
1222
1231
|
*
|
|
@@ -1226,12 +1235,11 @@ const commandsModule = _ref => {
|
|
|
1226
1235
|
* as opposed to Finding Sites.
|
|
1227
1236
|
* that you wish to serialize.
|
|
1228
1237
|
*/
|
|
1229
|
-
downloadReport:
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
} = _ref2;
|
|
1238
|
+
downloadReport: ({
|
|
1239
|
+
measurementData,
|
|
1240
|
+
additionalFindingTypes,
|
|
1241
|
+
options = {}
|
|
1242
|
+
}) => {
|
|
1235
1243
|
const srDataset = actions.generateReport(measurementData, additionalFindingTypes, options);
|
|
1236
1244
|
const reportBlob = dcmjs_es["default"].data.datasetToBlob(srDataset);
|
|
1237
1245
|
|
|
@@ -1248,13 +1256,12 @@ const commandsModule = _ref => {
|
|
|
1248
1256
|
* @param options Naturalized DICOM JSON headers to merge into the displaySet.
|
|
1249
1257
|
* @return The naturalized report
|
|
1250
1258
|
*/
|
|
1251
|
-
storeMeasurements: async
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
} = _ref3;
|
|
1259
|
+
storeMeasurements: async ({
|
|
1260
|
+
measurementData,
|
|
1261
|
+
dataSource,
|
|
1262
|
+
additionalFindingTypes,
|
|
1263
|
+
options = {}
|
|
1264
|
+
}) => {
|
|
1258
1265
|
// Use the @cornerstonejs adapter for converting to/from DICOM
|
|
1259
1266
|
// But it is good enough for now whilst we only have cornerstone as a datasource.
|
|
1260
1267
|
commandsModule_log.info('[DICOMSR] storeMeasurements');
|
|
@@ -1275,7 +1282,15 @@ const commandsModule = _ref => {
|
|
|
1275
1282
|
console.log('naturalizedReport missing imaging content', naturalizedReport);
|
|
1276
1283
|
throw new Error('Invalid report, no content');
|
|
1277
1284
|
}
|
|
1278
|
-
|
|
1285
|
+
const onBeforeDicomStore = customizationService.getModeCustomization('onBeforeDicomStore')?.value;
|
|
1286
|
+
let dicomDict;
|
|
1287
|
+
if (typeof onBeforeDicomStore === 'function') {
|
|
1288
|
+
dicomDict = onBeforeDicomStore({
|
|
1289
|
+
measurementData,
|
|
1290
|
+
naturalizedReport
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
await dataSource.store.dicom(naturalizedReport, null, dicomDict);
|
|
1279
1294
|
if (StudyInstanceUID) {
|
|
1280
1295
|
dataSource.deleteStudyMetadataPromise(StudyInstanceUID);
|
|
1281
1296
|
}
|
|
@@ -1327,10 +1342,9 @@ function addToolInstance(name, toolClass, configuration) {
|
|
|
1327
1342
|
/**
|
|
1328
1343
|
* @param {object} configuration
|
|
1329
1344
|
*/
|
|
1330
|
-
function init(
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
} = _ref;
|
|
1345
|
+
function init({
|
|
1346
|
+
configuration = {}
|
|
1347
|
+
}) {
|
|
1334
1348
|
(0,dist_esm.addTool)(DICOMSRDisplayTool);
|
|
1335
1349
|
addToolInstance(tools_toolNames.SRLength, dist_esm.LengthTool, {});
|
|
1336
1350
|
addToolInstance(tools_toolNames.SRBidirectional, dist_esm.BidirectionalTool);
|
|
@@ -1484,11 +1498,10 @@ const dicomSRExtension = {
|
|
|
1484
1498
|
* @param {object} [configuration={}]
|
|
1485
1499
|
* @param {object|array} [configuration.csToolsConfig] - Passed directly to `initCornerstoneTools`
|
|
1486
1500
|
*/
|
|
1487
|
-
getViewportModule(
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
} = _ref;
|
|
1501
|
+
getViewportModule({
|
|
1502
|
+
servicesManager,
|
|
1503
|
+
extensionManager
|
|
1504
|
+
}) {
|
|
1492
1505
|
const ExtendedOHIFCornerstoneSRViewport = props => {
|
|
1493
1506
|
return /*#__PURE__*/react.createElement(OHIFCornerstoneSRViewport, _extends({
|
|
1494
1507
|
servicesManager: servicesManager,
|
|
@@ -1503,10 +1516,9 @@ const dicomSRExtension = {
|
|
|
1503
1516
|
getCommandsModule: src_commandsModule,
|
|
1504
1517
|
getSopClassHandlerModule: src_getSopClassHandlerModule,
|
|
1505
1518
|
// Include dynamically computed values such as toolNames not known till instantiation
|
|
1506
|
-
getUtilityModule(
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
} = _ref2;
|
|
1519
|
+
getUtilityModule({
|
|
1520
|
+
servicesManager
|
|
1521
|
+
}) {
|
|
1510
1522
|
return [{
|
|
1511
1523
|
name: 'tools',
|
|
1512
1524
|
exports: {
|
|
@@ -1525,13 +1537,12 @@ const dicomSRExtension = {
|
|
|
1525
1537
|
/***/ 64035:
|
|
1526
1538
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1527
1539
|
|
|
1528
|
-
"use strict";
|
|
1529
1540
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1530
1541
|
/* harmony export */ l2: () => (/* binding */ setTrackingUniqueIdentifiersForElement),
|
|
1531
1542
|
/* harmony export */ yR: () => (/* binding */ getTrackingUniqueIdentifiersForElement)
|
|
1532
1543
|
/* harmony export */ });
|
|
1533
1544
|
/* unused harmony export setActiveTrackingUniqueIdentifierForElement */
|
|
1534
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1545
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64225);
|
|
1535
1546
|
|
|
1536
1547
|
const state = {
|
|
1537
1548
|
TrackingUniqueIdentifier: null,
|
|
@@ -1546,8 +1557,7 @@ const state = {
|
|
|
1546
1557
|
* of the SR tools in state here, so that we can filter them later.
|
|
1547
1558
|
*/
|
|
1548
1559
|
|
|
1549
|
-
function setTrackingUniqueIdentifiersForElement(element, trackingUniqueIdentifiers) {
|
|
1550
|
-
let activeIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1560
|
+
function setTrackingUniqueIdentifiersForElement(element, trackingUniqueIdentifiers, activeIndex = 0) {
|
|
1551
1561
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
1552
1562
|
const {
|
|
1553
1563
|
viewport
|
|
@@ -1587,15 +1597,14 @@ function getTrackingUniqueIdentifiersForElement(element) {
|
|
|
1587
1597
|
/***/ 38965:
|
|
1588
1598
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1589
1599
|
|
|
1590
|
-
"use strict";
|
|
1591
1600
|
|
|
1592
1601
|
// EXPORTS
|
|
1593
1602
|
__webpack_require__.d(__webpack_exports__, {
|
|
1594
1603
|
Z: () => (/* binding */ hydrateStructuredReport)
|
|
1595
1604
|
});
|
|
1596
1605
|
|
|
1597
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
1598
|
-
var esm = __webpack_require__(
|
|
1606
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 376 modules
|
|
1607
|
+
var esm = __webpack_require__(64225);
|
|
1599
1608
|
// EXTERNAL MODULE: ../../core/src/index.ts + 65 modules
|
|
1600
1609
|
var src = __webpack_require__(71771);
|
|
1601
1610
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/utils/getLabelFromDCMJSImportedToolData.js
|
|
@@ -1622,8 +1631,8 @@ function getLabelFromDCMJSImportedToolData(toolData) {
|
|
|
1622
1631
|
}
|
|
1623
1632
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/adapters/dist/adapters.es.js
|
|
1624
1633
|
var adapters_es = __webpack_require__(91202);
|
|
1625
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js +
|
|
1626
|
-
var dist_esm = __webpack_require__(
|
|
1634
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 454 modules
|
|
1635
|
+
var dist_esm = __webpack_require__(76634);
|
|
1627
1636
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/utils/hydrateStructuredReport.js
|
|
1628
1637
|
|
|
1629
1638
|
|
|
@@ -1676,12 +1685,11 @@ const convertSites = (codingValues, sites) => {
|
|
|
1676
1685
|
* Hydrates a structured report, for default viewports.
|
|
1677
1686
|
*
|
|
1678
1687
|
*/
|
|
1679
|
-
function hydrateStructuredReport(
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
} = _ref;
|
|
1688
|
+
function hydrateStructuredReport({
|
|
1689
|
+
servicesManager,
|
|
1690
|
+
extensionManager,
|
|
1691
|
+
appConfig
|
|
1692
|
+
}, displaySetInstanceUID) {
|
|
1685
1693
|
const annotationManager = dist_esm.annotation.state.getAnnotationManager();
|
|
1686
1694
|
const disableEditing = appConfig?.disableEditing;
|
|
1687
1695
|
const dataSource = extensionManager.getActiveDataSource()[0];
|
|
@@ -1718,12 +1726,19 @@ function hydrateStructuredReport(_ref, displaySetInstanceUID) {
|
|
|
1718
1726
|
const datasetToUse = _mapLegacyDataSet(instance);
|
|
1719
1727
|
|
|
1720
1728
|
// Use dcmjs to generate toolState.
|
|
1721
|
-
|
|
1729
|
+
let storedMeasurementByAnnotationType = MeasurementReport.generateToolState(datasetToUse,
|
|
1722
1730
|
// NOTE: we need to pass in the imageIds to dcmjs since the we use them
|
|
1723
1731
|
// for the imageToWorld transformation. The following assumes that the order
|
|
1724
1732
|
// that measurements were added to the display set are the same order as
|
|
1725
1733
|
// the measurementGroups in the instance.
|
|
1726
1734
|
sopInstanceUIDToImageId, esm.utilities.imageToWorldCoords, esm.metaData);
|
|
1735
|
+
const onBeforeSRHydration = customizationService.getModeCustomization('onBeforeSRHydration')?.value;
|
|
1736
|
+
if (typeof onBeforeSRHydration === 'function') {
|
|
1737
|
+
storedMeasurementByAnnotationType = onBeforeSRHydration({
|
|
1738
|
+
storedMeasurementByAnnotationType,
|
|
1739
|
+
displaySet
|
|
1740
|
+
});
|
|
1741
|
+
}
|
|
1727
1742
|
|
|
1728
1743
|
// Filter what is found by DICOM SR to measurements we support.
|
|
1729
1744
|
const mappingDefinitions = mappings.map(m => m.annotationType);
|
|
@@ -1860,13 +1875,6 @@ const codeMeaningEquals = codeMeaningName => {
|
|
|
1860
1875
|
};
|
|
1861
1876
|
};
|
|
1862
1877
|
|
|
1863
|
-
/***/ }),
|
|
1864
|
-
|
|
1865
|
-
/***/ 78753:
|
|
1866
|
-
/***/ (() => {
|
|
1867
|
-
|
|
1868
|
-
/* (ignored) */
|
|
1869
|
-
|
|
1870
1878
|
/***/ })
|
|
1871
1879
|
|
|
1872
1880
|
}]);
|