Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions extensions/cornerstone/src/commandsModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ function commandsModule({

const loadDerivedDisplaySetsForActiveViewport = async (
modalities: string[],
onLoadComplete: (displaySet: any, activeViewportId: string) => Promise<void> | void
onLoadComplete: (displaySet: any, activeViewportId: string) => Promise<void> | void,
filterDisplaySet?: (displaySet: DisplaySet) => boolean
): Promise<boolean> => {
const activeViewportId = viewportGridService.getActiveViewportId();
if (!activeViewportId) {
Expand All @@ -211,7 +212,10 @@ function commandsModule({
}

const primaryDisplaySetUID = displaySetInstanceUIDs[0];
const derivedDisplaySets = getDerivedData(modalities, primaryDisplaySetUID);
let derivedDisplaySets = getDerivedData(modalities, primaryDisplaySetUID);
if (filterDisplaySet) {
derivedDisplaySets = derivedDisplaySets.filter(filterDisplaySet);
}
if (!derivedDisplaySets.length) {
console.warn('No derived data found for active viewport!');
return false;
Expand Down Expand Up @@ -278,6 +282,16 @@ function commandsModule({

const actions = {
loadSegmentationsForActiveViewport: async () => {
const initialSeriesInstanceUID = utils.getSplitParam('initialseriesinstanceuid');
if (!initialSeriesInstanceUID?.length) {
return;
}

const matchesInitialSeries = (displaySet: DisplaySet) =>
initialSeriesInstanceUID.some(
seriesUID => displaySet.SeriesInstanceUID === seriesUID
);

console.info('Loading segmentations for active viewport...');

const loaded = await loadDerivedDisplaySetsForActiveViewport(
Expand All @@ -292,7 +306,8 @@ function commandsModule({
segmentationId: displaySet.displaySetInstanceUID,
type: representationType,
});
}
},
matchesInitialSeries
);

if (!loaded) {
Expand Down
11 changes: 11 additions & 0 deletions idc-assets/app-config-template.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
window.config = {
routerBasename: '/v3',
modesConfiguration: {
'@ohif/mode-ultrasound-pleura-bline': {
hide: { $set: true },
},
'@ohif/mode-segmentation': {
hide: { $set: true },
},
'ohif-gcp-mode': {
hide: { $set: true },
}
},
whiteLabeling: {
createLogoComponentFn: function (React) {
return React.createElement(
Expand Down
2 changes: 2 additions & 0 deletions platform/app/.webpack/webpack.pwa.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ module.exports = (env, argv) => {
// Hoisted Yarn Workspace Modules
path.resolve(__dirname, '../../../node_modules'),
SRC_DIR,
path.resolve(__dirname, '../ohif-gcp-extension/node_modules'),
path.resolve(__dirname, '../ohif-gcp-mode/node_modules'),
],
},
plugins: [
Expand Down
7 changes: 7 additions & 0 deletions platform/app/pluginConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@
{
"packageName": "@ohif/mode-basic"
},
{
"packageName": "@ohif/mode-segmentation"
},
{
"packageName": "@ohif/mode-tmtv"
},
Expand All @@ -100,6 +103,10 @@
"default": false,
"version": "3.0.0"
},
{
"packageName": "@ohif/mode-ultrasound-pleura-bline",
"version": "3.0.0"
},
{
"packageName": "ohif-gcp-mode",
"version": "0.0.1"
Expand Down
11 changes: 11 additions & 0 deletions platform/app/public/config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,17 @@ window.config = {
},
},
],
modesConfiguration: {
'@ohif/mode-ultrasound-pleura-bline': {
hide: { $set: true },
},
'@ohif/mode-segmentation': {
hide: { $set: true },
},
'ohif-gcp-mode': {
hide: { $set: true },
}
},
// oidc: [
// {
// authority: 'https://accounts.google.com',
Expand Down
Loading