fix(demo): Deploy issue (#3951)

This commit is contained in:
Bill Wallace authored and GitHub committed 2024-02-22 14:42:46 -05:00
1 parent 2a442e30eb
commit 21e8a2bd0b
20 files changed
+235 -104

No files matched your search

@@ -46,9 +46,9 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^1.44.1",
"@cornerstonejs/tools": "^1.44.1",
"@kitware/vtk.js": "29.3.0",
"@cornerstonejs/adapters": "^1.63.4",
"@cornerstonejs/core": "^1.63.4",
"@kitware/vtk.js": "29.7.0",
"react-color": "^2.19.3"
}
}
+3 -3
View File
@@ -46,9 +46,9 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^1.44.1",
"@cornerstonejs/core": "^1.44.1",
"@cornerstonejs/tools": "^1.44.1",
"@cornerstonejs/adapters": "^1.63.4",
"@cornerstonejs/core": "^1.63.4",
"@cornerstonejs/tools": "^1.63.4",
"classnames": "^2.3.2"
}
}
+6 -6
View File
@@ -38,7 +38,7 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
"@cornerstonejs/dicom-image-loader": "^1.44.1",
"@cornerstonejs/dicom-image-loader": "^1.63.4",
"@ohif/core": "3.8.0-beta.55",
"@ohif/ui": "3.8.0-beta.55",
"dcmjs": "^0.29.12",
@@ -54,11 +54,11 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^1.44.1",
"@cornerstonejs/core": "^1.44.1",
"@cornerstonejs/streaming-image-volume-loader": "^1.44.1",
"@cornerstonejs/tools": "^1.44.1",
"@kitware/vtk.js": "29.3.01",
"@cornerstonejs/adapters": "^1.63.4",
"@cornerstonejs/core": "^1.63.4",
"@cornerstonejs/streaming-image-volume-loader": "^1.63.4",
"@cornerstonejs/tools": "^1.63.4",
"@kitware/vtk.js": "29.7.0",
"html2canvas": "^1.4.1",
"lodash.debounce": "4.0.8",
"lodash.merge": "^4.6.2",
@@ -1,13 +1,7 @@
import { log, Types } from '@ohif/core';
import { log, Enums } from '@ohif/core';
import { EVENTS } from '@cornerstonejs/core';
const { TimingEnum } = Types;
const IMAGE_TIMING_KEYS = [
TimingEnum.DISPLAY_SETS_TO_ALL_IMAGES,
TimingEnum.DISPLAY_SETS_TO_FIRST_IMAGE,
TimingEnum.STUDY_TO_FIRST_IMAGE,
];
const IMAGE_TIMING_KEYS = [];
const imageTiming = {
viewportsWaiting: 0,
@@ -23,6 +17,18 @@ const imageTiming = {
*/
export default function initViewTiming({ element }) {
if (!IMAGE_TIMING_KEYS.length) {
// Work around a bug in WebPack that doesn't getting the enums initialized
// quite fast enough to be declared statically.
const { TimingEnum } = Enums;
IMAGE_TIMING_KEYS.push(
TimingEnum.DISPLAY_SETS_TO_ALL_IMAGES,
TimingEnum.DISPLAY_SETS_TO_FIRST_IMAGE,
TimingEnum.STUDY_TO_FIRST_IMAGE,
);
}
if (!IMAGE_TIMING_KEYS.find(key => log.timingKeys[key])) {
return;
}
@@ -34,6 +40,7 @@ function imageRenderedListener(evt) {
if (evt.detail.viewportStatus === 'preRender') {
return;
}
const { TimingEnum } = Enums;
log.timeEnd(TimingEnum.DISPLAY_SETS_TO_FIRST_IMAGE);
log.timeEnd(TimingEnum.STUDY_TO_FIRST_IMAGE);
log.timeEnd(TimingEnum.SCRIPT_TO_VIEW);
@@ -50,7 +50,9 @@ export const callForAllDataSourcesAsync = async ({
const defs = Object.values(extensionManager.dataSourceDefs);
const defaultDataSourceDef = defs.find(def => def.sourceName === defaultDataSourceName);
const dataSourceDefs = defs.filter(def => def.sourceName !== defaultDataSourceName);
dataSourceDefs.unshift(defaultDataSourceDef);
if (defaultDataSourceDef) {
dataSourceDefs.unshift(defaultDataSourceDef);
}
const promises = [];
const sourceNames = [];
@@ -100,7 +102,9 @@ export const callForAllDataSources = ({
const defs = Object.values(extensionManager.dataSourceDefs);
const defaultDataSourceDef = defs.find(def => def.sourceName === defaultDataSourceName);
const dataSourceDefs = defs.filter(def => def.sourceName !== defaultDataSourceName);
dataSourceDefs.unshift(defaultDataSourceDef);
if (defaultDataSourceDef) {
dataSourceDefs.unshift(defaultDataSourceDef);
}
const mergedData = [];
for (const dataSourceDef of dataSourceDefs) {
@@ -140,7 +144,7 @@ export const callForDefaultDataSource = ({
* Calls the data source specified by the RetrieveAETitle of the given display set.
* @typedef {Object} CallByRetrieveAETitleOptions
* @property {string} path - The path of the method to call on the data source.
* @property {unknown[]} args - The arguments to pass to the method.
* @property {any[]} args - The arguments to pass to the method.
* @property {string} defaultDataSourceName - The name of the default data source.
* @property {ExtensionManager} extensionManager - The extension manager.
*/
+2 -2
View File
@@ -32,8 +32,8 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@cornerstonejs/core": "^1.44.1",
"@cornerstonejs/tools": "^1.44.1",
"@cornerstonejs/core": "^1.63.4",
"@cornerstonejs/tools": "^1.63.4",
"@ohif/core": "3.8.0-beta.55",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.55",
"@ohif/ui": "3.8.0-beta.55",