2021-05-28 20:32:48 +02:00
|
|
|
import React, { useEffect, useState, useRef } from 'react';
|
2021-07-02 22:54:26 +02:00
|
|
|
import { useParams, useLocation } from 'react-router';
|
2020-05-18 05:40:09 +02:00
|
|
|
import PropTypes from 'prop-types';
|
2020-05-22 02:34:53 +02:00
|
|
|
// TODO: DicomMetadataStore should be injected?
|
2023-04-05 22:37:37 +02:00
|
|
|
import { DicomMetadataStore, ServicesManager, utils } from '@ohif/core';
|
2020-06-03 19:12:13 +02:00
|
|
|
import { DragAndDropProvider, ImageViewerProvider } from '@ohif/ui';
|
2023-02-17 21:04:07 +01:00
|
|
|
import { useQuery, useSearchParams } from '@hooks';
|
2020-05-18 05:27:31 +02:00
|
|
|
import ViewportGrid from '@components/ViewportGrid';
|
2020-05-07 20:02:51 +02:00
|
|
|
import Compose from './Compose';
|
2023-03-15 17:41:41 +01:00
|
|
|
import getStudies from './studiesList';
|
2020-05-07 20:02:51 +02:00
|
|
|
|
2023-04-05 22:37:37 +02:00
|
|
|
const { getSplitParam } = utils;
|
|
|
|
|
|
2022-09-07 17:59:11 +02:00
|
|
|
/**
|
|
|
|
|
* Initialize the route.
|
|
|
|
|
*
|
|
|
|
|
* @param props.servicesManager to read services from
|
|
|
|
|
* @param props.studyInstanceUIDs for a list of studies to read
|
|
|
|
|
* @param props.dataSource to read the data from
|
2022-10-25 16:20:32 +02:00
|
|
|
* @param props.filters filters from query params to read the data from
|
2022-09-07 17:59:11 +02:00
|
|
|
* @returns array of subscriptions to cancel
|
|
|
|
|
*/
|
2022-09-21 05:40:26 +02:00
|
|
|
function defaultRouteInit(
|
2022-10-25 16:20:32 +02:00
|
|
|
{ servicesManager, studyInstanceUIDs, dataSource, filters },
|
2023-02-17 21:04:07 +01:00
|
|
|
hangingProtocolId
|
2022-09-21 05:40:26 +02:00
|
|
|
) {
|
2021-05-28 20:32:48 +02:00
|
|
|
const {
|
2023-02-10 22:46:09 +01:00
|
|
|
displaySetService,
|
|
|
|
|
hangingProtocolService,
|
2021-05-28 20:32:48 +02:00
|
|
|
} = servicesManager.services;
|
|
|
|
|
|
|
|
|
|
const unsubscriptions = [];
|
|
|
|
|
const {
|
|
|
|
|
unsubscribe: instanceAddedUnsubscribe,
|
|
|
|
|
} = DicomMetadataStore.subscribe(
|
|
|
|
|
DicomMetadataStore.EVENTS.INSTANCES_ADDED,
|
2022-09-07 17:59:11 +02:00
|
|
|
function({ StudyInstanceUID, SeriesInstanceUID, madeInClient = false }) {
|
2021-05-28 20:32:48 +02:00
|
|
|
const seriesMetadata = DicomMetadataStore.getSeries(
|
|
|
|
|
StudyInstanceUID,
|
|
|
|
|
SeriesInstanceUID
|
|
|
|
|
);
|
|
|
|
|
|
2023-02-10 22:46:09 +01:00
|
|
|
displaySetService.makeDisplaySets(seriesMetadata.instances, madeInClient);
|
2021-05-28 20:32:48 +02:00
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
unsubscriptions.push(instanceAddedUnsubscribe);
|
|
|
|
|
|
2022-09-07 17:59:11 +02:00
|
|
|
const allRetrieves = studyInstanceUIDs.map(StudyInstanceUID =>
|
2022-10-25 16:20:32 +02:00
|
|
|
dataSource.retrieve.series.metadata({
|
|
|
|
|
StudyInstanceUID,
|
|
|
|
|
filters,
|
|
|
|
|
})
|
2021-05-28 20:32:48 +02:00
|
|
|
);
|
|
|
|
|
|
2022-09-07 17:59:11 +02:00
|
|
|
// The hanging protocol matching service is fairly expensive to run multiple
|
|
|
|
|
// times, and doesn't allow partial matches to be made (it will simply fail
|
|
|
|
|
// to display anything if a required match fails), so we wait here until all metadata
|
|
|
|
|
// is retrieved (which will synchronously trigger the display set creation)
|
|
|
|
|
// until we run the hanging protocol matching service.
|
|
|
|
|
|
|
|
|
|
Promise.allSettled(allRetrieves).then(() => {
|
2023-02-10 22:46:09 +01:00
|
|
|
const displaySets = displaySetService.getActiveDisplaySets();
|
2022-09-07 17:59:11 +02:00
|
|
|
|
|
|
|
|
if (!displaySets || !displaySets.length) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-15 17:41:41 +01:00
|
|
|
// Gets the studies list to use
|
|
|
|
|
const studies = getStudies(studyInstanceUIDs, displaySets);
|
|
|
|
|
|
2022-09-07 17:59:11 +02:00
|
|
|
// study being displayed, and is thus the "active" study.
|
|
|
|
|
const activeStudy = studies[0];
|
|
|
|
|
|
2022-09-21 05:40:26 +02:00
|
|
|
// run the hanging protocol matching on the displaySets with the predefined
|
|
|
|
|
// hanging protocol in the mode configuration
|
2023-02-10 22:46:09 +01:00
|
|
|
hangingProtocolService.run(
|
2022-09-21 05:40:26 +02:00
|
|
|
{ studies, activeStudy, displaySets },
|
2023-02-17 21:04:07 +01:00
|
|
|
hangingProtocolId
|
2022-09-21 05:40:26 +02:00
|
|
|
);
|
2021-06-15 16:19:45 +02:00
|
|
|
});
|
|
|
|
|
|
2021-05-28 20:32:48 +02:00
|
|
|
return unsubscriptions;
|
|
|
|
|
}
|
2020-07-24 12:51:57 +02:00
|
|
|
|
2020-05-16 11:05:50 +02:00
|
|
|
export default function ModeRoute({
|
|
|
|
|
mode,
|
|
|
|
|
dataSourceName,
|
|
|
|
|
extensionManager,
|
2020-05-18 17:21:57 +02:00
|
|
|
servicesManager,
|
2022-07-27 18:39:04 +02:00
|
|
|
commandsManager,
|
2020-07-03 19:18:59 +02:00
|
|
|
hotkeysManager,
|
2020-05-16 11:05:50 +02:00
|
|
|
}) {
|
2020-05-20 06:49:38 +02:00
|
|
|
// Parse route params/querystring
|
2021-07-02 22:54:26 +02:00
|
|
|
const location = useLocation();
|
2020-05-20 06:49:38 +02:00
|
|
|
const query = useQuery();
|
2021-05-28 20:32:48 +02:00
|
|
|
const params = useParams();
|
2023-02-17 21:04:07 +01:00
|
|
|
const searchParams = useSearchParams();
|
2020-05-16 11:05:50 +02:00
|
|
|
|
2023-02-17 21:04:07 +01:00
|
|
|
const runTimeHangingProtocolId = searchParams.get('hangingprotocolid');
|
2021-05-28 20:32:48 +02:00
|
|
|
const [studyInstanceUIDs, setStudyInstanceUIDs] = useState();
|
|
|
|
|
|
|
|
|
|
const [refresh, setRefresh] = useState(false);
|
|
|
|
|
const layoutTemplateData = useRef(false);
|
|
|
|
|
const locationRef = useRef(null);
|
|
|
|
|
const isMounted = useRef(false);
|
|
|
|
|
|
|
|
|
|
if (location !== locationRef.current) {
|
|
|
|
|
layoutTemplateData.current = null;
|
|
|
|
|
locationRef.current = location;
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-05 14:32:54 +02:00
|
|
|
const {
|
2023-02-10 22:46:09 +01:00
|
|
|
displaySetService,
|
|
|
|
|
hangingProtocolService,
|
2023-02-17 21:04:07 +01:00
|
|
|
} = (servicesManager as ServicesManager).services;
|
2021-06-23 20:41:27 +02:00
|
|
|
|
2023-03-28 18:15:55 +02:00
|
|
|
const {
|
|
|
|
|
extensions,
|
|
|
|
|
sopClassHandlers,
|
|
|
|
|
hotkeys: hotkeyObj,
|
|
|
|
|
hangingProtocol,
|
|
|
|
|
} = mode;
|
|
|
|
|
// Preserve the old array interface for hotkeys
|
|
|
|
|
const hotkeys = Array.isArray(hotkeyObj) ? hotkeyObj : hotkeyObj?.hotkeys;
|
|
|
|
|
const hotkeyName = hotkeyObj?.name || 'hotkey-definitions-v2';
|
2020-06-05 17:36:11 +02:00
|
|
|
|
|
|
|
|
if (dataSourceName === undefined) {
|
|
|
|
|
dataSourceName = extensionManager.defaultDataSourceName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extensionManager.setActiveDataSource(dataSourceName);
|
|
|
|
|
|
2023-03-15 17:41:41 +01:00
|
|
|
const dataSource = extensionManager.getActiveDataSource()[0];
|
2020-06-05 17:36:11 +02:00
|
|
|
|
2020-07-03 19:18:59 +02:00
|
|
|
// Only handling one route per mode for now
|
2020-05-20 06:49:38 +02:00
|
|
|
const route = mode.routes[0];
|
2020-05-16 11:05:50 +02:00
|
|
|
|
2020-05-09 20:23:43 +02:00
|
|
|
// For each extension, look up their context modules
|
2020-05-11 18:56:46 +02:00
|
|
|
// TODO: move to extension manager.
|
2020-05-09 20:23:43 +02:00
|
|
|
let contextModules = [];
|
2022-04-06 19:28:42 +02:00
|
|
|
|
|
|
|
|
Object.keys(extensions).forEach(extensionId => {
|
2020-05-09 20:23:43 +02:00
|
|
|
const allRegisteredModuleIds = Object.keys(extensionManager.modulesMap);
|
|
|
|
|
const moduleIds = allRegisteredModuleIds.filter(id =>
|
|
|
|
|
id.includes(`${extensionId}.contextModule.`)
|
|
|
|
|
);
|
2020-05-07 16:55:59 +02:00
|
|
|
|
2020-05-09 20:23:43 +02:00
|
|
|
if (!moduleIds || !moduleIds.length) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const modules = moduleIds.map(extensionManager.getModuleEntry);
|
|
|
|
|
contextModules = contextModules.concat(modules);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const contextModuleProviders = contextModules.map(a => a.provider);
|
|
|
|
|
const CombinedContextProvider = ({ children }) =>
|
|
|
|
|
Compose({ components: contextModuleProviders, children });
|
2020-05-09 10:57:52 +02:00
|
|
|
|
2020-05-15 19:07:21 +02:00
|
|
|
function ViewportGridWithDataSource(props) {
|
|
|
|
|
return ViewportGrid({ ...props, dataSource });
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-28 20:32:48 +02:00
|
|
|
useEffect(() => {
|
|
|
|
|
// Preventing state update for unmounted component
|
|
|
|
|
isMounted.current = true;
|
|
|
|
|
return () => {
|
|
|
|
|
isMounted.current = false;
|
|
|
|
|
};
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
// Todo: this should not be here, data source should not care about params
|
|
|
|
|
const initializeDataSource = async (params, query) => {
|
2021-06-15 16:19:45 +02:00
|
|
|
const studyInstanceUIDs = await dataSource.initialize({
|
2021-05-28 20:32:48 +02:00
|
|
|
params,
|
|
|
|
|
query,
|
|
|
|
|
});
|
|
|
|
|
setStudyInstanceUIDs(studyInstanceUIDs);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
initializeDataSource(params, query);
|
|
|
|
|
return () => {
|
|
|
|
|
layoutTemplateData.current = null;
|
|
|
|
|
};
|
|
|
|
|
}, [location]);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
const retrieveLayoutData = async () => {
|
|
|
|
|
const layoutData = await route.layoutTemplate({
|
|
|
|
|
location,
|
|
|
|
|
servicesManager,
|
|
|
|
|
studyInstanceUIDs,
|
|
|
|
|
});
|
|
|
|
|
if (isMounted.current) {
|
|
|
|
|
layoutTemplateData.current = layoutData;
|
|
|
|
|
setRefresh(!refresh);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
if (studyInstanceUIDs?.length && studyInstanceUIDs[0] !== undefined) {
|
|
|
|
|
retrieveLayoutData();
|
|
|
|
|
}
|
|
|
|
|
return () => {
|
|
|
|
|
layoutTemplateData.current = null;
|
|
|
|
|
};
|
|
|
|
|
}, [studyInstanceUIDs]);
|
|
|
|
|
|
2020-06-29 18:58:36 +02:00
|
|
|
useEffect(() => {
|
|
|
|
|
if (!hotkeys) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hotkeysManager.setDefaultHotKeys(hotkeys);
|
2021-08-19 14:05:33 +02:00
|
|
|
|
2023-03-28 18:15:55 +02:00
|
|
|
const userPreferredHotkeys = JSON.parse(localStorage.getItem(hotkeyName));
|
2021-08-19 14:05:33 +02:00
|
|
|
|
|
|
|
|
if (userPreferredHotkeys?.length) {
|
2023-03-28 18:15:55 +02:00
|
|
|
hotkeysManager.setHotkeys(userPreferredHotkeys, hotkeyName);
|
2021-08-19 14:05:33 +02:00
|
|
|
} else {
|
2023-03-28 18:15:55 +02:00
|
|
|
hotkeysManager.setHotkeys(hotkeys, hotkeyName);
|
2021-08-19 14:05:33 +02:00
|
|
|
}
|
2020-06-29 18:58:36 +02:00
|
|
|
|
|
|
|
|
return () => {
|
|
|
|
|
hotkeysManager.destroy();
|
|
|
|
|
};
|
|
|
|
|
}, []);
|
|
|
|
|
|
2020-05-18 17:21:57 +02:00
|
|
|
useEffect(() => {
|
2021-05-28 20:32:48 +02:00
|
|
|
if (!layoutTemplateData.current) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
2022-10-25 16:20:32 +02:00
|
|
|
|
2020-07-24 12:51:57 +02:00
|
|
|
// TODO: For some reason this is running before the Providers
|
2022-07-27 18:39:04 +02:00
|
|
|
// are calling setServiceImplementation
|
|
|
|
|
// TODO -> iterate through services.
|
2020-07-24 12:51:57 +02:00
|
|
|
|
2020-07-03 19:18:59 +02:00
|
|
|
// Extension
|
2021-05-28 20:32:48 +02:00
|
|
|
|
|
|
|
|
// Add SOPClassHandlers to a new SOPClassManager.
|
2023-02-10 22:46:09 +01:00
|
|
|
displaySetService.init(extensionManager, sopClassHandlers);
|
2021-05-28 20:32:48 +02:00
|
|
|
|
2022-07-27 18:39:04 +02:00
|
|
|
extensionManager.onModeEnter({
|
|
|
|
|
servicesManager,
|
|
|
|
|
extensionManager,
|
|
|
|
|
commandsManager,
|
|
|
|
|
});
|
2023-02-17 21:04:07 +01:00
|
|
|
|
|
|
|
|
// use the URL hangingProtocolId if it exists, otherwise use the one
|
|
|
|
|
// defined in the mode configuration
|
|
|
|
|
const hangingProtocolIdToUse = hangingProtocolService.getProtocolById(
|
|
|
|
|
runTimeHangingProtocolId
|
|
|
|
|
)
|
|
|
|
|
? runTimeHangingProtocolId
|
|
|
|
|
: hangingProtocol;
|
|
|
|
|
|
2022-10-05 14:32:54 +02:00
|
|
|
// Sets the active hanging protocols - if hangingProtocol is undefined,
|
|
|
|
|
// resets to default. Done before the onModeEnter to allow the onModeEnter
|
|
|
|
|
// to perform custom hanging protocol actions
|
2023-02-17 21:04:07 +01:00
|
|
|
hangingProtocolService.setActiveProtocolIds(hangingProtocolIdToUse);
|
|
|
|
|
|
|
|
|
|
mode?.onModeEnter({
|
|
|
|
|
servicesManager,
|
|
|
|
|
extensionManager,
|
|
|
|
|
commandsManager,
|
|
|
|
|
});
|
2021-05-28 20:32:48 +02:00
|
|
|
|
|
|
|
|
const setupRouteInit = async () => {
|
2022-10-25 16:20:32 +02:00
|
|
|
/**
|
|
|
|
|
* The next line should get all the query parameters provided by the URL
|
2023-02-17 21:04:07 +01:00
|
|
|
* - except the StudyInstanceUIDs - and create an object called filters
|
2022-10-25 16:20:32 +02:00
|
|
|
* used to filtering the study as the user wants otherwise it will return
|
|
|
|
|
* a empty object.
|
|
|
|
|
*
|
|
|
|
|
* Example:
|
|
|
|
|
* const filters = {
|
2023-02-17 21:04:07 +01:00
|
|
|
* seriesInstanceUID: 1.2.276.0.7230010.3.1.3.1791068887.5412.1620253993.114611
|
2022-10-25 16:20:32 +02:00
|
|
|
* }
|
|
|
|
|
*/
|
|
|
|
|
const filters =
|
|
|
|
|
Array.from(query.keys()).reduce(
|
|
|
|
|
(acc: Record<string, string>, val: string) => {
|
2023-04-05 18:59:56 +02:00
|
|
|
const lowerVal = val.toLowerCase();
|
|
|
|
|
if (lowerVal !== 'studyinstanceuids') {
|
|
|
|
|
// Not sure why the case matters here - it doesn't in the URL
|
|
|
|
|
if (lowerVal === 'seriesinstanceuid') {
|
2023-04-05 22:37:37 +02:00
|
|
|
const seriesUIDs = getSplitParam(lowerVal, query);
|
2023-02-17 21:04:07 +01:00
|
|
|
return {
|
|
|
|
|
...acc,
|
2023-04-05 22:37:37 +02:00
|
|
|
seriesInstanceUID: seriesUIDs,
|
2023-02-17 21:04:07 +01:00
|
|
|
};
|
2022-10-25 16:20:32 +02:00
|
|
|
}
|
|
|
|
|
|
2023-04-05 22:37:37 +02:00
|
|
|
return { ...acc, [val]: getSplitParam(lowerVal, query) };
|
2022-10-25 16:20:32 +02:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{}
|
|
|
|
|
) ?? {};
|
|
|
|
|
|
2021-05-28 20:32:48 +02:00
|
|
|
if (route.init) {
|
2022-09-21 05:40:26 +02:00
|
|
|
return await route.init(
|
|
|
|
|
{
|
|
|
|
|
servicesManager,
|
|
|
|
|
extensionManager,
|
|
|
|
|
hotkeysManager,
|
|
|
|
|
studyInstanceUIDs,
|
|
|
|
|
dataSource,
|
2022-10-25 16:20:32 +02:00
|
|
|
filters,
|
2022-09-21 05:40:26 +02:00
|
|
|
},
|
2023-02-17 21:04:07 +01:00
|
|
|
hangingProtocolIdToUse
|
2022-09-21 05:40:26 +02:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return defaultRouteInit(
|
|
|
|
|
{
|
2021-05-28 20:32:48 +02:00
|
|
|
servicesManager,
|
|
|
|
|
studyInstanceUIDs,
|
|
|
|
|
dataSource,
|
2022-10-25 16:20:32 +02:00
|
|
|
filters,
|
2022-09-21 05:40:26 +02:00
|
|
|
},
|
2023-02-17 21:04:07 +01:00
|
|
|
hangingProtocolIdToUse
|
2022-09-21 05:40:26 +02:00
|
|
|
);
|
2021-05-28 20:32:48 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
let unsubscriptions;
|
|
|
|
|
setupRouteInit().then(unsubs => {
|
|
|
|
|
unsubscriptions = unsubs;
|
|
|
|
|
});
|
2020-08-04 11:11:23 +02:00
|
|
|
|
|
|
|
|
return () => {
|
2022-12-09 16:58:01 +01:00
|
|
|
// The mode.onModeExit must be done first to allow it to store
|
|
|
|
|
// information, and must be in a try/catch to ensure subscriptions
|
|
|
|
|
// are unsubscribed.
|
|
|
|
|
try {
|
2023-02-17 21:04:07 +01:00
|
|
|
mode?.onModeExit?.({
|
|
|
|
|
servicesManager,
|
|
|
|
|
extensionManager,
|
|
|
|
|
});
|
2022-12-09 16:58:01 +01:00
|
|
|
} catch (e) {
|
|
|
|
|
console.warn('mode exit failure', e);
|
|
|
|
|
}
|
|
|
|
|
// The unsubscriptions must occur before the extension onModeExit
|
|
|
|
|
// in order to prevent exceptions during cleanup caused by spurious events
|
2021-05-28 20:32:48 +02:00
|
|
|
unsubscriptions.forEach(unsub => {
|
|
|
|
|
unsub();
|
|
|
|
|
});
|
2022-12-09 16:58:01 +01:00
|
|
|
// The extension manager must be called after the mode, this is
|
|
|
|
|
// expected to cleanup the state to a standard setup.
|
|
|
|
|
extensionManager.onModeExit();
|
2020-08-04 11:11:23 +02:00
|
|
|
};
|
2020-05-21 03:08:49 +02:00
|
|
|
}, [
|
|
|
|
|
mode,
|
|
|
|
|
dataSourceName,
|
|
|
|
|
location,
|
|
|
|
|
route,
|
|
|
|
|
servicesManager,
|
|
|
|
|
extensionManager,
|
2020-07-03 19:18:59 +02:00
|
|
|
hotkeysManager,
|
2021-05-28 20:32:48 +02:00
|
|
|
studyInstanceUIDs,
|
|
|
|
|
refresh,
|
2020-05-21 03:08:49 +02:00
|
|
|
]);
|
2020-05-18 17:21:57 +02:00
|
|
|
|
2021-05-28 20:32:48 +02:00
|
|
|
const renderLayoutData = props => {
|
|
|
|
|
const layoutTemplateModuleEntry = extensionManager.getModuleEntry(
|
|
|
|
|
layoutTemplateData.current.id
|
2020-05-18 17:21:57 +02:00
|
|
|
);
|
2021-05-28 20:32:48 +02:00
|
|
|
const LayoutComponent = layoutTemplateModuleEntry.component;
|
2020-05-22 02:34:53 +02:00
|
|
|
|
2021-05-28 20:32:48 +02:00
|
|
|
return <LayoutComponent {...props} />;
|
|
|
|
|
};
|
2020-07-24 12:51:57 +02:00
|
|
|
|
2020-05-09 20:23:43 +02:00
|
|
|
return (
|
2020-05-21 03:07:25 +02:00
|
|
|
<ImageViewerProvider
|
2021-05-28 20:32:48 +02:00
|
|
|
// initialState={{ StudyInstanceUIDs: StudyInstanceUIDs }}
|
|
|
|
|
StudyInstanceUIDs={studyInstanceUIDs}
|
2022-02-08 14:17:37 +01:00
|
|
|
// reducer={reducer}
|
2020-05-21 03:07:25 +02:00
|
|
|
>
|
2020-05-24 05:57:14 +02:00
|
|
|
<CombinedContextProvider>
|
|
|
|
|
<DragAndDropProvider>
|
2021-05-28 20:32:48 +02:00
|
|
|
{layoutTemplateData.current &&
|
|
|
|
|
studyInstanceUIDs?.length &&
|
|
|
|
|
studyInstanceUIDs[0] !== undefined &&
|
|
|
|
|
renderLayoutData({
|
|
|
|
|
...layoutTemplateData.current.props,
|
|
|
|
|
ViewportGridComp: ViewportGridWithDataSource,
|
|
|
|
|
})}
|
2020-05-24 05:57:14 +02:00
|
|
|
</DragAndDropProvider>
|
|
|
|
|
</CombinedContextProvider>
|
2020-05-21 03:07:25 +02:00
|
|
|
</ImageViewerProvider>
|
2020-05-09 20:23:43 +02:00
|
|
|
);
|
2020-05-07 16:55:59 +02:00
|
|
|
}
|
2020-05-18 05:40:09 +02:00
|
|
|
|
|
|
|
|
ModeRoute.propTypes = {
|
|
|
|
|
mode: PropTypes.object.isRequired,
|
|
|
|
|
dataSourceName: PropTypes.string,
|
|
|
|
|
extensionManager: PropTypes.object,
|
2020-05-21 03:07:25 +02:00
|
|
|
servicesManager: PropTypes.object,
|
2020-08-19 21:02:59 +02:00
|
|
|
hotkeysManager: PropTypes.object,
|
2020-05-18 05:40:09 +02:00
|
|
|
};
|