Build WADO logic to fetch + build displaysets + generate imageIds based on prefs.

This commit is contained in:
James A. Petts committed 2020-05-15 14:02:04 +02:00
1 parent d5c83bf596
commit 289d3f5703
6 files changed
+164 -15

No files matched your search

@@ -10,7 +10,7 @@ import { dicomMetadataStore } from '@ohif/core';
* It's worth noting that a single implementation of this interface
* can define different underlying sources for "read" and "write" operations.
*/
function create({ query, retrieve }) {
function create({ query, retrieve, getImageIdsForDisplaySet }) {
const defaultQuery = {
studies: {
/**
@@ -38,8 +38,9 @@ function create({ query, retrieve }) {
};
return {
query,
retrieve,
query: query || defaultQuery,
retrieve: retrieve || defaultRetrieve,
getImageIdsForDisplaySet,
// then go get all series level metadata.
// Store this in the DICOM MetadataStore.
};
+10 -2
View File
@@ -39,6 +39,12 @@ class DisplaySetManager {
);
}
getDisplaySetByUID(displaySetInstanceUid) {
return this.displaySets.find(
displaySet => displaySet.displaySetInstanceUid === displaySetInstanceUid
);
}
makeDisplaySets = instances => {
if (!instances || !instances.length) {
throw new Error('No instances were provided.');
@@ -73,10 +79,12 @@ class DisplaySetManager {
addedDisplaySetUids = this._addDisplaySets(displaySets);
}
this.setDisplaySetInstanceUids([
this.displaySetInstanceUids = [
...addedDisplaySetUids,
...this.displaySetInstanceUids,
]);
];
this.setDisplaySetInstanceUids(this.displaySetInstanceUids);
}
}
};