@cornerstonejs/core 2.11.5 → 2.11.7
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.
|
@@ -194,7 +194,8 @@ class VideoViewport extends Viewport {
|
|
|
194
194
|
const imagePlaneModule = metaData.get(MetadataModules.IMAGE_PLANE, imageId);
|
|
195
195
|
let rowCosines = imagePlaneModule.rowCosines;
|
|
196
196
|
let columnCosines = imagePlaneModule.columnCosines;
|
|
197
|
-
|
|
197
|
+
const usingDefaultValues = imagePlaneModule.usingDefaultValues;
|
|
198
|
+
if (usingDefaultValues || rowCosines == null || columnCosines == null) {
|
|
198
199
|
rowCosines = [1, 0, 0];
|
|
199
200
|
columnCosines = [0, 1, 0];
|
|
200
201
|
}
|
|
@@ -620,6 +621,9 @@ class VideoViewport extends Viewport {
|
|
|
620
621
|
return false;
|
|
621
622
|
}
|
|
622
623
|
const match = referencedImageId.match(VideoViewport.frameRangeExtractor);
|
|
624
|
+
if (!match) {
|
|
625
|
+
return true;
|
|
626
|
+
}
|
|
623
627
|
if (!match[2]) {
|
|
624
628
|
return true;
|
|
625
629
|
}
|
|
@@ -726,15 +730,16 @@ class VideoViewport extends Viewport {
|
|
|
726
730
|
addImages(stackInputs) {
|
|
727
731
|
const actors = this.getActors();
|
|
728
732
|
stackInputs.forEach((stackInput) => {
|
|
729
|
-
const
|
|
733
|
+
const { imageId, ...rest } = stackInput;
|
|
734
|
+
const image = cache.getImage(imageId);
|
|
730
735
|
const imageActor = this.createActorMapper(image);
|
|
731
736
|
const uid = stackInput.actorUID ?? uuidv4();
|
|
732
737
|
if (imageActor) {
|
|
733
|
-
actors.push({ uid, actor: imageActor });
|
|
738
|
+
actors.push({ uid, actor: imageActor, referencedId: imageId, ...rest });
|
|
734
739
|
if (stackInput.callback) {
|
|
735
740
|
stackInput.callback({
|
|
736
741
|
imageActor: imageActor,
|
|
737
|
-
imageId
|
|
742
|
+
imageId,
|
|
738
743
|
});
|
|
739
744
|
}
|
|
740
745
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function addImageSlicesToViewports(renderingEngine, stackInputs, viewportIds) {
|
|
2
2
|
for (const viewportId of viewportIds) {
|
|
3
|
-
const viewport = renderingEngine.
|
|
3
|
+
const viewport = renderingEngine.getViewport(viewportId);
|
|
4
4
|
if (!viewport) {
|
|
5
5
|
throw new Error(`Viewport with Id ${viewportId} does not exist`);
|
|
6
6
|
}
|
|
@@ -10,7 +10,7 @@ function addImageSlicesToViewports(renderingEngine, stackInputs, viewportIds) {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
viewportIds.forEach((viewportId) => {
|
|
13
|
-
const viewport = renderingEngine.
|
|
13
|
+
const viewport = renderingEngine.getViewport(viewportId);
|
|
14
14
|
viewport.addImages(stackInputs);
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import now from './now';
|
|
2
2
|
export default function (image, lut, canvasImageDataData) {
|
|
3
3
|
let start = now();
|
|
4
|
-
const pixelData = image.
|
|
4
|
+
const pixelData = image.getPixelData();
|
|
5
5
|
image.stats.lastGetPixelDataTime = now() - start;
|
|
6
6
|
const minPixelValue = image.minPixelValue;
|
|
7
7
|
let canvasImageDataIndex = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.7",
|
|
4
4
|
"description": "Cornerstone3D Core",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"type": "individual",
|
|
83
83
|
"url": "https://ohif.org/donate"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "a70a7d7c02057c5758bb8cb0957d757e4c445f80"
|
|
86
86
|
}
|