feat(measurement-table) Display support for measurements from DICOM Structured Reports (#225)

This commit is contained in:
Gustavo André Lelis authored and Erik Ziegler committed 2018-07-20 12:40:09 +02:00
1 parent e9832f62f7
commit d94f0eec16
64 files changed
+1797 -78

No files matched your search

@@ -28,6 +28,7 @@ ohif:viewerbase
ohif:metadata
ohif:study-list
ohif:dicomweb-client
ohif:measurement-table
aldeed:template-extension
aldeed:simple-schema@1.5.3
@@ -83,11 +83,15 @@ ohif:cornerstone-settings@0.0.1
ohif:design@0.0.1
ohif:dicom-services@0.0.1
ohif:dicomweb-client@0.0.1
ohif:hanging-protocols@0.0.1
ohif:header@0.0.1
ohif:hotkeys@0.0.1
ohif:log@0.0.1
ohif:measurement-table@0.0.1
ohif:measurements@0.0.1
ohif:metadata@0.0.1
ohif:polyfill@0.0.1
ohif:select-tree@0.0.1
ohif:servers@0.0.1
ohif:studies@0.0.1
ohif:study-list@0.0.1
@@ -3,8 +3,11 @@
<div class="sidebarMenu sidebar-left {{#if leftSidebarOpen}}sidebar-open{{/if}}">
{{>studyBrowser (clone this)}}
</div>
<div class="mainContent {{#if leftSidebarOpen}}sidebar-left-open{{/if}}">
<div class="mainContent {{#if leftSidebarOpen}}sidebar-left-open{{/if}} {{#if rightSidebarOpen}}sidebar-right-open{{/if}}">
{{>standaloneViewerMain (clone this)}}
</div>
<div class="sidebarMenu sidebar-right {{#if rightSidebarOpen}}sidebar-open{{/if}}">
{{> measurementLightTable (clone this)}}
</div>
</div>
</template>
@@ -13,5 +13,8 @@ Template.flexboxLayout.events({
Template.flexboxLayout.helpers({
leftSidebarOpen() {
return Template.instance().data.state.get('leftSidebar');
},
rightSidebarOpen() {
return Template.instance().data.state.get('rightSidebar');
}
});
@@ -1,7 +1,5 @@
@require '{ohif:design}/app'
$lesionsSidebarMenuWidth = 450px
.viewerSection
display: flex
flex: 1
@@ -47,18 +45,18 @@ $lesionsSidebarMenuWidth = 450px
.sidebar-right
flex: 1
margin-right: - $lesionsSidebarMenuWidth
max-width: $lesionsSidebarMenuWidth
margin-right: - $rightSidebarMenuWidth
max-width: $rightSidebarMenuWidth
order: 3
position: relative
&[data-timepoints="3"]
margin-right: - ($lesionsSidebarMenuWidth + 135.5px)
max-width: $lesionsSidebarMenuWidth + 135.5px
margin-right: - ($rightSidebarMenuWidth + 135.5px)
max-width: $rightSidebarMenuWidth + 135.5px
&[data-timepoints="4"]
margin-right: - ($lesionsSidebarMenuWidth + 270px)
max-width: $lesionsSidebarMenuWidth + 270px
margin-right: - ($rightSidebarMenuWidth + 270px)
max-width: $rightSidebarMenuWidth + 270px
&.sidebar-open
margin-right: 0
@@ -5,6 +5,9 @@
{{>roundedButtonGroup leftSidebarToggleButtonData}}
</div>
{{>toolbarSectionTools toolbarButtons=toolbarButtons}}
<div class="pull-right m-t-1 rm-x-1">
{{>roundedButtonGroup rightSidebarToggleButtonData}}
</div>
</div>
</div>
</template>
@@ -27,6 +27,22 @@ Template.toolbarSection.helpers({
};
},
rightSidebarToggleButtonData() {
const instance = Template.instance();
return {
toggleable: true,
key: 'rightSidebar',
value: instance.data.state,
options: [{
value: 'measurements',
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-measurements-lesions',
svgWidth: 18,
svgHeight: 10,
bottomLabel: 'Measurements'
}]
};
},
toolbarButtons() {
const extraTools = [];
@@ -3,6 +3,8 @@ import { Session } from 'meteor/session';
import { Tracker } from 'meteor/tracker';
import { ReactiveDict } from 'meteor/reactive-dict';
import { OHIF } from 'meteor/ohif:core';
import { MeasurementTable, measurementEvents } from 'meteor/ohif:measurement-table';
import 'meteor/ohif:viewerbase';
import 'meteor/ohif:metadata';
@@ -48,6 +50,9 @@ const initHangingProtocol = () => {
};
Template.viewer.onCreated(() => {
OHIF.viewer.measurementTable = new MeasurementTable();
const instance = Template.instance();
instance.state = new ReactiveDict();
@@ -98,10 +103,15 @@ Template.viewer.onCreated(() => {
OHIF.viewer.StudyMetadataList.insert(studyMetadata);
OHIF.viewer.data.studyInstanceUids.push(study.studyInstanceUid);
});
// Call Viewer plugins onCreated functions
if(typeof OHIF.viewer.measurementTable.onCreated === 'function') {
OHIF.viewer.measurementTable.onCreated(instance);
}
});
Template.viewer.onRendered(function() {
const instance = Template.instance();
this.autorun(function() {
// To make sure ohif viewerMain is rendered before initializing Hanging Protocols
const isOHIFViewerMainRendered = Session.get('OHIFViewerMainRendered');
@@ -114,16 +124,18 @@ Template.viewer.onRendered(function() {
}
});
});
Template.viewer.events({
'click .js-toggle-studies'() {
const instance = Template.instance();
const current = instance.state.get('leftSidebar');
instance.state.set('leftSidebar', !current);
// Call Viewer plugins onRendered functions
if(typeof OHIF.viewer.measurementTable.onRendered === 'function') {
OHIF.viewer.measurementTable.onRendered(instance);
}
});
Template.viewer.events( Object.assign({
// Viewer Events
},
measurementEvents
));
Template.viewer.helpers({
state() {
return Template.instance().state;