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

+1
View File
@@ -46,6 +46,7 @@ ohif:hanging-protocols
ohif:metadata
ohif:user
ohif:user-keycloak
ohif:measurement-table
fortawesome:fontawesome
momentjs:moment@2.15.1
+3
View File
@@ -101,8 +101,11 @@ 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
@@ -7,7 +7,7 @@
{{> viewerMain (clone this)}}
</div>
<div class="sidebarMenu sidebar-right {{#if rightSidebarOpen}}sidebar-open{{/if}}">
{{> protocolEditor (clone this)}}
{{> measurementLightTable (clone this)}}
</div>
</div>
</template>
@@ -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
@@ -8,9 +8,6 @@
<div class="pull-right m-t-1 rm-x-1">
{{>roundedButtonGroup rightSidebarToggleButtonData}}
</div>
<div class="pull-right">
{{>toolbarSectionTools toolbarButtons=hangingProtocolButtons}}
</div>
</div>
</div>
</template>
@@ -47,14 +47,29 @@ Template.toolbarSection.helpers({
rightSidebarToggleButtonData() {
const instance = Template.instance();
// TODO: Figured out a way to handle both right panel contents
// return {
// toggleable: true,
// key: 'rightSidebar',
// value: instance.data.state,
// options: [{
// value: 'hangingprotocols',
// iconClasses: 'fa fa-cog',
// bottomLabel: 'Hanging'
// }]
// };
return {
toggleable: true,
key: 'rightSidebar',
value: instance.data.state,
options: [{
value: 'hangingprotocols',
iconClasses: 'fa fa-cog',
bottomLabel: 'Hanging'
value: 'measurements',
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-measurements-lesions',
svgWidth: 18,
svgHeight: 10,
bottomLabel: 'Measurements'
}]
};
},
+23 -13
View File
@@ -4,6 +4,7 @@ import { Template } from 'meteor/templating';
import { ReactiveDict } from 'meteor/reactive-dict';
import { Tracker } from 'meteor/tracker';
import { OHIF } from 'meteor/ohif:core';
import { MeasurementTable, measurementEvents } from 'meteor/ohif:measurement-table';
import 'meteor/ohif:cornerstone';
import 'meteor/ohif:viewerbase';
@@ -64,8 +65,6 @@ Meteor.startup(() => {
invert: viewportUtils.invert
};
OHIF.viewer.stackImagePositionOffsetSynchronizer = new OHIF.viewerbase.StackImagePositionOffsetSynchronizer();
// Create the synchronizer used to update reference lines
OHIF.viewer.updateImageSynchronizer = new cornerstoneTools.Synchronizer('cornerstonenewimage', cornerstoneTools.updateImageSynchronizer);
@@ -74,6 +73,9 @@ Meteor.startup(() => {
// Metadata configuration
const metadataProvider = OHIF.viewer.metadataProvider;
cornerstone.metaData.addProvider(metadataProvider.provider.bind(metadataProvider));
// Instanciate viewer plugins
OHIF.viewer.measurementTable = new MeasurementTable();
});
Template.viewer.onCreated(() => {
@@ -135,10 +137,15 @@ Template.viewer.onCreated(() => {
// Updates WADO-RS metaDataManager
OHIF.viewerbase.updateMetaDataManager(study);
});
// 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');
@@ -151,20 +158,23 @@ Template.viewer.onRendered(function() {
}
});
// Call Viewer plugins onRendered functions
if(typeof OHIF.viewer.measurementTable.onRendered === 'function') {
OHIF.viewer.measurementTable.onRendered(instance);
}
});
Template.viewer.events({
'click .js-toggle-studies'() {
const instance = Template.instance();
const current = instance.state.get('leftSidebar');
instance.state.set('leftSidebar', !current);
Template.viewer.events( Object.assign({
// Viewer Events
},
measurementEvents
));
'click .js-toggle-protocol-editor'() {
const instance = Template.instance();
const current = instance.state.get('rightSidebar');
instance.data.state.set('rightSidebar', !current);
},
Template.viewer.onDestroyed(function() {
if(typeof OHIF.viewer.measurementTable.onDestroyed === 'function') {
OHIF.viewer.measurementTable.onDestroyed();
}
});
Template.viewer.helpers({
-5
View File
@@ -298,11 +298,6 @@
"util-deprecate": "~1.0.1"
}
},
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
},
"rimraf": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",