@ohif/app 3.7.0-beta.77 → 3.7.0-beta.79
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/{181.bundle.9406be756cfb7968981c.js → 181.bundle.9a76ce585a7139d4862f.js} +2 -2
- package/dist/{202.bundle.591726b6144882ba0ee0.js → 202.bundle.6c3b5e9f37d88388e5c8.js} +48 -26
- package/dist/{663.bundle.f4704358d88979413fc2.js → 663.bundle.5175469e25c5196a739c.js} +4 -4
- package/dist/{754.bundle.a5c9246c77659eab2739.js → 754.bundle.6618bdd7f648b532c682.js} +28 -18
- package/dist/{774.bundle.8ba82ee206266eb2da5e.js → 774.bundle.d365320749c4f67cda70.js} +3 -1
- package/dist/{116.bundle.422d1a76d8daccfed61d.js → 777.bundle.82a7cc23a7b6a8bd12fa.js} +293 -106
- package/dist/{782.bundle.c203eb0044248eadce50.js → 782.bundle.6fa60a24d3d4ad76c8db.js} +2 -2
- package/dist/{822.bundle.9a70e6c61f931d0b494d.js → 822.bundle.4767349eb43b79145b3e.js} +1 -1
- package/dist/{90.bundle.aa225b1457b31d5f13da.js → 90.bundle.1d113c4a201e850c98c0.js} +2 -2
- package/dist/{967.bundle.c4f5d8cccd0b98fb8e5d.js → 967.bundle.ab062b0b325bed3b9af9.js} +20 -4
- package/dist/{app.bundle.cb11442e23347b36351b.js → app.bundle.adf312c193d56262fa41.js} +10 -9
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +19 -19
- /package/dist/{12.bundle.0609045f3ef8a698e621.js → 12.bundle.653904a1682368c34d6b.js} +0 -0
- /package/dist/{128.bundle.042ce64cf4605184ca2d.js → 128.bundle.d4536952e6eda267cb5a.js} +0 -0
- /package/dist/{150.bundle.60a8e8848b9676657e44.js → 150.bundle.1fff6b0c3496b6367f58.js} +0 -0
- /package/dist/{236.bundle.6e2b4135a2a986dcc52c.js → 236.bundle.2386ed58739fdbdd53f8.js} +0 -0
- /package/dist/{281.bundle.510a540d099579ca0b46.js → 281.bundle.fbb8c83b343a6903d529.js} +0 -0
- /package/dist/{30.bundle.763c0c7b2a270248cad8.js → 30.bundle.16bfc3a374fc4eda5ffc.js} +0 -0
- /package/dist/{348.bundle.09129eddf504e82aeb5f.js → 348.bundle.343c39a8c96a044b0fe2.js} +0 -0
- /package/dist/{359.bundle.e00fdb6c1e2209d2bf18.js → 359.bundle.2618db789083f7d3007d.js} +0 -0
- /package/dist/{410.bundle.0511fd06923bdc8129c5.js → 410.bundle.5cc4909f3c608350a71e.js} +0 -0
- /package/dist/{506.bundle.4c8748ec37526d1368ee.js → 506.bundle.c0258b1d7299fdb7628e.js} +0 -0
- /package/dist/{687.bundle.52bd73d00f886617719c.js → 687.bundle.60d3856e6e77c027c174.js} +0 -0
- /package/dist/{814.bundle.0c93db51b74feab1a8db.js → 814.bundle.ba4f6267b43f8dbc803f.js} +0 -0
|
@@ -19,8 +19,8 @@ var index_esm = __webpack_require__(7023);
|
|
|
19
19
|
// EXTERNAL MODULE: ../../../node_modules/prop-types/index.js
|
|
20
20
|
var prop_types = __webpack_require__(3827);
|
|
21
21
|
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
22
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js +
|
|
23
|
-
var esm = __webpack_require__(
|
|
22
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 327 modules
|
|
23
|
+
var esm = __webpack_require__(99777);
|
|
24
24
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 337 modules
|
|
25
25
|
var dist_esm = __webpack_require__(45754);
|
|
26
26
|
// EXTERNAL MODULE: ../../core/src/index.ts + 75 modules
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
/* harmony export */ });
|
|
12
12
|
/* unused harmony export helpers */
|
|
13
13
|
/* harmony import */ var dcmjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67540);
|
|
14
|
-
/* harmony import */ var
|
|
15
|
-
/* harmony import */ var
|
|
16
|
-
/* harmony import */ var
|
|
17
|
-
/* harmony import */ var
|
|
18
|
-
/* harmony import */ var
|
|
14
|
+
/* harmony import */ var buffer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58955);
|
|
15
|
+
/* harmony import */ var ndarray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(87513);
|
|
16
|
+
/* harmony import */ var ndarray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ndarray__WEBPACK_IMPORTED_MODULE_2__);
|
|
17
|
+
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11677);
|
|
18
|
+
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep__WEBPACK_IMPORTED_MODULE_3__);
|
|
19
19
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45451);
|
|
20
20
|
|
|
21
21
|
|
|
@@ -564,9 +564,34 @@ var graphicTypeEquals = function (graphicType) {
|
|
|
564
564
|
};
|
|
565
565
|
};
|
|
566
566
|
|
|
567
|
+
var datasetToDict = dcmjs__WEBPACK_IMPORTED_MODULE_0__/* .data */ .aT.datasetToDict;
|
|
568
|
+
/**
|
|
569
|
+
* Trigger file download from an array buffer
|
|
570
|
+
* @param bufferOrDataset - ArrayBuffer or DicomDataset
|
|
571
|
+
* @param filename - name of the file to download
|
|
572
|
+
*/
|
|
573
|
+
function downloadDICOMData(bufferOrDataset, filename) {
|
|
574
|
+
var blob;
|
|
575
|
+
if (bufferOrDataset instanceof ArrayBuffer) {
|
|
576
|
+
blob = new Blob([bufferOrDataset], { type: "application/dicom" });
|
|
577
|
+
}
|
|
578
|
+
else {
|
|
579
|
+
if (!bufferOrDataset._meta) {
|
|
580
|
+
throw new Error("Dataset must have a _meta property");
|
|
581
|
+
}
|
|
582
|
+
var buffer = buffer__WEBPACK_IMPORTED_MODULE_1__/* .Buffer */ .lW.from(datasetToDict(bufferOrDataset).write());
|
|
583
|
+
blob = new Blob([buffer], { type: "application/dicom" });
|
|
584
|
+
}
|
|
585
|
+
var link = document.createElement("a");
|
|
586
|
+
link.href = window.URL.createObjectURL(blob);
|
|
587
|
+
link.download = filename;
|
|
588
|
+
link.click();
|
|
589
|
+
}
|
|
590
|
+
|
|
567
591
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
568
592
|
__proto__: null,
|
|
569
593
|
codeMeaningEquals: codeMeaningEquals,
|
|
594
|
+
downloadDICOMData: downloadDICOMData,
|
|
570
595
|
graphicTypeEquals: graphicTypeEquals,
|
|
571
596
|
toArray: toArray
|
|
572
597
|
});
|
|
@@ -2002,7 +2027,7 @@ function generateToolState$3(imageIds, arrayBuffer, metadataProvider) {
|
|
|
2002
2027
|
for (var i = 0; i < PerFrameFunctionalGroupsSequence.length; i++) {
|
|
2003
2028
|
var PerFrameFunctionalGroups = PerFrameFunctionalGroupsSequence[i];
|
|
2004
2029
|
var ImageOrientationPatientI = sharedImageOrientationPatient || PerFrameFunctionalGroups.PlaneOrientationSequence.ImageOrientationPatient;
|
|
2005
|
-
var pixelDataI2D =
|
|
2030
|
+
var pixelDataI2D = ndarray__WEBPACK_IMPORTED_MODULE_2___default()(new Uint8Array(pixelData.buffer, i * sliceLength, sliceLength), [multiframe.Rows, multiframe.Columns]);
|
|
2006
2031
|
var alignedPixelDataI = alignPixelDataWithSourceData$1(pixelDataI2D, ImageOrientationPatientI, validOrientations);
|
|
2007
2032
|
if (!alignedPixelDataI) {
|
|
2008
2033
|
console.warn("This segmentation object is not in-plane with the source data. Bailing out of IO. It'd be better to render this with vtkjs. ");
|
|
@@ -2259,8 +2284,7 @@ var _utilities$orientatio = dcmjs__WEBPACK_IMPORTED_MODULE_0__/* .utilities */ .
|
|
|
2259
2284
|
flipMatrix2D = _utilities$orientatio.flipMatrix2D,
|
|
2260
2285
|
rotateMatrix902D = _utilities$orientatio.rotateMatrix902D,
|
|
2261
2286
|
nearlyEqual = _utilities$orientatio.nearlyEqual;
|
|
2262
|
-
var
|
|
2263
|
-
BitArray$1 = dcmjs__WEBPACK_IMPORTED_MODULE_0__/* .data */ .aT.BitArray,
|
|
2287
|
+
var BitArray$1 = dcmjs__WEBPACK_IMPORTED_MODULE_0__/* .data */ .aT.BitArray,
|
|
2264
2288
|
DicomMessage = dcmjs__WEBPACK_IMPORTED_MODULE_0__/* .data */ .aT.DicomMessage,
|
|
2265
2289
|
DicomMetaDictionary$1 = dcmjs__WEBPACK_IMPORTED_MODULE_0__/* .data */ .aT.DicomMetaDictionary;
|
|
2266
2290
|
var Normalizer$2 = dcmjs__WEBPACK_IMPORTED_MODULE_0__/* .normalizers */ .oq.Normalizer;
|
|
@@ -2299,12 +2323,13 @@ function generateSegmentation$2(images, inputLabelmaps3D) {
|
|
|
2299
2323
|
}
|
|
2300
2324
|
|
|
2301
2325
|
/**
|
|
2302
|
-
*
|
|
2326
|
+
* Fills a given segmentation object with data from the input labelmaps3D
|
|
2303
2327
|
*
|
|
2304
|
-
* @param
|
|
2305
|
-
* @param
|
|
2306
|
-
* @param
|
|
2307
|
-
*
|
|
2328
|
+
* @param segmentation - The segmentation object to be filled.
|
|
2329
|
+
* @param inputLabelmaps3D - An array of 3D labelmaps, or a single 3D labelmap.
|
|
2330
|
+
* @param userOptions - Optional configuration settings. Will override the default options.
|
|
2331
|
+
*
|
|
2332
|
+
* @returns {object} The filled segmentation object.
|
|
2308
2333
|
*/
|
|
2309
2334
|
function fillSegmentation$1(segmentation, inputLabelmaps3D) {
|
|
2310
2335
|
var userOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -2386,11 +2411,7 @@ function fillSegmentation$1(segmentation, inputLabelmaps3D) {
|
|
|
2386
2411
|
// If no rleEncoding, at least bitpack the data.
|
|
2387
2412
|
segmentation.bitPackPixelData();
|
|
2388
2413
|
}
|
|
2389
|
-
|
|
2390
|
-
var segBlob = new Blob([buffer], {
|
|
2391
|
-
type: "application/dicom"
|
|
2392
|
-
});
|
|
2393
|
-
return segBlob;
|
|
2414
|
+
return segmentation;
|
|
2394
2415
|
}
|
|
2395
2416
|
function _getLabelmapsFromReferencedFrameIndicies(labelmap3D, referencedFrameIndicies) {
|
|
2396
2417
|
var labelmaps2D = labelmap3D.labelmaps2D;
|
|
@@ -2851,7 +2872,7 @@ function checkSEGsOverlapping(pixelData, multiframe, imageIds, validOrientations
|
|
|
2851
2872
|
var PerFrameFunctionalGroups = PerFrameFunctionalGroupsSequence[_frameSegment];
|
|
2852
2873
|
var ImageOrientationPatientI = sharedImageOrientationPatient || PerFrameFunctionalGroups.PlaneOrientationSequence.ImageOrientationPatient;
|
|
2853
2874
|
var view = readFromUnpackedChunks(pixelData, _frameSegment * sliceLength, sliceLength);
|
|
2854
|
-
var pixelDataI2D =
|
|
2875
|
+
var pixelDataI2D = ndarray__WEBPACK_IMPORTED_MODULE_2___default()(view, [Rows, Columns]);
|
|
2855
2876
|
var alignedPixelDataI = alignPixelDataWithSourceData(pixelDataI2D, ImageOrientationPatientI, validOrientations, tolerance);
|
|
2856
2877
|
if (!alignedPixelDataI) {
|
|
2857
2878
|
console.warn("Individual SEG frames are out of plane with respect to the first SEG frame, this is not yet supported, skipping this frame.");
|
|
@@ -2893,7 +2914,7 @@ function insertOverlappingPixelDataPlanar(segmentsOnFrame, segmentsOnFrameArray,
|
|
|
2893
2914
|
var tempBuffer = labelmapBufferArray[m].slice(0);
|
|
2894
2915
|
|
|
2895
2916
|
// temp list for checking overlaps
|
|
2896
|
-
var tempSegmentsOnFrame =
|
|
2917
|
+
var tempSegmentsOnFrame = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_3___default()(segmentsOnFrameArray[m]);
|
|
2897
2918
|
|
|
2898
2919
|
/** split overlapping SEGs algorithm for each segment:
|
|
2899
2920
|
* A) copy the labelmapBuffer in the array with index 0
|
|
@@ -2920,7 +2941,7 @@ function insertOverlappingPixelDataPlanar(segmentsOnFrame, segmentsOnFrameArray,
|
|
|
2920
2941
|
// and handle scenarios where the portion of data is in one chunk
|
|
2921
2942
|
// and the other portion is in another chunk
|
|
2922
2943
|
var view = readFromUnpackedChunks(pixelData, _i2 * sliceLength, sliceLength);
|
|
2923
|
-
var pixelDataI2D =
|
|
2944
|
+
var pixelDataI2D = ndarray__WEBPACK_IMPORTED_MODULE_2___default()(view, [Rows, Columns]);
|
|
2924
2945
|
var alignedPixelDataI = alignPixelDataWithSourceData(pixelDataI2D, ImageOrientationPatientI, validOrientations, tolerance);
|
|
2925
2946
|
if (!alignedPixelDataI) {
|
|
2926
2947
|
throw new Error("Individual SEG frames are out of plane with respect to the first SEG frame. " + "This is not yet supported. Aborting segmentation loading.");
|
|
@@ -2952,7 +2973,7 @@ function insertOverlappingPixelDataPlanar(segmentsOnFrame, segmentsOnFrameArray,
|
|
|
2952
2973
|
M++;
|
|
2953
2974
|
}
|
|
2954
2975
|
tempBuffer = labelmapBufferArray[m].slice(0);
|
|
2955
|
-
tempSegmentsOnFrame =
|
|
2976
|
+
tempSegmentsOnFrame = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_3___default()(segmentsOnFrameArray[m]);
|
|
2956
2977
|
_i2 = 0;
|
|
2957
2978
|
break;
|
|
2958
2979
|
} else {
|
|
@@ -2978,12 +2999,12 @@ function insertOverlappingPixelDataPlanar(segmentsOnFrame, segmentsOnFrameArray,
|
|
|
2978
2999
|
if (_ret2 === "continue") continue;
|
|
2979
3000
|
}
|
|
2980
3001
|
labelmapBufferArray[m] = tempBuffer.slice(0);
|
|
2981
|
-
segmentsOnFrameArray[m] =
|
|
3002
|
+
segmentsOnFrameArray[m] = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_3___default()(tempSegmentsOnFrame);
|
|
2982
3003
|
|
|
2983
3004
|
// reset temp variables/buffers for new segment
|
|
2984
3005
|
m = 0;
|
|
2985
3006
|
tempBuffer = labelmapBufferArray[m].slice(0);
|
|
2986
|
-
tempSegmentsOnFrame =
|
|
3007
|
+
tempSegmentsOnFrame = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_3___default()(segmentsOnFrameArray[m]);
|
|
2987
3008
|
}
|
|
2988
3009
|
}
|
|
2989
3010
|
var getSegmentIndex = function getSegmentIndex(multiframe, frame) {
|
|
@@ -3015,7 +3036,7 @@ function insertPixelDataPlanar(segmentsOnFrame, segmentsOnFrameArray, labelmapBu
|
|
|
3015
3036
|
var PerFrameFunctionalGroups = PerFrameFunctionalGroupsSequence[i];
|
|
3016
3037
|
var ImageOrientationPatientI = sharedImageOrientationPatient || PerFrameFunctionalGroups.PlaneOrientationSequence.ImageOrientationPatient;
|
|
3017
3038
|
var view = readFromUnpackedChunks(pixelData, i * sliceLength, sliceLength);
|
|
3018
|
-
var pixelDataI2D =
|
|
3039
|
+
var pixelDataI2D = ndarray__WEBPACK_IMPORTED_MODULE_2___default()(view, [Rows, Columns]);
|
|
3019
3040
|
var alignedPixelDataI = alignPixelDataWithSourceData(pixelDataI2D, ImageOrientationPatientI, validOrientations, tolerance);
|
|
3020
3041
|
if (!alignedPixelDataI) {
|
|
3021
3042
|
throw new Error("Individual SEG frames are out of plane with respect to the first SEG frame. " + "This is not yet supported. Aborting segmentation loading.");
|
|
@@ -4872,6 +4893,7 @@ var SegmentationDerivation = dcmjs__WEBPACK_IMPORTED_MODULE_0__/* .derivations *
|
|
|
4872
4893
|
* @param labelmaps - An array of the 3D Volumes that contain the segmentation data.
|
|
4873
4894
|
*/
|
|
4874
4895
|
function generateSegmentation(images, labelmaps, metadata, options) {
|
|
4896
|
+
if (options === void 0) { options = {}; }
|
|
4875
4897
|
var segmentation = _createMultiframeSegmentationFromReferencedImages(images, metadata, options);
|
|
4876
4898
|
return fillSegmentation$1(segmentation, labelmaps, options);
|
|
4877
4899
|
}
|
|
@@ -4891,7 +4913,7 @@ function _createMultiframeSegmentationFromReferencedImages(images, metadata, opt
|
|
|
4891
4913
|
var instance = metadata.get("instance", image.imageId);
|
|
4892
4914
|
return __assign(__assign(__assign({}, image), instance), {
|
|
4893
4915
|
// Todo: move to dcmjs tag style
|
|
4894
|
-
SOPClassUID: instance.SopClassUID, SOPInstanceUID: instance.SopInstanceUID, PixelData: image.getPixelData(), _vrMap: {
|
|
4916
|
+
SOPClassUID: instance.SopClassUID || instance.SOPClassUID, SOPInstanceUID: instance.SopInstanceUID || instance.SOPInstanceUID, PixelData: image.getPixelData(), _vrMap: {
|
|
4895
4917
|
PixelData: "OW"
|
|
4896
4918
|
}, _meta: {} });
|
|
4897
4919
|
});
|
|
@@ -29,8 +29,8 @@ const SOPClassHandlerId = `${id}.sopClassHandlerModule.${SOPClassHandlerName}`;
|
|
|
29
29
|
var src = __webpack_require__(34491);
|
|
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__(
|
|
32
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 327 modules
|
|
33
|
+
var dist_esm = __webpack_require__(99777);
|
|
34
34
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 337 modules
|
|
35
35
|
var core_dist_esm = __webpack_require__(45754);
|
|
36
36
|
// EXTERNAL MODULE: ../../../extensions/cornerstone-dicom-sr/src/tools/modules/dicomSRModule.js
|
|
@@ -1622,8 +1622,8 @@ function getLabelFromDCMJSImportedToolData(toolData) {
|
|
|
1622
1622
|
}
|
|
1623
1623
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/adapters/dist/adapters.es.js
|
|
1624
1624
|
var adapters_es = __webpack_require__(91202);
|
|
1625
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js +
|
|
1626
|
-
var dist_esm = __webpack_require__(
|
|
1625
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 327 modules
|
|
1626
|
+
var dist_esm = __webpack_require__(99777);
|
|
1627
1627
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/utils/hydrateStructuredReport.js
|
|
1628
1628
|
|
|
1629
1629
|
|
|
@@ -2664,7 +2664,7 @@ function hasSharedArrayBuffer() {
|
|
|
2664
2664
|
return false;
|
|
2665
2665
|
}
|
|
2666
2666
|
}
|
|
2667
|
-
async function init(configuration =
|
|
2667
|
+
async function init(configuration = config) {
|
|
2668
2668
|
if (csRenderInitialized) {
|
|
2669
2669
|
return csRenderInitialized;
|
|
2670
2670
|
}
|
|
@@ -29931,26 +29931,21 @@ addProvider(spatialRegistrationMetadataProvider.get.bind(spatialRegistrationMeta
|
|
|
29931
29931
|
|
|
29932
29932
|
|
|
29933
29933
|
|
|
29934
|
-
|
|
29935
|
-
|
|
29934
|
+
const ALLOWED_DELTA = 0.05;
|
|
29936
29935
|
function calculateViewportsSpatialRegistration(viewport1, viewport2) {
|
|
29937
|
-
if (!(viewport1 instanceof RenderingEngine_StackViewport) ||
|
|
29938
|
-
!(viewport2 instanceof RenderingEngine_StackViewport)) {
|
|
29939
|
-
throw new Error('calculateViewportsSpatialRegistration: Both viewports must be StackViewports, volume viewports are not supported yet');
|
|
29940
|
-
}
|
|
29941
|
-
const isSameFrameOfReference = viewport1.getFrameOfReferenceUID() === viewport2.getFrameOfReferenceUID();
|
|
29942
|
-
if (isSameFrameOfReference) {
|
|
29943
|
-
return;
|
|
29944
|
-
}
|
|
29945
29936
|
const imageId1 = viewport1.getCurrentImageId();
|
|
29946
29937
|
const imageId2 = viewport2.getCurrentImageId();
|
|
29947
29938
|
const imagePlaneModule1 = getMetaData('imagePlaneModule', imageId1);
|
|
29948
29939
|
const imagePlaneModule2 = getMetaData('imagePlaneModule', imageId2);
|
|
29949
|
-
|
|
29950
|
-
|
|
29951
|
-
|
|
29940
|
+
if (!imagePlaneModule1 || !imagePlaneModule2) {
|
|
29941
|
+
console.log('Viewport spatial registration requires image plane module');
|
|
29942
|
+
return;
|
|
29943
|
+
}
|
|
29944
|
+
const { imageOrientationPatient: iop2 } = imagePlaneModule2;
|
|
29945
|
+
const isSameImagePlane = imagePlaneModule1.imageOrientationPatient.every((v, i) => Math.abs(v - iop2[i]) < ALLOWED_DELTA);
|
|
29952
29946
|
if (!isSameImagePlane) {
|
|
29953
|
-
|
|
29947
|
+
console.log('Viewport spatial registration only supported for same orientation (hence translation only) for now', imagePlaneModule1?.imageOrientationPatient, imagePlaneModule2?.imageOrientationPatient);
|
|
29948
|
+
return;
|
|
29954
29949
|
}
|
|
29955
29950
|
const imagePositionPatient1 = imagePlaneModule1.imagePositionPatient;
|
|
29956
29951
|
const imagePositionPatient2 = imagePlaneModule2.imagePositionPatient;
|
|
@@ -46643,6 +46638,15 @@ class BaseVolumeViewport extends RenderingEngine_Viewport {
|
|
|
46643
46638
|
volumeActor.getProperty().setRGBTransferFunction(0, newRGBTransferFunction);
|
|
46644
46639
|
return newRGBTransferFunction;
|
|
46645
46640
|
}
|
|
46641
|
+
setInterpolationType(interpolationType, volumeId) {
|
|
46642
|
+
const applicableVolumeActorInfo = this._getApplicableVolumeActor(volumeId);
|
|
46643
|
+
if (!applicableVolumeActorInfo) {
|
|
46644
|
+
return;
|
|
46645
|
+
}
|
|
46646
|
+
const { volumeActor } = applicableVolumeActorInfo;
|
|
46647
|
+
const volumeProperty = volumeActor.getProperty();
|
|
46648
|
+
volumeProperty.setInterpolationType(interpolationType);
|
|
46649
|
+
}
|
|
46646
46650
|
setVOI(voiRange, volumeId, suppressEvents = false) {
|
|
46647
46651
|
const applicableVolumeActorInfo = this._getApplicableVolumeActor(volumeId);
|
|
46648
46652
|
if (!applicableVolumeActorInfo) {
|
|
@@ -46678,7 +46682,7 @@ class BaseVolumeViewport extends RenderingEngine_Viewport {
|
|
|
46678
46682
|
triggerEvent(this.element, enums_Events.VOI_MODIFIED, eventDetail);
|
|
46679
46683
|
}
|
|
46680
46684
|
}
|
|
46681
|
-
setProperties({ voiRange, VOILUTFunction, invert, colormap, preset, } = {}, volumeId, suppressEvents = false) {
|
|
46685
|
+
setProperties({ voiRange, VOILUTFunction, invert, colormap, preset, interpolationType, } = {}, volumeId, suppressEvents = false) {
|
|
46682
46686
|
if (colormap?.name) {
|
|
46683
46687
|
this.setColormap(colormap, volumeId, suppressEvents);
|
|
46684
46688
|
}
|
|
@@ -46688,6 +46692,9 @@ class BaseVolumeViewport extends RenderingEngine_Viewport {
|
|
|
46688
46692
|
if (voiRange !== undefined) {
|
|
46689
46693
|
this.setVOI(voiRange, volumeId, suppressEvents);
|
|
46690
46694
|
}
|
|
46695
|
+
if (typeof interpolationType !== 'undefined') {
|
|
46696
|
+
this.setInterpolationType(interpolationType);
|
|
46697
|
+
}
|
|
46691
46698
|
if (VOILUTFunction !== undefined) {
|
|
46692
46699
|
this.setVOILUTFunction(VOILUTFunction, volumeId, suppressEvents);
|
|
46693
46700
|
}
|
|
@@ -48292,6 +48299,7 @@ class StackViewport extends RenderingEngine_Viewport {
|
|
|
48292
48299
|
super(props);
|
|
48293
48300
|
this.voiUpdatedWithSetProperties = false;
|
|
48294
48301
|
this.invert = false;
|
|
48302
|
+
this.initialInvert = false;
|
|
48295
48303
|
this.stackInvalidated = false;
|
|
48296
48304
|
this._publishCalibratedEvent = false;
|
|
48297
48305
|
this.useNativeDataType = false;
|
|
@@ -48794,7 +48802,7 @@ class StackViewport extends RenderingEngine_Viewport {
|
|
|
48794
48802
|
this.setRotation(0);
|
|
48795
48803
|
}
|
|
48796
48804
|
this.setInterpolationType(enums_InterpolationType.LINEAR);
|
|
48797
|
-
this.setInvertColor(
|
|
48805
|
+
this.setInvertColor(this.initialInvert);
|
|
48798
48806
|
}
|
|
48799
48807
|
_setPropertiesFromCache() {
|
|
48800
48808
|
const { interpolationType, invert } = this;
|
|
@@ -49487,7 +49495,8 @@ class StackViewport extends RenderingEngine_Viewport {
|
|
|
49487
49495
|
this.setVOI(this._getInitialVOIRange(image), {
|
|
49488
49496
|
forceRecreateLUTFunction: !!monochrome1,
|
|
49489
49497
|
});
|
|
49490
|
-
this.
|
|
49498
|
+
this.initialInvert = !!monochrome1;
|
|
49499
|
+
this.setInvertColor(this.invert || this.initialInvert);
|
|
49491
49500
|
this.cameraFocalPointOnRender = this.getCamera().focalPoint;
|
|
49492
49501
|
this.stackInvalidated = false;
|
|
49493
49502
|
if (this._publishCalibratedEvent) {
|
|
@@ -49541,6 +49550,7 @@ class StackViewport extends RenderingEngine_Viewport {
|
|
|
49541
49550
|
}
|
|
49542
49551
|
this.currentImageIdIndex = imageIdIndex;
|
|
49543
49552
|
this.hasPixelSpacing = true;
|
|
49553
|
+
this.viewportStatus = enums_ViewportStatus.PRE_RENDER;
|
|
49544
49554
|
const imageId = await this._loadAndDisplayImage(this.imageIds[imageIdIndex], imageIdIndex);
|
|
49545
49555
|
return imageId;
|
|
49546
49556
|
}
|
|
@@ -935,6 +935,8 @@ function cornerstoneStreamingImageVolumeLoader(volumeId, options) {
|
|
|
935
935
|
const scalingParameters = esm.utilities.getScalingParameters(imageId);
|
|
936
936
|
const hasNegativeRescale = scalingParameters.rescaleIntercept < 0 ||
|
|
937
937
|
scalingParameters.rescaleSlope < 0;
|
|
938
|
+
const hasFloatRescale = scalingParameters.rescaleIntercept % 1 !== 0 ||
|
|
939
|
+
scalingParameters.rescaleSlope % 1 !== 0;
|
|
938
940
|
const { BitsAllocated, PixelRepresentation, PhotometricInterpretation, ImageOrientationPatient, PixelSpacing, Columns, Rows, } = volumeMetadata;
|
|
939
941
|
const rowCosineVec = gl_matrix_esm/* vec3.fromValues */.R3.fromValues(ImageOrientationPatient[0], ImageOrientationPatient[1], ImageOrientationPatient[2]);
|
|
940
942
|
const colCosineVec = gl_matrix_esm/* vec3.fromValues */.R3.fromValues(ImageOrientationPatient[3], ImageOrientationPatient[4], ImageOrientationPatient[5]);
|
|
@@ -972,7 +974,7 @@ function cornerstoneStreamingImageVolumeLoader(volumeId, options) {
|
|
|
972
974
|
: new Uint8Array(length * numComponents);
|
|
973
975
|
break;
|
|
974
976
|
case 16:
|
|
975
|
-
if (!use16BitDataType) {
|
|
977
|
+
if (!use16BitDataType || hasFloatRescale) {
|
|
976
978
|
sizeInBytes = length * 4;
|
|
977
979
|
scalarData = useSharedArrayBuffer
|
|
978
980
|
? cornerstoneStreamingImageVolumeLoader_createFloat32SharedArray(length)
|