Bug Fix: Default timpoint protocol for LT not being applied + Lesions not being correctly selected on jumpToRowItem function.

This commit is contained in:
Emanuel F. Oliveira authored and Eloízio Salgado committed 2017-03-02 10:18:11 -03:00
1 parent e1cc8adbad
commit 2a6cb42228
5 files changed
+51 -10

No files matched your search

@@ -1,9 +1,27 @@
import { parsingUtils } from '../parsingUtils';
const FUNCTION = 'function';
export class MetadataProvider {
constructor() {
this.metadataLookup = new Map();
// Define the main "metadataLookup" private property as an immutable property.
Object.defineProperty(this, 'metadataLookup', {
configurable: false,
enumerable: false,
writable: false,
value: new Map()
});
// Local reference to provider function bound to current instance.
Object.defineProperty(this, '_provider', {
configurable: false,
enumerable: false,
writable: true,
value: null
});
}
/**
@@ -244,6 +262,18 @@ export class MetadataProvider {
return imageInfo;
}
/**
* Get a bound reference to the privider function.
*/
getProvider() {
let provider = this._provider;
if (typeof this._provider !== FUNCTION) {
provider = this.provider.bind(this);
this._provider = provider;
}
return provider;
}
/**
* Looks up metadata for Cornerstone Tools given a specified type and imageId
* A type may be, e.g. 'study', or 'patient', or 'imagePlane'. These types