Work on adding SOPClassHandler module based on default behaviour currently in OHIF
This commit is contained in:
1 parent
c710f45c6f
commit
d4f51c5e3c
9 files changed
+403
-20
No files matched your search
@@ -26,19 +26,21 @@ export default function ModeRoute({
|
||||
);
|
||||
|
||||
const LayoutComponent = layoutTemplateModuleEntry.component;
|
||||
//const LayoutComponent = props => <div>{'Testing'}</div>;
|
||||
|
||||
// Add SOPClassHandlers to a new SOPClassManager.
|
||||
/*const manager = new SOPClassHandlerManager(
|
||||
const manager = new SOPClassHandlerManager(
|
||||
extensionManager,
|
||||
sopClassHandlers
|
||||
);*/
|
||||
);
|
||||
|
||||
/*setInterval(() => {
|
||||
setDisplaySetInstanceUids(manager.displaySets);
|
||||
}, 5000);*/
|
||||
|
||||
const queryParams = location.search;
|
||||
|
||||
// Call the data source to start building the view model?
|
||||
//dataSource(queryParams);
|
||||
|
||||
//metadataStore.onModified();
|
||||
|
||||
const onUpdatedCallback = () => {
|
||||
|
||||
@@ -6,10 +6,17 @@ export default class SOPClassHandlerManager {
|
||||
extensionManager.getModuleEntry
|
||||
);
|
||||
|
||||
dicomMetadataStore.listen(this.onSeriesMetadataLoaded);
|
||||
dicomMetadataStore.onSeriesMetadataLoaded(this.onSeriesMetadataLoaded);
|
||||
|
||||
// TODO, this is unclear. How are we getting the created display sets out?
|
||||
this.displaySets = [];
|
||||
}
|
||||
|
||||
onSeriesMetadataLoaded = instances => {
|
||||
if (!instances || !instances.length) {
|
||||
throw new Error("No instances were provided.");
|
||||
}
|
||||
|
||||
const SOPClassHandlers = this.SOPClassHandlers;
|
||||
|
||||
for (let i = 0; i < SOPClassHandlers.length; i++) {
|
||||
@@ -17,7 +24,7 @@ export default class SOPClassHandlerManager {
|
||||
|
||||
if (handler.sopClassUids.includes(instances[0].SOPClassUID)) {
|
||||
// TODO: This step is still unclear to me
|
||||
return handler.getDisplaySetFromSeries(series);
|
||||
this.displaySets = handler.getDisplaySetFromSeries(instances).map(a => a.displaySetInstanceUid);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user