fix(Volume3DViewport): Replacing the volume 3D viewport with another reconstructable series (#3281)

* fix(Volume3DViewport) - Replacing the volume 3D viewport with another reconstructable series fails
- updated cornerstone3D core package dependency
- checked for null presentations when setting presentations
- added viewportIndex as a dependency for enabling and disabling an OHIFCornerstoneViewport

* PR feedback - removed viewportIndex useEffect dependency for enabling/disabling OHIFCornerstoneViewport
This commit is contained in:
Joe Boccanfuso 2023-03-27 15:03:16 -04:00 committed by GitHub
parent d3200a6383
commit ed7ded05db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 5 deletions

View File

@ -46,7 +46,7 @@
"@babel/runtime": "^7.20.13",
"classnames": "^2.3.2",
"@cornerstonejs/adapters": "^0.4.1",
"@cornerstonejs/core": "^0.36.2",
"@cornerstonejs/core": "^0.36.5",
"@cornerstonejs/tools": "^0.55.1"
}
}

View File

@ -44,7 +44,7 @@
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^0.4.1",
"@cornerstonejs/core": "^0.36.2",
"@cornerstonejs/core": "^0.36.5",
"@cornerstonejs/streaming-image-volume-loader": "^0.15.1",
"@cornerstonejs/tools": "^0.55.1",
"@kitware/vtk.js": "26.5.6",

View File

@ -173,9 +173,9 @@ class CornerstoneViewportService extends PubSubService
}
public setPresentations(viewport, presentations?: Presentations): void {
const properties = presentations.lutPresentation?.properties;
const properties = presentations?.lutPresentation?.properties;
if (properties) viewport.setProperties(properties);
const camera = presentations.positionPresentation?.camera;
const camera = presentations?.positionPresentation?.camera;
if (camera) viewport.setCamera(camera);
}

View File

@ -32,7 +32,7 @@
"peerDependencies": {
"@ohif/core": "^3.0.0",
"classnames": "^2.3.2",
"@cornerstonejs/core": "^0.36.2",
"@cornerstonejs/core": "^0.36.5",
"@cornerstonejs/tools": "^0.55.1",
"@ohif/extension-cornerstone-dicom-sr": "^3.0.0",
"dcmjs": "^0.29.4",

View File

@ -1459,6 +1459,14 @@
detect-gpu "^4.0.45"
lodash.clonedeep "4.5.0"
"@cornerstonejs/core@^0.36.5":
version "0.36.5"
resolved "https://registry.yarnpkg.com/@cornerstonejs/core/-/core-0.36.5.tgz#2e8c2fc2f9d00c2b5a0f1666aa575ab5024f3616"
integrity sha512-5Z4GEjpWaYbEbSpbgNc92oiwTcD8TUpVw1TUQ5UC4OkzxBMN4THmkGifRq5kJpxJTahGVsoU4W1S7of+YsULlg==
dependencies:
detect-gpu "^4.0.45"
lodash.clonedeep "4.5.0"
"@cornerstonejs/streaming-image-volume-loader@^0.15.1":
version "0.15.1"
resolved "https://registry.npmjs.org/@cornerstonejs/streaming-image-volume-loader/-/streaming-image-volume-loader-0.15.1.tgz#b9fd0efbebbd232119ef0ae7b63bf8b3498bf539"