Move ohif:metadata into ohif:core
This commit is contained in:
1 parent
700fff763c
commit
da36c33c70
8 files changed
+22
-72
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import { Viewerbase } from 'meteor/ohif:viewerbase';
|
||||
import { OHIFSeriesMetadata } from './OHIFSeriesMetadata';
|
||||
|
||||
export class OHIFStudyMetadata extends Viewerbase.metadata.StudyMetadata {
|
||||
|
||||
/**
|
||||
* @param {Object} Study object.
|
||||
*/
|
||||
constructor(data, uid) {
|
||||
super(data, uid);
|
||||
this.init();
|
||||
}
|
||||
|
||||
init() {
|
||||
const study = this.getData();
|
||||
|
||||
// define "_studyInstanceUID" protected property
|
||||
Object.defineProperty(this, '_studyInstanceUID', {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
value: study.studyInstanceUid
|
||||
});
|
||||
|
||||
// populate internal list of series
|
||||
study.seriesList.forEach(series => {
|
||||
this.addSeries(new OHIFSeriesMetadata(series, study));
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user