Overriding getImageId in OHIFInstanceMetadata and fixing OHIFViewer to add display sets properly
This commit is contained in:
parent
6973cd4ec8
commit
20efd80c01
@ -105,7 +105,13 @@ Template.viewer.onCreated(() => {
|
||||
|
||||
ViewerData[contentId].studyInstanceUids = [];
|
||||
instance.data.studies.forEach(study => {
|
||||
const studyMetadata = new OHIF.metadata.StudyMetadata(study);
|
||||
const displaySets = OHIF.viewerbase.sortingManager.getDisplaySets(studyMetadata);
|
||||
|
||||
studyMetadata.setDisplaySets(displaySets);
|
||||
|
||||
study.selected = true;
|
||||
study.displaySets = displaySets;
|
||||
OHIF.viewer.Studies.insert(study);
|
||||
OHIF.viewer.StudyMetadataList.insert(studyMetadata);
|
||||
ViewerData[contentId].studyInstanceUids.push(study.studyInstanceUid);
|
||||
|
||||
@ -49,6 +49,16 @@ export class OHIFInstanceMetadata extends InstanceMetadata {
|
||||
return (propertyName in data);
|
||||
}
|
||||
|
||||
// Override
|
||||
getImageId() {
|
||||
// If _imageID is not cached, create it
|
||||
if (this._imageId === null) {
|
||||
this._imageId = Viewerbase.getImageId(this.getData());
|
||||
}
|
||||
|
||||
return this._imageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Static methods
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user