Compare commits

..
Author SHA1 Message Date
ohif-bot 622f18bd3e chore(version): Update package versions [skip ci] 2023-11-24 13:56:33 +00:00
ohif-bot 8b6256e76f chore(version): version.json [skip ci] 2023-11-24 13:56:24 +00:00
Igor Octaviano c4ff2c2f09 feat: Merge Data Source (#3788)
Add the ability to merge two different series queries to generate a complete study query result.  Provides basic support for other types of merges, but those aren't yet added as full features.
2023-11-24 08:46:54 -05:00
ohif-bot 1be5613946 chore(version): Update package versions [skip ci] 2023-11-21 17:47:19 +00:00
ohif-bot 6edb1c1e4c chore(version): version.json [skip ci] 2023-11-21 17:47:12 +00:00
Pedro H. Köhler 404b0a5d53 feat(events): broadcast series summary metadata (#3798) 2023-11-21 12:38:08 -05:00
64 changed files with 1117 additions and 130 deletions

No files matched your search

+22
View File
@@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
### Features
* Merge Data Source ([#3788](https://github.com/OHIF/Viewers/issues/3788)) ([c4ff2c2](https://github.com/OHIF/Viewers/commit/c4ff2c2f09546ce8b72eab9c5e7beed611e3cab0))
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
### Features
* **events:** broadcast series summary metadata ([#3798](https://github.com/OHIF/Viewers/issues/3798)) ([404b0a5](https://github.com/OHIF/Viewers/commit/404b0a5d535182d1ae44e33f7232db500a7b2c16))
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
+1
View File
@@ -45,6 +45,7 @@ module.exports = {
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-transform-regenerator',
'@babel/transform-destructuring',
'@babel/plugin-transform-runtime',
'@babel/plugin-transform-typescript',
],
+1 -1
View File
@@ -1 +1 @@
00e751933ac6d611a34773fa69594243f1b99082
c4ff2c2f09546ce8b72eab9c5e7beed611e3cab0
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-rt",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "DICOM RT read workflow",
"author": "OHIF",
"license": "MIT",
@@ -31,10 +31,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/extension-cornerstone": "3.8.0-beta.21",
"@ohif/extension-default": "3.8.0-beta.21",
"@ohif/i18n": "3.8.0-beta.21",
"@ohif/core": "3.8.0-beta.23",
"@ohif/extension-cornerstone": "3.8.0-beta.23",
"@ohif/extension-default": "3.8.0-beta.23",
"@ohif/i18n": "3.8.0-beta.23",
"prop-types": "^15.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-seg",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "DICOM SEG read workflow",
"author": "OHIF",
"license": "MIT",
@@ -31,10 +31,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/extension-cornerstone": "3.8.0-beta.21",
"@ohif/extension-default": "3.8.0-beta.21",
"@ohif/i18n": "3.8.0-beta.21",
"@ohif/core": "3.8.0-beta.23",
"@ohif/extension-cornerstone": "3.8.0-beta.23",
"@ohif/extension-default": "3.8.0-beta.23",
"@ohif/i18n": "3.8.0-beta.23",
"prop-types": "^15.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-sr",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "OHIF extension for an SR Cornerstone Viewport",
"author": "OHIF",
"license": "MIT",
@@ -32,10 +32,10 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/extension-cornerstone": "3.8.0-beta.21",
"@ohif/extension-measurement-tracking": "3.8.0-beta.21",
"@ohif/ui": "3.8.0-beta.21",
"@ohif/core": "3.8.0-beta.23",
"@ohif/extension-cornerstone": "3.8.0-beta.23",
"@ohif/extension-measurement-tracking": "3.8.0-beta.23",
"@ohif/ui": "3.8.0-beta.23",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/extension-cornerstone
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-cornerstone
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "OHIF extension for Cornerstone",
"author": "OHIF",
"license": "MIT",
@@ -37,8 +37,8 @@
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
"@cornerstonejs/dicom-image-loader": "^1.27.3",
"@ohif/core": "3.8.0-beta.21",
"@ohif/ui": "3.8.0-beta.21",
"@ohif/core": "3.8.0-beta.23",
"@ohif/ui": "3.8.0-beta.23",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.21",
"hammerjs": "^2.0.8",
+19
View File
@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
### Features
* Merge Data Source ([#3788](https://github.com/OHIF/Viewers/issues/3788)) ([c4ff2c2](https://github.com/OHIF/Viewers/commit/c4ff2c2f09546ce8b72eab9c5e7beed611e3cab0))
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-default
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-default
+1
View File
@@ -0,0 +1 @@
module.exports = require('../../babel.config.js');
+17
View File
@@ -0,0 +1,17 @@
const base = require('../../jest.config.base.js');
const pkg = require('./package');
module.exports = {
...base,
name: pkg.name,
displayName: pkg.name,
moduleNameMapper: {
...base.moduleNameMapper,
'@ohif/(.*)': '<rootDir>/../../platform/$1/src',
},
// rootDir: "../.."
// testMatch: [
// //`<rootDir>/platform/${pack.name}/**/*.spec.js`
// "<rootDir>/platform/app/**/*.test.js"
// ]
};
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-default",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "Common/default features and functionality for basic image viewing",
"author": "OHIF Core Team",
"license": "MIT",
@@ -30,8 +30,8 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/i18n": "3.8.0-beta.21",
"@ohif/core": "3.8.0-beta.23",
"@ohif/i18n": "3.8.0-beta.23",
"dcmjs": "^0.29.12",
"dicomweb-client": "^0.10.2",
"prop-types": "^15.6.2",
@@ -1,14 +1,14 @@
import ContextMenuItemsBuilder from './ContextMenuItemsBuilder';
import * as ContextMenuItemsBuilder from './ContextMenuItemsBuilder';
const menus = [
{
id: 'one',
selector: ({ value }) => value === 'one',
selector: ({ value } = {}) => value === 'one',
items: [],
},
{
id: 'two',
selector: ({ value }) => value === 'two',
selector: ({ value } = {}) => value === 'two',
items: [],
},
{
@@ -17,13 +17,13 @@ const menus = [
},
];
const menuBuilder = new ContextMenuItemsBuilder();
describe('ContextMenuItemsBuilder', () => {
test('findMenuDefault', () => {
expect(menuBuilder.findMenuDefault(menus, {})).toBe(menus[2]);
expect(menuBuilder.findMenuDefault(menus, { value: 'two' })).toBe(menus[1]);
expect(menuBuilder.findMenuDefault([], {})).toBeUndefined();
expect(menuBuilder.findMenuDefault(undefined, undefined)).toBeNull();
expect(ContextMenuItemsBuilder.findMenuDefault(menus, {})).toBe(menus[2]);
expect(
ContextMenuItemsBuilder.findMenuDefault(menus, { selectorProps: { value: 'two' } })
).toBe(menus[1]);
expect(ContextMenuItemsBuilder.findMenuDefault([], {})).toBeUndefined();
expect(ContextMenuItemsBuilder.findMenuDefault(undefined, undefined)).toBeNull();
});
});
@@ -140,7 +140,7 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
instances: {
search: (studyInstanceUid, queryParameters) => {
qidoDicomWebClient.headers = getAuthrorizationHeader();
qidoSearch.call(undefined, qidoDicomWebClient, studyInstanceUid, null, queryParameters);
return qidoSearch.call(undefined, qidoDicomWebClient, studyInstanceUid, null, queryParameters);
},
},
},
@@ -262,7 +262,8 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
enableStudyLazyLoad,
filters,
sortCriteria,
sortFunction
sortFunction,
dicomWebConfig
);
// first naturalize the data
@@ -314,6 +315,8 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
Object.keys(instancesPerSeries).forEach(seriesInstanceUID =>
DicomMetadataStore.addInstances(instancesPerSeries[seriesInstanceUID], madeInClient)
);
return seriesSummaryMetadata;
},
_retrieveSeriesMetadataAsync: async (
@@ -333,7 +336,8 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
enableStudyLazyLoad,
filters,
sortCriteria,
sortFunction
sortFunction,
dicomWebConfig
);
/**
@@ -444,6 +448,8 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
);
await Promise.all(seriesDeliveredPromises);
setSuccessFlag();
return seriesSummaryMetadata;
},
deleteStudyMetadataPromise,
getImageIdsForDisplaySet(displaySet) {
@@ -25,7 +25,8 @@ export function retrieveStudyMetadata(
enableStudyLazyLoad,
filters,
sortCriteria,
sortFunction
sortFunction,
dicomWebConfig = {}
) {
// @TODO: Whenever a study metadata request has failed, its related promise will be rejected once and for all
// and further requests for that metadata will always fail. On failure, we probably need to remove the
@@ -38,9 +39,11 @@ export function retrieveStudyMetadata(
throw new Error(`${moduleName}: Required 'StudyInstanceUID' parameter not provided.`);
}
const promiseId = `${dicomWebConfig.name}:${StudyInstanceUID}`;
// Already waiting on result? Return cached promise
if (StudyMetaDataPromises.has(StudyInstanceUID)) {
return StudyMetaDataPromises.get(StudyInstanceUID);
if (StudyMetaDataPromises.has(promiseId)) {
return StudyMetaDataPromises.get(promiseId);
}
let promise;
@@ -71,7 +74,7 @@ export function retrieveStudyMetadata(
}
// Store the promise in cache
StudyMetaDataPromises.set(StudyInstanceUID, promise);
StudyMetaDataPromises.set(promiseId, promise);
return promise;
}
@@ -0,0 +1,203 @@
import { DicomMetadataStore, IWebApiDataSource } from '@ohif/core';
import {
mergeMap,
callForAllDataSourcesAsync,
callForAllDataSources,
callForDefaultDataSource,
callByRetrieveAETitle,
createMergeDataSourceApi,
} from './index';
jest.mock('@ohif/core');
describe('MergeDataSource', () => {
let path,
sourceName,
mergeConfig,
extensionManager,
series1,
series2,
series3,
series4,
mergeKey,
tagFunc,
dataSourceAndSeriesMap,
dataSourceAndUIDsMap,
dataSourceAndDSMap,
pathSync;
beforeAll(() => {
path = 'query.series.search';
pathSync = 'getImageIdsForInstance';
tagFunc = jest.fn((data, sourceName) =>
data.map(item => ({ ...item, RetrieveAETitle: sourceName }))
);
sourceName = 'dicomweb1';
mergeKey = 'seriesInstanceUid';
series1 = { [mergeKey]: '123' };
series2 = { [mergeKey]: '234' };
series3 = { [mergeKey]: '345' };
series4 = { [mergeKey]: '456' };
mergeConfig = {
seriesMerge: {
dataSourceNames: ['dicomweb1', 'dicomweb2'],
defaultDataSourceName: 'dicomweb1',
},
};
dataSourceAndSeriesMap = {
dataSource1: series1,
dataSource2: series2,
dataSource3: series3,
};
dataSourceAndUIDsMap = {
dataSource1: ['123'],
dataSource2: ['234'],
dataSource3: ['345'],
};
dataSourceAndDSMap = {
dataSource1: {
displaySet: {
StudyInstanceUID: '123',
SeriesInstanceUID: '123',
},
},
dataSource2: {
displaySet: {
StudyInstanceUID: '234',
SeriesInstanceUID: '234',
},
},
dataSource3: {
displaySet: {
StudyInstanceUID: '345',
SeriesInstanceUID: '345',
},
},
};
extensionManager = {
dataSourceDefs: {
dataSource1: {
sourceName: 'dataSource1',
configuration: {},
},
dataSource2: {
sourceName: 'dataSource2',
configuration: {},
},
dataSource3: {
sourceName: 'dataSource3',
configuration: {},
},
},
getDataSources: jest.fn(dataSourceName => [
{
[path]: jest.fn().mockResolvedValue([dataSourceAndSeriesMap[dataSourceName]]),
},
]),
};
});
afterEach(() => {
jest.clearAllMocks();
});
describe('callForAllDataSourcesAsync', () => {
it('should call the correct functions and return the merged data', async () => {
/** Arrange */
extensionManager.getDataSources = jest.fn(dataSourceName => [
{
[path]: jest.fn().mockResolvedValue([dataSourceAndSeriesMap[dataSourceName]]),
},
]);
/** Act */
const data = await callForAllDataSourcesAsync({
mergeMap,
path,
args: [],
extensionManager,
dataSourceNames: ['dataSource1', 'dataSource2'],
});
/** Assert */
expect(extensionManager.getDataSources).toHaveBeenCalledTimes(2);
expect(extensionManager.getDataSources).toHaveBeenCalledWith('dataSource1');
expect(extensionManager.getDataSources).toHaveBeenCalledWith('dataSource2');
expect(data).toEqual([series1, series2]);
});
});
describe('callForAllDataSources', () => {
it('should call the correct functions and return the merged data', () => {
/** Arrange */
extensionManager.getDataSources = jest.fn(dataSourceName => [
{
[pathSync]: () => dataSourceAndUIDsMap[dataSourceName],
},
]);
/** Act */
const data = callForAllDataSources({
path: pathSync,
args: [],
extensionManager,
dataSourceNames: ['dataSource2', 'dataSource3'],
});
/** Assert */
expect(extensionManager.getDataSources).toHaveBeenCalledTimes(2);
expect(extensionManager.getDataSources).toHaveBeenCalledWith('dataSource2');
expect(extensionManager.getDataSources).toHaveBeenCalledWith('dataSource3');
expect(data).toEqual(['234', '345']);
});
});
describe('callForDefaultDataSource', () => {
it('should call the correct function and return the data', () => {
/** Arrange */
extensionManager.getDataSources = jest.fn(dataSourceName => [
{
[pathSync]: () => dataSourceAndUIDsMap[dataSourceName],
},
]);
/** Act */
const data = callForDefaultDataSource({
path: pathSync,
args: [],
extensionManager,
defaultDataSourceName: 'dataSource2',
});
/** Assert */
expect(extensionManager.getDataSources).toHaveBeenCalledTimes(1);
expect(extensionManager.getDataSources).toHaveBeenCalledWith('dataSource2');
expect(data).toEqual(['234']);
});
});
describe('callByRetrieveAETitle', () => {
it('should call the correct function and return the data', () => {
/** Arrange */
DicomMetadataStore.getSeries.mockImplementationOnce(() => [series2]);
extensionManager.getDataSources = jest.fn(dataSourceName => [
{
[pathSync]: () => dataSourceAndUIDsMap[dataSourceName],
},
]);
/** Act */
const data = callByRetrieveAETitle({
path: pathSync,
args: [dataSourceAndDSMap['dataSource2']],
extensionManager,
defaultDataSourceName: 'dataSource2',
});
/** Assert */
expect(extensionManager.getDataSources).toHaveBeenCalledTimes(1);
expect(extensionManager.getDataSources).toHaveBeenCalledWith('dataSource2');
expect(data).toEqual(['234']);
});
});
});
@@ -0,0 +1,252 @@
import { DicomMetadataStore, IWebApiDataSource } from '@ohif/core';
import { get, uniqBy } from 'lodash';
import {
MergeConfig,
CallForAllDataSourcesAsyncOptions,
CallForAllDataSourcesOptions,
CallForDefaultDataSourceOptions,
CallByRetrieveAETitleOptions,
MergeMap,
} from './types';
export const mergeMap: MergeMap = {
'query.studies.search': {
mergeKey: 'studyInstanceUid',
tagFunc: x => x,
},
'query.series.search': {
mergeKey: 'seriesInstanceUid',
tagFunc: (series, sourceName) => {
series.forEach(series => {
series.RetrieveAETitle = sourceName;
DicomMetadataStore.updateSeriesMetadata(series);
});
return series;
},
},
};
/**
* Calls all data sources asynchronously and merges the results.
* @param {CallForAllDataSourcesAsyncOptions} options - The options for calling all data sources.
* @param {string} options.path - The path to the function to be called on each data source.
* @param {unknown[]} options.args - The arguments to be passed to the function.
* @param {ExtensionManager} options.extensionManager - The extension manager.
* @param {string[]} options.dataSourceNames - The names of the data sources to be called.
* @returns {Promise<unknown[]>} - A promise that resolves to the merged data from all data sources.
*/
export const callForAllDataSourcesAsync = async ({
mergeMap,
path,
args,
extensionManager,
dataSourceNames,
}: CallForAllDataSourcesAsyncOptions) => {
const { mergeKey, tagFunc } = mergeMap[path] || { tagFunc: x => x };
const dataSourceDefs = Object.values(extensionManager.dataSourceDefs);
const promises = [];
const mergedData = [];
for (const dataSourceDef of dataSourceDefs) {
const { configuration, sourceName } = dataSourceDef;
if (!!configuration && dataSourceNames.includes(sourceName)) {
const [dataSource] = extensionManager.getDataSources(sourceName);
const func = get(dataSource, path);
const promise = func.apply(dataSource, args);
promises.push(promise.then(data => mergedData.push(tagFunc(data, sourceName))));
}
}
await Promise.allSettled(promises);
return uniqBy(mergedData.flat(), obj => obj[mergeKey]);
};
/**
* Calls all data sources that match the provided names and merges their data.
* @param options - The options for calling all data sources.
* @param options.path - The path to the function to be called on each data source.
* @param options.args - The arguments to be passed to the function.
* @param options.extensionManager - The extension manager instance.
* @param options.dataSourceNames - The names of the data sources to be called.
* @returns The merged data from all the matching data sources.
*/
export const callForAllDataSources = ({
path,
args,
extensionManager,
dataSourceNames,
}: CallForAllDataSourcesOptions) => {
const dataSourceDefs = Object.values(extensionManager.dataSourceDefs);
const mergedData = [];
for (const dataSourceDef of dataSourceDefs) {
const { configuration, sourceName } = dataSourceDef;
if (!!configuration && dataSourceNames.includes(sourceName)) {
const [dataSource] = extensionManager.getDataSources(sourceName);
const func = get(dataSource, path);
const data = func.apply(dataSource, args);
mergedData.push(data);
}
}
return mergedData.flat();
};
/**
* Calls the default data source function specified by the given path with the provided arguments.
* @param {CallForDefaultDataSourceOptions} options - The options for calling the default data source.
* @param {string} options.path - The path to the function within the default data source.
* @param {unknown[]} options.args - The arguments to pass to the function.
* @param {string} options.defaultDataSourceName - The name of the default data source.
* @param {ExtensionManager} options.extensionManager - The extension manager instance.
* @returns {unknown} - The result of calling the default data source function.
*/
export const callForDefaultDataSource = ({
path,
args,
defaultDataSourceName,
extensionManager,
}: CallForDefaultDataSourceOptions) => {
const [dataSource] = extensionManager.getDataSources(defaultDataSourceName);
const func = get(dataSource, path);
return func.apply(dataSource, args);
};
/**
* 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 {string} defaultDataSourceName - The name of the default data source.
* @property {ExtensionManager} extensionManager - The extension manager.
*/
export const callByRetrieveAETitle = ({
path,
args,
defaultDataSourceName,
extensionManager,
}: CallByRetrieveAETitleOptions) => {
const [displaySet] = args;
const seriesMetadata = DicomMetadataStore.getSeries(
displaySet.StudyInstanceUID,
displaySet.SeriesInstanceUID
);
const [dataSource] = extensionManager.getDataSources(
seriesMetadata.RetrieveAETitle || defaultDataSourceName
);
return dataSource[path](...args);
};
function createMergeDataSourceApi(
mergeConfig: MergeConfig,
UserAuthenticationService: unknown,
extensionManager
) {
const { seriesMerge } = mergeConfig;
const { dataSourceNames, defaultDataSourceName } = seriesMerge;
const implementation = {
initialize: (...args: unknown[]) =>
callForAllDataSources({ path: 'initialize', args, extensionManager, dataSourceNames }),
query: {
studies: {
search: (...args: unknown[]) =>
callForAllDataSourcesAsync({
mergeMap,
path: 'query.studies.search',
args,
extensionManager,
dataSourceNames,
}),
},
series: {
search: (...args: unknown[]) =>
callForAllDataSourcesAsync({
mergeMap,
path: 'query.series.search',
args,
extensionManager,
dataSourceNames,
}),
},
instances: {
search: (...args: unknown[]) =>
callForAllDataSourcesAsync({
mergeMap,
path: 'query.instances.search',
args,
extensionManager,
dataSourceNames,
}),
},
},
retrieve: {
bulkDataURI: (...args: unknown[]) =>
callForAllDataSourcesAsync({
mergeMap,
path: 'retrieve.bulkDataURI',
args,
extensionManager,
dataSourceNames,
}),
directURL: (...args: unknown[]) =>
callForDefaultDataSource({
path: 'retrieve.directURL',
args,
defaultDataSourceName,
extensionManager,
}),
series: {
metadata: (...args: unknown[]) =>
callForAllDataSourcesAsync({
mergeMap,
path: 'retrieve.series.metadata',
args,
extensionManager,
dataSourceNames,
}),
},
},
store: {
dicom: (...args: unknown[]) =>
callForDefaultDataSource({
path: 'store.dicom',
args,
defaultDataSourceName,
extensionManager,
}),
},
deleteStudyMetadataPromise: (...args: unknown[]) =>
callForAllDataSources({
path: 'deleteStudyMetadataPromise',
args,
extensionManager,
dataSourceNames,
}),
getImageIdsForDisplaySet: (...args: unknown[]) =>
callByRetrieveAETitle({
path: 'getImageIdsForDisplaySet',
args,
defaultDataSourceName,
extensionManager,
}),
getImageIdsForInstance: (...args: unknown[]) =>
callByRetrieveAETitle({
path: 'getImageIdsForDisplaySet',
args,
defaultDataSourceName,
extensionManager,
}),
getStudyInstanceUIDs: (...args: unknown[]) =>
callForAllDataSources({
path: 'getStudyInstanceUIDs',
args,
extensionManager,
dataSourceNames,
}),
};
return IWebApiDataSource.create(implementation);
}
export { createMergeDataSourceApi };
@@ -0,0 +1,44 @@
import { ExtensionManager } from '@ohif/core';
export type MergeMap = {
[key: string]: {
mergeKey: string;
tagFunc: (data: unknown[], sourceName: string) => unknown[];
};
};
export type CallForAllDataSourcesAsyncOptions = {
mergeMap: object;
path: string;
args: unknown[];
dataSourceNames: string[];
extensionManager: ExtensionManager;
};
export type CallForAllDataSourcesOptions = {
path: string;
args: unknown[];
dataSourceNames: string[];
extensionManager: ExtensionManager;
};
export type CallForDefaultDataSourceOptions = {
path: string;
args: unknown[];
defaultDataSourceName: string;
extensionManager: ExtensionManager;
};
export type CallByRetrieveAETitleOptions = {
path: string;
args: unknown[];
defaultDataSourceName: string;
extensionManager: ExtensionManager;
};
export type MergeConfig = {
seriesMerge: {
dataSourceNames: string[];
defaultDataSourceName: string;
};
};
@@ -6,6 +6,7 @@ import { createDicomWebApi } from './DicomWebDataSource/index.js';
import { createDicomJSONApi } from './DicomJSONDataSource/index.js';
import { createDicomLocalApi } from './DicomLocalDataSource/index.js';
import { createDicomWebProxyApi } from './DicomWebProxyDataSource/index.js';
import { createMergeDataSourceApi } from './MergeDataSource/index';
/**
*
@@ -32,6 +33,11 @@ function getDataSourcesModule() {
type: 'localApi',
createDataSource: createDicomLocalApi,
},
{
name: 'merge',
type: 'mergeApi',
createDataSource: createMergeDataSourceApi,
},
];
}
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-microscopy",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "OHIF extension for DICOM microscopy",
"author": "Bill Wallace, md-prog",
"license": "MIT",
@@ -28,10 +28,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/extension-default": "3.8.0-beta.21",
"@ohif/i18n": "3.8.0-beta.21",
"@ohif/ui": "3.8.0-beta.21",
"@ohif/core": "3.8.0-beta.23",
"@ohif/extension-default": "3.8.0-beta.23",
"@ohif/i18n": "3.8.0-beta.23",
"@ohif/ui": "3.8.0-beta.23",
"prop-types": "^15.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-pdf",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "OHIF extension for PDF display",
"author": "OHIF",
"license": "MIT",
@@ -28,8 +28,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/ui": "3.8.0-beta.21",
"@ohif/core": "3.8.0-beta.23",
"@ohif/ui": "3.8.0-beta.23",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/extension-dicom-video
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-dicom-video
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-dicom-video
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-video",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "OHIF extension for video display",
"author": "OHIF",
"license": "MIT",
@@ -28,8 +28,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/ui": "3.8.0-beta.21",
"@ohif/core": "3.8.0-beta.23",
"@ohif/ui": "3.8.0-beta.23",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/extension-measurement-tracking
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-measurement-tracking
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-measurement-tracking
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-measurement-tracking",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "Tracking features and functionality for basic image viewing",
"author": "OHIF Core Team",
"license": "MIT",
@@ -32,9 +32,9 @@
"peerDependencies": {
"@cornerstonejs/core": "^1.27.3",
"@cornerstonejs/tools": "^1.27.3",
"@ohif/core": "3.8.0-beta.21",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.21",
"@ohif/ui": "3.8.0-beta.21",
"@ohif/core": "3.8.0-beta.23",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.23",
"@ohif/ui": "3.8.0-beta.23",
"classnames": "^2.3.2",
"dcmjs": "^0.29.12",
"lodash.debounce": "^4.17.21",
@@ -46,7 +46,7 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@ohif/ui": "3.8.0-beta.21",
"@ohif/ui": "3.8.0-beta.23",
"@xstate/react": "^3.2.2",
"xstate": "^4.10.0"
}
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/extension-test
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-test
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-test
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-test",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "OHIF extension used inside e2e testing",
"author": "OHIF",
"license": "MIT",
@@ -28,8 +28,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/ui": "3.8.0-beta.21",
"@ohif/core": "3.8.0-beta.23",
"@ohif/ui": "3.8.0-beta.23",
"dcmjs": "0.29.11",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/extension-tmtv
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-tmtv
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/extension-tmtv
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-tmtv",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "OHIF extension for Total Metabolic Tumor Volume",
"author": "OHIF",
"license": "MIT",
@@ -28,8 +28,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/ui": "3.8.0-beta.21",
"@ohif/core": "3.8.0-beta.23",
"@ohif/ui": "3.8.0-beta.23",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
+1 -1
View File
@@ -1,5 +1,5 @@
{
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"packages": ["extensions/*", "platform/*", "modes/*"],
"npmClient": "yarn"
}
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-basic-dev-mode",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "Basic OHIF Viewer Using Cornerstone",
"author": "OHIF",
"license": "MIT",
@@ -29,12 +29,12 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/extension-cornerstone": "3.8.0-beta.21",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.21",
"@ohif/extension-default": "3.8.0-beta.21",
"@ohif/extension-dicom-pdf": "3.8.0-beta.21",
"@ohif/extension-dicom-video": "3.8.0-beta.21"
"@ohif/core": "3.8.0-beta.23",
"@ohif/extension-cornerstone": "3.8.0-beta.23",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.23",
"@ohif/extension-default": "3.8.0-beta.23",
"@ohif/extension-dicom-pdf": "3.8.0-beta.23",
"@ohif/extension-dicom-video": "3.8.0-beta.23"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/mode-test
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/mode-test
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/mode-test
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-test",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "Basic mode for testing",
"author": "OHIF",
"license": "MIT",
@@ -32,14 +32,14 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/extension-cornerstone": "3.8.0-beta.21",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.21",
"@ohif/extension-default": "3.8.0-beta.21",
"@ohif/extension-dicom-pdf": "3.8.0-beta.21",
"@ohif/extension-dicom-video": "3.8.0-beta.21",
"@ohif/extension-measurement-tracking": "3.8.0-beta.21",
"@ohif/extension-test": "3.8.0-beta.21"
"@ohif/core": "3.8.0-beta.23",
"@ohif/extension-cornerstone": "3.8.0-beta.23",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.23",
"@ohif/extension-default": "3.8.0-beta.23",
"@ohif/extension-dicom-pdf": "3.8.0-beta.23",
"@ohif/extension-dicom-video": "3.8.0-beta.23",
"@ohif/extension-measurement-tracking": "3.8.0-beta.23",
"@ohif/extension-test": "3.8.0-beta.23"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/mode-longitudinal
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/mode-longitudinal
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/mode-longitudinal
+10 -10
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-longitudinal",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "Longitudinal Workflow",
"author": "OHIF",
"license": "MIT",
@@ -32,15 +32,15 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/extension-cornerstone": "3.8.0-beta.21",
"@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.21",
"@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.21",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.21",
"@ohif/extension-default": "3.8.0-beta.21",
"@ohif/extension-dicom-pdf": "3.8.0-beta.21",
"@ohif/extension-dicom-video": "3.8.0-beta.21",
"@ohif/extension-measurement-tracking": "3.8.0-beta.21"
"@ohif/core": "3.8.0-beta.23",
"@ohif/extension-cornerstone": "3.8.0-beta.23",
"@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.23",
"@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.23",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.23",
"@ohif/extension-default": "3.8.0-beta.23",
"@ohif/extension-dicom-pdf": "3.8.0-beta.23",
"@ohif/extension-dicom-video": "3.8.0-beta.23",
"@ohif/extension-measurement-tracking": "3.8.0-beta.23"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/mode-microscopy
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/mode-microscopy
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/mode-microscopy
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-microscopy",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "OHIF mode for DICOM microscopy",
"author": "OHIF",
"license": "MIT",
@@ -33,8 +33,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/extension-dicom-microscopy": "3.8.0-beta.21"
"@ohif/core": "3.8.0-beta.23",
"@ohif/extension-dicom-microscopy": "3.8.0-beta.23"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/mode-segmentation
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/mode-segmentation
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/mode-segmentation
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-segmentation",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "OHIF segmentation mode which enables labelmap segmentation read/edit/export",
"author": "@ohif",
"license": "MIT",
@@ -33,7 +33,7 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21"
"@ohif/core": "3.8.0-beta.23"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/mode-tmtv
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/mode-tmtv
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/mode-tmtv
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-tmtv",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "Total Metabolic Tumor Volume Workflow",
"author": "OHIF",
"license": "MIT",
@@ -32,13 +32,13 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.21",
"@ohif/extension-cornerstone": "3.8.0-beta.21",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.21",
"@ohif/extension-default": "3.8.0-beta.21",
"@ohif/extension-dicom-pdf": "3.8.0-beta.21",
"@ohif/extension-dicom-video": "3.8.0-beta.21",
"@ohif/extension-measurement-tracking": "3.8.0-beta.21"
"@ohif/core": "3.8.0-beta.23",
"@ohif/extension-cornerstone": "3.8.0-beta.23",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.23",
"@ohif/extension-default": "3.8.0-beta.23",
"@ohif/extension-dicom-pdf": "3.8.0-beta.23",
"@ohif/extension-dicom-video": "3.8.0-beta.23",
"@ohif/extension-measurement-tracking": "3.8.0-beta.23"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/app
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/app
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
+17 -17
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/app",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"productVersion": "3.4.0",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
@@ -52,22 +52,22 @@
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
"@cornerstonejs/dicom-image-loader": "^1.27.3",
"@ohif/core": "3.8.0-beta.21",
"@ohif/extension-cornerstone": "3.8.0-beta.21",
"@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.21",
"@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.21",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.21",
"@ohif/extension-default": "3.8.0-beta.21",
"@ohif/extension-dicom-microscopy": "3.8.0-beta.21",
"@ohif/extension-dicom-pdf": "3.8.0-beta.21",
"@ohif/extension-dicom-video": "3.8.0-beta.21",
"@ohif/extension-test": "3.8.0-beta.21",
"@ohif/i18n": "3.8.0-beta.21",
"@ohif/mode-basic-dev-mode": "3.8.0-beta.21",
"@ohif/mode-longitudinal": "3.8.0-beta.21",
"@ohif/mode-microscopy": "3.8.0-beta.21",
"@ohif/mode-test": "3.8.0-beta.21",
"@ohif/ui": "3.8.0-beta.21",
"@ohif/core": "3.8.0-beta.23",
"@ohif/extension-cornerstone": "3.8.0-beta.23",
"@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.23",
"@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.23",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.23",
"@ohif/extension-default": "3.8.0-beta.23",
"@ohif/extension-dicom-microscopy": "3.8.0-beta.23",
"@ohif/extension-dicom-pdf": "3.8.0-beta.23",
"@ohif/extension-dicom-video": "3.8.0-beta.23",
"@ohif/extension-test": "3.8.0-beta.23",
"@ohif/i18n": "3.8.0-beta.23",
"@ohif/mode-basic-dev-mode": "3.8.0-beta.23",
"@ohif/mode-longitudinal": "3.8.0-beta.23",
"@ohif/mode-microscopy": "3.8.0-beta.23",
"@ohif/mode-test": "3.8.0-beta.23",
"@ohif/ui": "3.8.0-beta.23",
"@types/react": "^17.0.38",
"classnames": "^2.3.2",
"core-js": "^3.16.1",
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/cli
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/cli
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/cli
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/cli",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "A CLI to bootstrap new OHIF extension or mode",
"type": "module",
"main": "src/index.js",
+22
View File
@@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
### Features
* Merge Data Source ([#3788](https://github.com/OHIF/Viewers/issues/3788)) ([c4ff2c2](https://github.com/OHIF/Viewers/commit/c4ff2c2f09546ce8b72eab9c5e7beed611e3cab0))
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
### Features
* **events:** broadcast series summary metadata ([#3798](https://github.com/OHIF/Viewers/issues/3798)) ([404b0a5](https://github.com/OHIF/Viewers/commit/404b0a5d535182d1ae44e33f7232db500a7b2c16))
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/core
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/core",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "Generic business logic for web-based medical imaging applications",
"author": "OHIF Core Team",
"license": "MIT",
@@ -36,7 +36,7 @@
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
"@cornerstonejs/dicom-image-loader": "^1.27.3",
"@ohif/ui": "3.8.0-beta.21",
"@ohif/ui": "3.8.0-beta.23",
"cornerstone-math": "0.1.9",
"dicom-parser": "^1.8.21"
},
@@ -464,7 +464,8 @@ export default class ExtensionManager extends PubSubService {
const { userAuthenticationService } = this._servicesManager.services;
const dataSourceInstance = module.createDataSource(
dataSourceDef.configuration,
userAuthenticationService
userAuthenticationService,
this
);
this.dataSourceMap[dataSourceDef.sourceName] = [dataSourceInstance];
@@ -186,6 +186,18 @@ const BaseImplementation = {
madeInClient,
});
},
updateSeriesMetadata(seriesMetadata) {
const { StudyInstanceUID, SeriesInstanceUID } = seriesMetadata;
const series = _getSeries(StudyInstanceUID, SeriesInstanceUID);
if (!series) {
return;
}
const study = _getStudy(StudyInstanceUID);
if (study) {
study.setSeriesMetadata(SeriesInstanceUID, seriesMetadata);
}
},
addSeriesMetadata(seriesSummaryMetadata, madeInClient = false) {
if (!seriesSummaryMetadata || !seriesSummaryMetadata.length || !seriesSummaryMetadata[0]) {
return;
@@ -214,6 +226,7 @@ const BaseImplementation = {
this._broadcastEvent(EVENTS.SERIES_ADDED, {
StudyInstanceUID,
seriesSummaryMetadata,
madeInClient,
});
},
+19
View File
@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
### Features
* Merge Data Source ([#3788](https://github.com/OHIF/Viewers/issues/3788)) ([c4ff2c2](https://github.com/OHIF/Viewers/commit/c4ff2c2f09546ce8b72eab9c5e7beed611e3cab0))
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package ohif-docs
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package ohif-docs
@@ -81,7 +81,6 @@ You can take a look at `dicomweb` data source implementation to get an idea
`extensions/default/src/DicomWebDataSource/index.js` but here here are some
important api endpoints that you need to implement:
- `initialize`: This method is called when the data source is first created in the mode.tsx, it is used to initialize the data source and set the configuration. For instance, `dicomwebDatasource` uses this method to grab the StudyInstanceUID from the URL and set it as the active study, as opposed to `dicomJSONDatasource` which uses url in the browser to fetch the data and store it in a cache
- `query.studies.search`: This is used in the study panel on the left to fetch the prior studies for the same MRN which is then used to display on the `All` tab. it is also used in the Worklist to show all the studies from the server.
- `query.series.search`: This is used to fetch the series information for a given study that is expanded in the Worklist.
@@ -89,8 +88,6 @@ important api endpoints that you need to implement:
- `retrieve.series.metadata`: It is a crucial end point that is used to fetch series level metadata which for hanging displaySets and displaySet creation.
- `store.dicom`: If you don't need store functionality, you can skip this method. This is used to store the data in the backend.
## Static WADO Client
If the configuration for the data source has the value staticWado set, then it
@@ -172,3 +169,44 @@ extensionManager.updateDataSourceConfiguration( "dicomweb",
},
);
```
## Merge Data Source
The built-in merge data source is a useful tool for combining results from multiple data sources.
Currently, this data source only supports merging at the series level. This means that series from data source 'A'
and series from data source 'B' will be retrieved under the same study. If the same series exists in both data sources,
the first series arrived is the one that gets stored, and any other conflicting series will be ignored.
The merge data source is particularly useful when dealing with derived data that is generated and stored in different servers.
For example, it can be used to retrieve annotation series from one data source and input data (images) from another data source.
A default data source can be defined as shown below. This allows defining which of the servers should be the
fallback server in case something goes wrong.
Configuration Example:
```js
window.config = {
...
dataSources: [
{
sourceName: 'merge',
namespace: '@ohif/extension-default.dataSourcesModule.merge',
configuration: {
name: 'merge',
friendlyName: 'Merge dicomweb-1 and dicomweb-2 data at the series level',
seriesMerge: {
dataSourceNames: ['dicomweb-1', 'dicomweb-2'],
defaultDataSourceName: 'dicomweb-1'
},
},
},
{
sourceName: 'dicomweb-1',
...
},
{
sourceName: 'dicomweb-2',
...
},
],
};
```
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ohif-docs",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"private": true,
"workspaces": {
"nohoist": [
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/i18n
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/i18n
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/i18n
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/i18n",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "Internationalization library for The OHIF Viewer",
"author": "OHIF",
"license": "MIT",
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24)
**Note:** Version bump only for package @ohif/ui
# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21)
**Note:** Version bump only for package @ohif/ui
# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21)
**Note:** Version bump only for package @ohif/ui
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/ui",
"version": "3.8.0-beta.21",
"version": "3.8.0-beta.23",
"description": "A set of React components for Medical Imaging Viewers",
"author": "OHIF Contributors",
"license": "MIT",
+2 -2
View File
@@ -1,4 +1,4 @@
{
"version": "3.8.0-beta.21",
"commit": "00e751933ac6d611a34773fa69594243f1b99082"
"version": "3.8.0-beta.23",
"commit": "c4ff2c2f09546ce8b72eab9c5e7beed611e3cab0"
}
+1 -1
View File
@@ -1 +1 @@
3.8.0-beta.21
3.8.0-beta.23