Displaying the highest maxTargets limit
This commit is contained in:
parent
ac2df0b3d0
commit
8ddec37c94
@ -32,7 +32,6 @@ Meteor.startup(() => {
|
|||||||
|
|
||||||
Template.viewer.onCreated(() => {
|
Template.viewer.onCreated(() => {
|
||||||
Session.set('ViewerReady', false);
|
Session.set('ViewerReady', false);
|
||||||
console.warn('>>>>viewer.data', Template.instance().data);
|
|
||||||
|
|
||||||
const instance = Template.instance();
|
const instance = Template.instance();
|
||||||
|
|
||||||
|
|||||||
@ -25,10 +25,13 @@ export class CriteriaEvaluator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getMaxTargets() {
|
getMaxTargets() {
|
||||||
let result;
|
let result = 0;
|
||||||
_.each(this.criteria, criterion => {
|
_.each(this.criteria, criterion => {
|
||||||
if (criterion instanceof Criteria.MaxTargetsCriterion) {
|
if (criterion instanceof Criteria.MaxTargetsCriterion) {
|
||||||
result = criterion.options.limit;
|
const { limit } = criterion.options;
|
||||||
|
if (limit > result) {
|
||||||
|
result = limit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@ -44,7 +44,6 @@ export const prepareViewerData = ({ studyInstanceUids, timepointId, timepointsFi
|
|||||||
// Find the timepoint by ID and load the studies from it
|
// Find the timepoint by ID and load the studies from it
|
||||||
OHIF.studylist.timepointApi.retrieveTimepoints(timepointsFilter).then(() => {
|
OHIF.studylist.timepointApi.retrieveTimepoints(timepointsFilter).then(() => {
|
||||||
const viewerData = buildViewerDataFromTimepointId(timepointId);
|
const viewerData = buildViewerDataFromTimepointId(timepointId);
|
||||||
console.warn('>>>>', viewerData);
|
|
||||||
processData(viewerData);
|
processData(viewerData);
|
||||||
}).catch(reject);
|
}).catch(reject);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user