LT-55: Generating an image for each measurement
This commit is contained in:
1 parent
c6a710aacd
commit
cea42aacdd
4 files changed
+68
-8
No files matched your search
+3
-2
@@ -1,7 +1,7 @@
|
||||
<template name="measurementTableView">
|
||||
<div class="measurementTableView scrollArea">
|
||||
{{#let config=measurementConfiguration measurementGroups=getMeasurementsGroupedByNumber}}
|
||||
{{#each measurementGroup in measurementGroups}}
|
||||
{{#let config=measurementConfiguration}}
|
||||
{{#each measurementGroup in measurementGroups.get}}
|
||||
{{>measurementTableHeaderRow (clone this
|
||||
toolGroup=measurementGroup.toolGroup
|
||||
measurementRows=measurementGroup.measurementRows)}}
|
||||
@@ -31,5 +31,6 @@
|
||||
{{/let}}
|
||||
{{/if}}
|
||||
{{/let}}
|
||||
<div class="btn btn-primary js-pdf">Export PDF</div>
|
||||
</div>
|
||||
</template>
|
||||
+20
-5
@@ -1,7 +1,27 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { Tracker } from 'meteor/tracker';
|
||||
import { _ } from 'meteor/underscore';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
Template.measurementTableView.onCreated(() => {
|
||||
const instance = Template.instance();
|
||||
const { measurementApi, timepointApi } = instance.data;
|
||||
|
||||
instance.data.measurementGroups = new ReactiveVar();
|
||||
|
||||
Tracker.autorun(() => {
|
||||
measurementApi.changeObserver.depend();
|
||||
const data = OHIF.measurements.getMeasurementsGroupedByNumber(measurementApi, timepointApi);
|
||||
instance.data.measurementGroups.set(data);
|
||||
});
|
||||
});
|
||||
|
||||
Template.measurementTableView.events({
|
||||
'click .js-pdf'(event, instance) {
|
||||
OHIF.measurements.exportPdf(instance.data.measurementGroups.get());
|
||||
}
|
||||
});
|
||||
|
||||
Template.measurementTableView.helpers({
|
||||
getNewMeasurementType(tool) {
|
||||
// TODO: Check Conformance criteria here.
|
||||
@@ -14,11 +34,6 @@ Template.measurementTableView.helpers({
|
||||
};
|
||||
},
|
||||
|
||||
getMeasurementsGroupedByNumber() {
|
||||
const { measurementApi, timepointApi } = Template.instance().data;
|
||||
return OHIF.measurements.getMeasurementsGroupedByNumber(measurementApi, timepointApi);
|
||||
},
|
||||
|
||||
newMeasurements(measurementType) {
|
||||
const instance = Template.instance();
|
||||
const measurementApi = instance.data.measurementApi;
|
||||
|
||||
Reference in new issue
Block a user