WIP reorganization
This commit is contained in:
1 parent
6706dfe634
commit
054e37dfb7
266 files changed
+98
-620
No files matched your search
@@ -0,0 +1,29 @@
|
||||
<template name="app">
|
||||
{{#header brandHref='http://ohif.org' headerClasses=instance.headerClasses}}
|
||||
{{#section 'brand'}}
|
||||
<svg class="logo-image">
|
||||
<use xlink:href={{absoluteUrl "packages/ohif_viewerbase/assets/icons.svg#icon-ohif-logo"}}></use>
|
||||
</svg>
|
||||
<div class="logo-text">Open Health Imaging Foundation</div>
|
||||
{{/section}}
|
||||
{{#section 'headerAfterBrand'}}
|
||||
{{#if studyListToggleText}}
|
||||
<a href="#" class="btn studyListLinkSection pull-left js-toggle-studyList" id="{{dasherize studyListToggleText}}-btn">
|
||||
{{studyListToggleText}}
|
||||
</a>
|
||||
{{/if}}
|
||||
{{/section}}
|
||||
{{#section 'headerMenu'}}
|
||||
<span class="research-use pull-left m-r-1">
|
||||
INVESTIGATIONAL USE ONLY
|
||||
</span>
|
||||
<span class="user-name pull-left m-r-1">{{userName}}</span>
|
||||
<div class="menu-toggle pull-right">
|
||||
<i class="fa fa-cog"></i>
|
||||
<span class="caret-down"></span>
|
||||
</div>
|
||||
{{/section}}
|
||||
{{/header}}
|
||||
|
||||
{{>Template.dynamic template=(choose this.template 'studylist') data=this}}
|
||||
</template>
|
||||
@@ -0,0 +1,125 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { Session } from 'meteor/session';
|
||||
import { Router } from 'meteor/clinical:router';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
Template.app.onCreated(() => {
|
||||
const instance = Template.instance();
|
||||
instance.headerClasses = new ReactiveVar('');
|
||||
|
||||
OHIF.header.dropdown.setItems([{
|
||||
action: OHIF.user.audit,
|
||||
text: 'View Audit Log',
|
||||
iconClasses: 'log',
|
||||
iconSvgUse: 'packages/ohif_viewerbase/assets/icons.svg#log',
|
||||
separatorAfter: true
|
||||
}, {
|
||||
action: () => OHIF.ui.showDialog('themeSelectorModal'),
|
||||
text: 'Themes',
|
||||
iconClasses: 'theme',
|
||||
iconSvgUse: 'packages/ohif_viewerbase/assets/icons.svg#theme',
|
||||
separatorAfter: true
|
||||
}, {
|
||||
action: () => OHIF.ui.showDialog('serverInformationModal'),
|
||||
text: 'Server Information',
|
||||
iconClasses: 'server',
|
||||
iconSvgUse: 'packages/ohif_viewerbase/assets/icons.svg#server',
|
||||
separatorAfter: true
|
||||
}, {
|
||||
action: () => OHIF.ui.showDialog('userPreferencesDialog'),
|
||||
text: 'Preferences',
|
||||
icon: 'fa fa-user',
|
||||
separatorAfter: true
|
||||
}, {
|
||||
action: OHIF.user.changePassword,
|
||||
text: 'Change Password',
|
||||
iconClasses: 'password',
|
||||
iconSvgUse: 'packages/ohif_viewerbase/assets/icons.svg#password'
|
||||
}, {
|
||||
action: OHIF.user.logout,
|
||||
text: 'Logout',
|
||||
iconClasses: 'logout',
|
||||
iconSvgUse: 'packages/ohif_viewerbase/assets/icons.svg#logout'
|
||||
}]);
|
||||
|
||||
instance.autorun(() => {
|
||||
const currentRoute = Router.current();
|
||||
if (!currentRoute) return;
|
||||
const routeName = currentRoute.route.getName();
|
||||
const isViewer = routeName.indexOf('viewer') === 0;
|
||||
|
||||
// Add or remove the strech class from body
|
||||
$(document.body)[isViewer ? 'addClass' : 'removeClass']('stretch');
|
||||
|
||||
// Set the header on its bigger version if the viewer is not opened
|
||||
instance.headerClasses.set(isViewer ? '' : 'header-big');
|
||||
|
||||
// Set the viewer open state on session
|
||||
Session.set('ViewerOpened', isViewer);
|
||||
});
|
||||
});
|
||||
|
||||
Template.app.events({
|
||||
'click .js-toggle-studyList'(event, instance) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
const isViewer = Session.get('ViewerOpened');
|
||||
|
||||
if (!isViewer) {
|
||||
const timepointId = OHIF.viewer.data.currentTimepointId;
|
||||
if (timepointId) {
|
||||
Router.go('viewerTimepoint', { timepointId });
|
||||
} else {
|
||||
const { studyInstanceUids } = OHIF.viewer.data;
|
||||
Router.go('viewerStudies', { studyInstanceUids });
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
OHIF.ui.unsavedChanges.presentProactiveDialog('viewer.*', (hasChanges, userChoice) => {
|
||||
if (!hasChanges) {
|
||||
return Router.go('studylist');
|
||||
}
|
||||
|
||||
switch (userChoice) {
|
||||
case 'abort-action':
|
||||
return;
|
||||
case 'save-changes':
|
||||
OHIF.ui.unsavedChanges.trigger('viewer', 'save', false);
|
||||
OHIF.ui.unsavedChanges.clear('viewer.*');
|
||||
break;
|
||||
case 'abandon-changes':
|
||||
OHIF.ui.unsavedChanges.clear('viewer.*');
|
||||
break;
|
||||
}
|
||||
|
||||
Router.go('studylist');
|
||||
}, {
|
||||
position: {
|
||||
x: event.clientX + 15,
|
||||
y: event.clientY + 15
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Template.app.helpers({
|
||||
userName: OHIF.user.getName,
|
||||
|
||||
studyListToggleText() {
|
||||
const isViewer = Session.get('ViewerOpened');
|
||||
|
||||
// Return empty if viewer was not opened yet
|
||||
if (!OHIF.utils.ObjectPath.get(OHIF, 'viewer.data.studyInstanceUids')) return;
|
||||
|
||||
return isViewer ? 'Study list' : 'Back to viewer';
|
||||
},
|
||||
|
||||
dasherize(text) {
|
||||
return text.replace(/ /g, '-').toLowerCase();
|
||||
}
|
||||
});
|
||||
|
||||
Session.set('defaultSignInMessage', 'Tumor tracking in your browser.');
|
||||
@@ -0,0 +1,88 @@
|
||||
@require "{ohif:design}/app"
|
||||
|
||||
body>.header
|
||||
|
||||
.brand
|
||||
height: 30px
|
||||
display: inline-block
|
||||
text-decoration: none
|
||||
|
||||
.logo-image
|
||||
display: inline-block
|
||||
fill: transparent
|
||||
float: left
|
||||
height: 100%
|
||||
margin: 0 8px 0 0
|
||||
width: 30px
|
||||
|
||||
.logo-text
|
||||
display: inline-block
|
||||
font-family: $logoFontFamily
|
||||
font-size: 14px
|
||||
font-weight: $logoFontWeight
|
||||
theme('color', '$textPrimaryColor')
|
||||
line-height: 30px
|
||||
|
||||
.header-menu
|
||||
.user-name
|
||||
font-size: 13px
|
||||
|
||||
.menu-toggle
|
||||
theme('border-left', 'solid 1px $defaultColor')
|
||||
display: inline-block
|
||||
height: 18px
|
||||
padding: 0 8px
|
||||
|
||||
.fa
|
||||
theme('color', '$defaultColor')
|
||||
font-size: 17px
|
||||
line-height: 18px
|
||||
|
||||
.caret-down
|
||||
theme('color', '$uiGrayLight')
|
||||
margin: 0 4px 4px 2px
|
||||
|
||||
.btn
|
||||
theme('color', '$textSecondaryColor')
|
||||
cursor: pointer
|
||||
font-size: 13px
|
||||
font-weight: 500
|
||||
line-height: 26px
|
||||
|
||||
&:hover
|
||||
theme('color', '$hoverColor')
|
||||
|
||||
&:active
|
||||
theme('color', '$activeColor')
|
||||
|
||||
.studyListLinkSection
|
||||
theme('border-left', '%s solid $uiBorderColor' % $uiBorderThickness)
|
||||
margin: 3px 0 0 10px
|
||||
padding: 0 0 0 10px
|
||||
|
||||
&#back-to-viewer-btn
|
||||
border-left: 0
|
||||
|
||||
&.header-big
|
||||
padding-left: $studyListPadding
|
||||
padding-right: $studyListPadding
|
||||
|
||||
.brand
|
||||
height: 100%
|
||||
width: 80%
|
||||
line-height: $topBarExpandedHeight - 10px
|
||||
|
||||
.logo-image
|
||||
margin: 0 20px 0 0
|
||||
width: 50px
|
||||
|
||||
.logo-text
|
||||
font-size: 30px
|
||||
|
||||
.studyListLinkSection
|
||||
border: none
|
||||
left: 0
|
||||
margin: 0
|
||||
padding: 0
|
||||
position: absolute
|
||||
top: 0
|
||||
@@ -0,0 +1,37 @@
|
||||
<template name="toolbarSection">
|
||||
<div class="toolbarSection noselect p-x-2">
|
||||
<div class="clearfix">
|
||||
<div class="pull-left m-t-1">
|
||||
{{>roundedButtonGroup leftSidebarToggleButtonData}}
|
||||
</div>
|
||||
|
||||
{{>toolbarSectionTools toolbarButtons=toolbarButtons}}
|
||||
|
||||
<div class="pull-right m-t-1 rm-x-1">
|
||||
{{#form (extend api=instance.api)}}
|
||||
{{#button class='btn p-x-2' action='save' disabled=(isFinishDisabled)}}Save{{/button}}
|
||||
{{/form}}
|
||||
</div>
|
||||
|
||||
<div id="toggleMeasurements" class="pull-right m-t-1 rm-x-1">
|
||||
{{>roundedButtonGroup rightSidebarToggleButtonData}}
|
||||
</div>
|
||||
<div id="toggleHUD" class="toolbarSectionButton pull-right rp-x-1 m-t-1 rm-r-3 {{#if session 'measurementTableHudOpen'}}active{{/if}}">
|
||||
<div class="svgContainer">
|
||||
<svg>
|
||||
<use xlink:href={{absoluteUrl "packages/ohif_viewerbase/assets/icons.svg#icon-hud"}}></use>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="buttonLabel">HUD</div>
|
||||
</div>
|
||||
<div id="toggleTrial" class="toolbarSectionButton pull-right rp-x-1 m-t-1 rm-r-1">
|
||||
<div class="svgContainer">
|
||||
<svg>
|
||||
<use xlink:href={{absoluteUrl "packages/ohif_viewerbase/assets/icons.svg#icon-trial-info"}}></use>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="buttonLabel">Trial</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,320 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { Session } from 'meteor/session';
|
||||
import { Tracker } from 'meteor/tracker';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
import { Viewerbase } from 'meteor/ohif:viewerbase';
|
||||
|
||||
Template.toolbarSection.helpers({
|
||||
isFinishDisabled() {
|
||||
const instance = Template.instance();
|
||||
|
||||
// Run this computation on save or every time any measurement / timepoint suffer changes
|
||||
OHIF.ui.unsavedChanges.depend();
|
||||
instance.saveObserver.depend();
|
||||
Session.get('LayoutManagerUpdated');
|
||||
|
||||
return OHIF.ui.unsavedChanges.probe('viewer.*') === 0;
|
||||
},
|
||||
|
||||
leftSidebarToggleButtonData() {
|
||||
const instance = Template.instance();
|
||||
return {
|
||||
toggleable: true,
|
||||
key: 'leftSidebar',
|
||||
value: instance.data.state,
|
||||
options: [{
|
||||
value: 'studies',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-studies',
|
||||
svgWidth: 15,
|
||||
svgHeight: 13,
|
||||
bottomLabel: 'Studies'
|
||||
}]
|
||||
};
|
||||
},
|
||||
|
||||
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() {
|
||||
// Check if the measure tools shall be disabled
|
||||
const isToolDisabled = false; //!Template.instance().data.timepointApi;
|
||||
|
||||
const targetSubTools = [];
|
||||
|
||||
targetSubTools.push({
|
||||
id: 'bidirectional',
|
||||
title: 'Bidirectional',
|
||||
classes: 'imageViewerTool rm-l-3',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-target',
|
||||
disabled: isToolDisabled
|
||||
});
|
||||
|
||||
targetSubTools.push({
|
||||
id: 'targetCR',
|
||||
title: 'CR Target',
|
||||
classes: 'imageViewerTool',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-target-cr',
|
||||
disabled: isToolDisabled
|
||||
});
|
||||
|
||||
targetSubTools.push({
|
||||
id: 'targetUN',
|
||||
title: 'UN Target',
|
||||
classes: 'imageViewerTool',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-target-un',
|
||||
disabled: isToolDisabled
|
||||
});
|
||||
|
||||
const extraTools = [];
|
||||
|
||||
extraTools.push({
|
||||
id: 'stackScroll',
|
||||
title: 'Stack Scroll',
|
||||
classes: 'imageViewerTool',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-stack-scroll'
|
||||
});
|
||||
|
||||
extraTools.push({
|
||||
id: 'resetViewport',
|
||||
title: 'Reset',
|
||||
classes: 'imageViewerCommand',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-reset'
|
||||
});
|
||||
|
||||
extraTools.push({
|
||||
id: 'rotateR',
|
||||
title: 'Rotate Right',
|
||||
classes: 'imageViewerCommand',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-rotate-right'
|
||||
});
|
||||
|
||||
extraTools.push({
|
||||
id: 'flipH',
|
||||
title: 'Flip H',
|
||||
classes: 'imageViewerCommand',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-flip-horizontal'
|
||||
});
|
||||
|
||||
extraTools.push({
|
||||
id: 'flipV',
|
||||
title: 'Flip V',
|
||||
classes: 'imageViewerCommand',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-flip-vertical'
|
||||
});
|
||||
|
||||
extraTools.push({
|
||||
id: 'invert',
|
||||
title: 'Invert',
|
||||
classes: 'imageViewerCommand',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-invert'
|
||||
});
|
||||
|
||||
extraTools.push({
|
||||
id: 'magnify',
|
||||
title: 'Magnify',
|
||||
classes: 'imageViewerTool',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-magnify'
|
||||
});
|
||||
|
||||
extraTools.push({
|
||||
id: 'ellipticalRoi',
|
||||
title: 'Ellipse',
|
||||
classes: 'imageViewerTool',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-elliptical-roi'
|
||||
});
|
||||
|
||||
extraTools.push({
|
||||
id: 'toggleDownloadDialog',
|
||||
title: 'Download',
|
||||
classes: 'imageViewerCommand',
|
||||
iconClasses: 'fa fa-camera',
|
||||
active: () => $('#imageDownloadDialog').is(':visible')
|
||||
});
|
||||
|
||||
extraTools.push({
|
||||
id: 'toggleCineDialog',
|
||||
title: 'CINE',
|
||||
classes: 'imageViewerCommand',
|
||||
iconClasses: 'fa fa-youtube-play',
|
||||
active: () => $('#cineDialog').is(':visible')
|
||||
});
|
||||
|
||||
const buttonData = [];
|
||||
|
||||
buttonData.push({
|
||||
id: 'zoom',
|
||||
title: 'Zoom',
|
||||
classes: 'imageViewerTool',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-zoom'
|
||||
});
|
||||
|
||||
buttonData.push({
|
||||
id: 'wwwc',
|
||||
title: 'Levels',
|
||||
classes: 'imageViewerTool',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-levels'
|
||||
});
|
||||
|
||||
buttonData.push({
|
||||
id: 'pan',
|
||||
title: 'Pan',
|
||||
classes: 'imageViewerTool',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-pan'
|
||||
});
|
||||
|
||||
buttonData.push({
|
||||
id: 'linkStackScroll',
|
||||
title: 'Link',
|
||||
classes: 'imageViewerCommand toolbarSectionButton nonAutoDisableState',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-link',
|
||||
disableFunction: Viewerbase.viewportUtils.isStackScrollLinkingDisabled
|
||||
});
|
||||
|
||||
buttonData.push({
|
||||
id: 'toggleTarget',
|
||||
title: 'Target',
|
||||
classes: 'rm-l-3',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-target',
|
||||
disabled: isToolDisabled,
|
||||
subTools: targetSubTools
|
||||
});
|
||||
|
||||
buttonData.push({
|
||||
id: 'nonTarget',
|
||||
title: 'Non-Target',
|
||||
classes: 'imageViewerTool',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-non-target',
|
||||
disabled: isToolDisabled
|
||||
});
|
||||
|
||||
buttonData.push({
|
||||
id: 'length',
|
||||
title: 'Temp',
|
||||
classes: 'imageViewerTool',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-temp'
|
||||
});
|
||||
|
||||
buttonData.push({
|
||||
id: 'toggleMore',
|
||||
title: 'More',
|
||||
classes: 'rp-x-1 rm-l-3',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-more',
|
||||
disabled: isToolDisabled,
|
||||
subTools: extraTools
|
||||
});
|
||||
|
||||
return buttonData;
|
||||
}
|
||||
});
|
||||
|
||||
Template.toolbarSection.events({
|
||||
'click #toggleTarget'(event, instance) {
|
||||
const $target = $(event.currentTarget);
|
||||
if (!$target.hasClass('active') && $target.hasClass('expanded')) {
|
||||
Viewerbase.toolManager.setActiveTool('bidirectional');
|
||||
}
|
||||
},
|
||||
|
||||
'click #toggleHUD'(event) {
|
||||
const $this = $(event.currentTarget);
|
||||
|
||||
// Stop here if the tool is disabled
|
||||
if ($this.hasClass('disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const state = Session.get('measurementTableHudOpen');
|
||||
Session.set('measurementTableHudOpen', !state);
|
||||
},
|
||||
|
||||
'click #toggleTrial'(event) {
|
||||
if (!$(event.currentTarget).hasClass('disabled')) {
|
||||
OHIF.ui.showDialog('trialOptionsModal');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Template.toolbarSection.onCreated( function() {
|
||||
const instance = Template.instance();
|
||||
|
||||
instance.path = 'viewer.studyViewer.measurements';
|
||||
instance.saveObserver = new Tracker.Dependency();
|
||||
instance.api = {
|
||||
save() {
|
||||
// Clear signaled unsaved changes...
|
||||
const successHandler = () => {
|
||||
OHIF.ui.unsavedChanges.clear(`${instance.path}.*`);
|
||||
instance.saveObserver.changed();
|
||||
};
|
||||
|
||||
// Display the error messages
|
||||
const errorHandler = data => {
|
||||
OHIF.ui.showDialog('dialogInfo', Object.assign({ class: 'themed' }, data));
|
||||
};
|
||||
|
||||
const promise = instance.data.measurementApi.storeMeasurements();
|
||||
promise.then(successHandler).catch(errorHandler);
|
||||
OHIF.ui.showDialog('dialogLoading', {
|
||||
promise,
|
||||
text: 'Saving measurement data'
|
||||
});
|
||||
|
||||
return promise;
|
||||
}
|
||||
};
|
||||
|
||||
instance.unsavedChangesHandler = () => {
|
||||
const isNotDisabled = !instance.$('.js-finish-case').hasClass('disabled');
|
||||
if (isNotDisabled && instance.progressPercent.get() === 100) {
|
||||
instance.api.save();
|
||||
}
|
||||
};
|
||||
|
||||
// Attach handler for unsaved changes dialog...
|
||||
OHIF.ui.unsavedChanges.attachHandler(instance.path, 'save', instance.unsavedChangesHandler);
|
||||
});
|
||||
|
||||
Template.toolbarSection.onRendered(function() {
|
||||
// TODO: Figure out a way to disable/enable the buttons with each status from New API
|
||||
// // Set disabled/enabled tool buttons that are set in toolManager
|
||||
// const states = Viewerbase.toolManager.getToolDefaultStates();
|
||||
// const disabledToolButtons = states.disabledToolButtons;
|
||||
// const allToolbarButtons = $('.toolbarSection').find('.toolbarSectionButton:not(.nonAutoDisableState)');
|
||||
//
|
||||
// // Additional toolbar buttons whose classes are not toolbarSectionButton
|
||||
// allToolbarButtons.push($('#toolbarSectionEntry')[0]);
|
||||
// allToolbarButtons.push($('#toggleMeasurements')[0]);
|
||||
//
|
||||
// if (disabledToolButtons && disabledToolButtons.length > 0) {
|
||||
// for (let i = 0; i < allToolbarButtons.length; i++) {
|
||||
// const toolbarButton = allToolbarButtons[i];
|
||||
// const index = disabledToolButtons.indexOf($(toolbarButton).attr('id'));
|
||||
// if (index !== -1) {
|
||||
// $(toolbarButton).addClass('disabled');
|
||||
// $(toolbarButton).find('*').addClass('disabled');
|
||||
// } else {
|
||||
// $(toolbarButton).removeClass('disabled');
|
||||
// $(toolbarButton).find('*').removeClass('disabled');
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
});
|
||||
|
||||
Template.caseProgress.onDestroyed(() => {
|
||||
const instance = Template.instance();
|
||||
// Remove unsaved changes handler after this view has been destroyed...
|
||||
OHIF.ui.unsavedChanges.removeHandler(instance.path, 'save', instance.unsavedChangesHandler);
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
@import "{ohif:design}/app"
|
||||
|
||||
.toolbarSection
|
||||
theme('border-bottom', '%s solid $uiBorderColor' % $uiBorderThickness)
|
||||
flex: 0 0 auto
|
||||
height: $toolbarHeight
|
||||
padding-top: 6px
|
||||
position: relative
|
||||
transition(height 300ms ease)
|
||||
width: 100%
|
||||
|
||||
&.expanded
|
||||
height: $toolbarHeight + $toolbarDrawerHeight
|
||||
|
||||
.toolbarSectionEntry
|
||||
theme('color', '$defaultColor')
|
||||
cursor: pointer
|
||||
display: inline-block
|
||||
theme('fill', '$defaultColor')
|
||||
margin-top: 3px
|
||||
min-width: 30px
|
||||
theme('stroke', '$defaultColor')
|
||||
text-align: center
|
||||
|
||||
.saveMeasurements
|
||||
display: inline-block
|
||||
margin-left: 22px
|
||||
@@ -0,0 +1,17 @@
|
||||
<template name="viewer">
|
||||
<div class="viewerDialogs">
|
||||
{{#if and Template.subscriptionsReady dataSourcesReady}}
|
||||
{{>confirmDeleteDialog}}
|
||||
{{>measurementTableHUD (clone this)}}
|
||||
{{>cineDialog}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div id="viewer">
|
||||
{{#if and Template.subscriptionsReady dataSourcesReady}}
|
||||
{{>toolbarSection (clone this state=state)}}
|
||||
{{>viewerSection (clone this state=state)}}
|
||||
{{else}}
|
||||
{{>loadingText}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,385 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { Tracker } from 'meteor/tracker';
|
||||
import { Session } from 'meteor/session';
|
||||
import { ReactiveDict } from 'meteor/reactive-dict';
|
||||
import { _ } from 'meteor/underscore';
|
||||
import { $ } from 'meteor/jquery';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
import 'meteor/ohif:cornerstone';
|
||||
import 'meteor/ohif:viewerbase';
|
||||
import 'meteor/ohif:metadata';
|
||||
|
||||
Meteor.startup(() => {
|
||||
Session.set('TimepointsReady', false);
|
||||
Session.set('MeasurementsReady', false);
|
||||
|
||||
OHIF.viewer.displaySeriesQuickSwitch = true;
|
||||
OHIF.viewer.stackImagePositionOffsetSynchronizer = new OHIF.viewerbase.StackImagePositionOffsetSynchronizer();
|
||||
|
||||
// Create the synchronizer used to update reference lines
|
||||
OHIF.viewer.updateImageSynchronizer = new cornerstoneTools.Synchronizer('cornerstonenewimage', cornerstoneTools.updateImageSynchronizer);
|
||||
|
||||
OHIF.viewer.metadataProvider = new OHIF.cornerstone.MetadataProvider();
|
||||
|
||||
// Metadata configuration
|
||||
const metadataProvider = OHIF.viewer.metadataProvider;
|
||||
cornerstone.metaData.addProvider(metadataProvider.getProvider());
|
||||
|
||||
// Target tools configuration
|
||||
OHIF.lesiontracker.configureTargetToolsHandles();
|
||||
});
|
||||
|
||||
Template.viewer.onCreated(() => {
|
||||
Session.set('ViewerReady', false);
|
||||
|
||||
const instance = Template.instance();
|
||||
|
||||
// Define the OHIF.viewer.data global object
|
||||
OHIF.viewer.data = OHIF.viewer.data || Session.get('ViewerData') || {};
|
||||
|
||||
const { TimepointApi, MeasurementApi, ConformanceCriteria } = OHIF.measurements;
|
||||
|
||||
const currentTimepointId = OHIF.viewer.data.currentTimepointId;
|
||||
const timepointApi = new TimepointApi(currentTimepointId);
|
||||
const measurementApi = new MeasurementApi(timepointApi);
|
||||
const conformanceCriteria = new ConformanceCriteria(measurementApi, timepointApi);
|
||||
const apis = {
|
||||
timepointApi,
|
||||
measurementApi,
|
||||
conformanceCriteria
|
||||
};
|
||||
|
||||
Object.assign(OHIF.viewer, apis);
|
||||
Object.assign(instance.data, apis);
|
||||
|
||||
instance.state = new ReactiveDict();
|
||||
instance.state.set('leftSidebar', Session.get('leftSidebar'));
|
||||
instance.state.set('rightSidebar', Session.get('rightSidebar'));
|
||||
|
||||
const viewportUtils = OHIF.viewerbase.viewportUtils;
|
||||
|
||||
OHIF.viewer.functionList = $.extend(OHIF.viewer.functionList, {
|
||||
toggleLesionTrackerTools: OHIF.lesiontracker.toggleLesionTrackerTools,
|
||||
bidirectional: () => {
|
||||
// Used for hotkeys
|
||||
OHIF.viewerbase.toolManager.setActiveTool('bidirectional');
|
||||
},
|
||||
nonTarget: () => {
|
||||
// Used for hotkeys
|
||||
OHIF.viewerbase.toolManager.setActiveTool('nonTarget');
|
||||
},
|
||||
// Viewport functions
|
||||
toggleCineDialog: viewportUtils.toggleCineDialog,
|
||||
clearTools: viewportUtils.clearTools,
|
||||
resetViewport: viewportUtils.resetViewport,
|
||||
invert: viewportUtils.invert,
|
||||
flipV: viewportUtils.flipV,
|
||||
flipH: viewportUtils.flipH,
|
||||
rotateL: viewportUtils.rotateL,
|
||||
rotateR: viewportUtils.rotateR,
|
||||
linkStackScroll: viewportUtils.linkStackScroll
|
||||
});
|
||||
|
||||
if (OHIF.viewer.data.loadedSeriesData) {
|
||||
OHIF.log.info('Reloading previous loadedSeriesData');
|
||||
OHIF.viewer.loadedSeriesData = OHIF.viewer.data.loadedSeriesData;
|
||||
} else {
|
||||
OHIF.log.info('Setting default viewer data');
|
||||
OHIF.viewer.loadedSeriesData = {};
|
||||
OHIF.viewer.data.loadedSeriesData = {};
|
||||
}
|
||||
|
||||
Session.set('activeViewport', OHIF.viewer.data.activeViewport || false);
|
||||
|
||||
// Set lesion tool buttons as disabled if pixel spacing is not available for active element
|
||||
instance.autorun(OHIF.lesiontracker.pixelSpacingAutorunCheck);
|
||||
|
||||
// @TypeSafeStudies
|
||||
// Clears OHIF.viewer.Studies collection
|
||||
OHIF.viewer.Studies.removeAll();
|
||||
|
||||
// @TypeSafeStudies
|
||||
// Clears OHIF.viewer.StudyMetadataList collection
|
||||
OHIF.viewer.StudyMetadataList.removeAll();
|
||||
|
||||
instance.data.studies.forEach(study => {
|
||||
const studyMetadata = new OHIF.metadata.StudyMetadata(study, study.studyInstanceUid);
|
||||
let displaySets = study.displaySets;
|
||||
|
||||
if (!study.displaySets) {
|
||||
displaySets = OHIF.viewerbase.sortingManager.getDisplaySets(studyMetadata);
|
||||
study.displaySets = displaySets;
|
||||
}
|
||||
|
||||
studyMetadata.setDisplaySets(displaySets);
|
||||
|
||||
study.selected = true;
|
||||
OHIF.viewer.Studies.insert(study);
|
||||
OHIF.viewer.StudyMetadataList.insert(studyMetadata);
|
||||
});
|
||||
|
||||
const patientId = instance.data.studies[0].patientId;
|
||||
|
||||
// LT-382: Preventing HP to keep identifying studies in timepoints that might be removed
|
||||
instance.data.studies.forEach(study => (delete study.timepointType));
|
||||
|
||||
// TODO: Consider combining the retrieval calls into one?
|
||||
const timepointsPromise = timepointApi.retrieveTimepoints({ patientId });
|
||||
timepointsPromise.then(() => {
|
||||
const timepoints = timepointApi.all();
|
||||
|
||||
// Set timepointType in studies to be used in hanging protocol engine
|
||||
timepoints.forEach(timepoint => {
|
||||
timepoint.studyInstanceUids.forEach(studyInstanceUid => {
|
||||
const study = _.find(instance.data.studies, element => {
|
||||
return element.studyInstanceUid === studyInstanceUid;
|
||||
});
|
||||
if (!study) {
|
||||
return;
|
||||
}
|
||||
|
||||
// @TODO: Maybe this should be a setCustomAttribute?
|
||||
study.timepointType = timepoint.timepointType;
|
||||
});
|
||||
});
|
||||
|
||||
Session.set('TimepointsReady', true);
|
||||
|
||||
const timepointIds = timepoints.map(t => t.timepointId);
|
||||
|
||||
const measurementsPromise = measurementApi.retrieveMeasurements(patientId, timepointIds);
|
||||
measurementsPromise.then(() => {
|
||||
Session.set('MeasurementsReady', true);
|
||||
|
||||
measurementApi.syncMeasurementsAndToolData();
|
||||
});
|
||||
});
|
||||
|
||||
// Provide the necessary data to the Measurement API and Timepoint API
|
||||
const prior = timepointApi.prior();
|
||||
if (prior) {
|
||||
measurementApi.priorTimepointId = prior.timepointId;
|
||||
}
|
||||
|
||||
// Enable/Disable Lesion Tracker Tools if the opened study is associated or not
|
||||
OHIF.lesiontracker.toggleLesionTrackerToolsButtons(!!currentTimepointId);
|
||||
|
||||
let firstMeasurementActivated = false;
|
||||
instance.autorun(() => {
|
||||
if (!Session.get('TimepointsReady') ||
|
||||
!Session.get('MeasurementsReady') ||
|
||||
!Session.get('ViewerReady') ||
|
||||
firstMeasurementActivated) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Find and activate the first measurement by Lesion Number
|
||||
// NOTE: This is inefficient, we should be using a hanging protocol
|
||||
// to hang the first measurement's imageId immediately, rather
|
||||
// than changing images after initial loading...
|
||||
const config = OHIF.measurements.MeasurementApi.getConfiguration();
|
||||
const tools = config.measurementTools[0].childTools;
|
||||
const firstTool = tools[Object.keys(tools)[0]];
|
||||
const measurementTypeId = firstTool.id;
|
||||
|
||||
const collection = measurementApi.tools[measurementTypeId];
|
||||
const sorting = {
|
||||
sort: {
|
||||
measurementNumber: -1
|
||||
}
|
||||
};
|
||||
|
||||
const data = collection.find({}, sorting).fetch();
|
||||
|
||||
const current = timepointApi.current();
|
||||
if (!current) {
|
||||
return;
|
||||
}
|
||||
|
||||
let timepoints = [current];
|
||||
const prior = timepointApi.prior();
|
||||
if (prior) {
|
||||
timepoints.push(prior);
|
||||
}
|
||||
|
||||
// TODO: Clean this up, it's probably an inefficient way to get what we need
|
||||
const groupObject = _.groupBy(data, m => m.measurementNumber);
|
||||
|
||||
// Reformat the data
|
||||
const rows = Object.keys(groupObject).map(key => ({
|
||||
measurementTypeId: measurementTypeId,
|
||||
measurementNumber: key,
|
||||
entries: groupObject[key]
|
||||
}));
|
||||
|
||||
const rowItem = rows[0];
|
||||
|
||||
// Activate the first lesion
|
||||
if (rowItem) {
|
||||
OHIF.measurements.jumpToRowItem(rowItem, timepoints);
|
||||
}
|
||||
|
||||
firstMeasurementActivated = true;
|
||||
});
|
||||
|
||||
instance.measurementModifiedHandler = _.throttle((event, instance) => {
|
||||
OHIF.measurements.MeasurementHandlers.onModified(event, instance);
|
||||
}, 300);
|
||||
});
|
||||
|
||||
/**
|
||||
* Sets sidebar configuration and active tool based on viewer template instance
|
||||
* @param {Object} instance Template instance for viewer template
|
||||
*/
|
||||
const setActiveToolAndSidebar = () => {
|
||||
const instance = Template.instance();
|
||||
const { studies, currentTimepointId, measurementApi, timepointIds } = instance.data;
|
||||
|
||||
// Default actions for Associated Studies
|
||||
if (currentTimepointId) {
|
||||
// Follow-up studies: same as the first measurement in the table
|
||||
// Baseline studies: target-tool
|
||||
if (studies[0]) {
|
||||
let activeTool;
|
||||
// In follow-ups, get the baseline timepointId
|
||||
const timepointId = timepointIds.find(id => id !== currentTimepointId);
|
||||
|
||||
// Follow-up studies
|
||||
if (studies[0].timepointType === 'followup' && timepointId) {
|
||||
const measurementTools = OHIF.measurements.MeasurementApi.getConfiguration().measurementTools;
|
||||
|
||||
// Create list of measurement tools
|
||||
const measurementTypes = measurementTools.map(
|
||||
tool => {
|
||||
const { id, cornerstoneToolType } = tool;
|
||||
return {
|
||||
id,
|
||||
cornerstoneToolType
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
// Iterate over each measurement tool to find the first baseline
|
||||
// measurement. If so, stops the loop and prevent fetching from all
|
||||
// collections
|
||||
measurementTypes.every(({ id, cornerstoneToolType }) => {
|
||||
// Get measurement
|
||||
if (measurementApi[id]) {
|
||||
const measurement = measurementApi[id].findOne({ timepointId });
|
||||
|
||||
// Found a measurement, save tool and stop loop
|
||||
if (measurement) {
|
||||
const isArray = Array.isArray(cornerstoneToolType);
|
||||
activeTool = isArray ? cornerstoneToolType[0] : cornerstoneToolType;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
// If not set, for associated studies default is target-tool
|
||||
OHIF.viewerbase.toolManager.setActiveTool(activeTool || 'bidirectional');
|
||||
}
|
||||
|
||||
// Toggle Measurement Table
|
||||
if (instance.state) {
|
||||
instance.state.set('rightSidebar', 'measurements');
|
||||
}
|
||||
}
|
||||
// Hide as default for single study
|
||||
else {
|
||||
if (instance.state) {
|
||||
instance.state.set('rightSidebar', null);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Inits OHIF Hanging Protocol's onReady.
|
||||
* It waits for OHIF Hanging Protocol to be ready to instantiate the ProtocolEngine
|
||||
* Hanging Protocol will use OHIF LayoutManager to render viewports properly
|
||||
*/
|
||||
|
||||
const initHangingProtocol = () => {
|
||||
// When Hanging Protocol is ready
|
||||
HP.ProtocolStore.onReady(() => {
|
||||
|
||||
setActiveToolAndSidebar();
|
||||
|
||||
// Gets all StudyMetadata objects: necessary for Hanging Protocol to access study metadata
|
||||
const studyMetadataList = OHIF.viewer.StudyMetadataList.all();
|
||||
|
||||
// Caches Layout Manager: Hanging Protocol uses it for layout management according to current protocol
|
||||
const layoutManager = OHIF.viewerbase.layoutManager;
|
||||
|
||||
// Instantiate StudyMetadataSource: necessary for Hanging Protocol to get study metadata
|
||||
const studyMetadataSource = new OHIF.studies.classes.OHIFStudyMetadataSource();
|
||||
|
||||
// Creates Protocol Engine object with required arguments
|
||||
const ProtocolEngine = new HP.ProtocolEngine(layoutManager, studyMetadataList, [], studyMetadataSource);
|
||||
|
||||
// Sets up Hanging Protocol engine
|
||||
HP.setEngine(ProtocolEngine);
|
||||
|
||||
Session.set('ViewerReady', true);
|
||||
|
||||
Session.set('activeViewport', 0);
|
||||
});
|
||||
};
|
||||
|
||||
Template.viewer.onRendered(function() {
|
||||
this.autorun(() => {
|
||||
// To make sure ohif viewerMain is rendered before initializing Hanging Protocols
|
||||
const isOHIFViewerMainRendered = Session.get('OHIFViewerMainRendered');
|
||||
|
||||
// To avoid first run
|
||||
if (isOHIFViewerMainRendered) {
|
||||
// To run only when ViewerMainRendered dependency has changed.
|
||||
// because initHangingProtocol can have other reactive components
|
||||
Tracker.nonreactive(initHangingProtocol);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Template.viewer.helpers({
|
||||
dataSourcesReady() {
|
||||
// TODO: Find a better way to do this
|
||||
const ready = Session.get('TimepointsReady') && Session.get('MeasurementsReady');
|
||||
OHIF.log.info('dataSourcesReady? : ' + ready);
|
||||
return ready;
|
||||
},
|
||||
|
||||
state() {
|
||||
return Template.instance().state;
|
||||
}
|
||||
});
|
||||
|
||||
Template.viewer.events({
|
||||
'cornerstonetoolsmeasurementadded .imageViewerViewport'(event, instance) {
|
||||
const originalEvent = event.originalEvent;
|
||||
OHIF.measurements.MeasurementHandlers.onAdded(originalEvent, instance);
|
||||
},
|
||||
|
||||
'cornerstonetoolsmeasurementmodified .imageViewerViewport'(event, instance) {
|
||||
const originalEvent = event.originalEvent;
|
||||
instance.measurementModifiedHandler(originalEvent, instance);
|
||||
},
|
||||
|
||||
'cornerstonemeasurementremoved .imageViewerViewport'(event, instance) {
|
||||
const originalEvent = event.originalEvent;
|
||||
OHIF.measurements.MeasurementHandlers.onRemoved(originalEvent, instance);
|
||||
}
|
||||
});
|
||||
|
||||
Template.viewer.onDestroyed(() => {
|
||||
Session.set('ViewerMainReady', false);
|
||||
Session.set('TimepointsReady', false);
|
||||
Session.set('MeasurementsReady', false);
|
||||
|
||||
OHIF.viewer.stackImagePositionOffsetSynchronizer.deactivate();
|
||||
});
|
||||
@@ -0,0 +1,50 @@
|
||||
@import "{ohif:design}/app"
|
||||
|
||||
#viewer
|
||||
background-color: black
|
||||
height: 100%
|
||||
width: 100%
|
||||
|
||||
#imageViewerViewports
|
||||
.viewportContainer
|
||||
border: none !important
|
||||
outline: 0 !important // Prevent blue outline in Chrome
|
||||
position: relative
|
||||
|
||||
&:hover
|
||||
&.active
|
||||
&:hover.active
|
||||
border: none !important
|
||||
outline: 0 !important // Prevent blue outline in Chrome
|
||||
|
||||
.imageViewerViewport
|
||||
theme('border-bottom', '%s solid $uiBorderColor' % $uiBorderThickness)
|
||||
|
||||
canvas
|
||||
border-color: transparent
|
||||
border-style: solid
|
||||
border-width: 1px
|
||||
|
||||
&:not(:last-child)
|
||||
.imageViewerViewport
|
||||
theme('border-right', '%s solid $uiBorderColor' % $uiBorderThickness)
|
||||
|
||||
&:first-child
|
||||
.imageViewerViewport
|
||||
theme('border-left', '%s solid $uiBorderColor' % $uiBorderThickness)
|
||||
|
||||
&.active
|
||||
.imageViewerViewport
|
||||
border-right: none !important
|
||||
|
||||
canvas
|
||||
theme('border-color', '$uiBorderColorActive')
|
||||
|
||||
|
||||
.sidebar-left-open
|
||||
#imageViewerViewports
|
||||
.viewportContainer
|
||||
&:first-child
|
||||
.removable
|
||||
.imageViewerViewport
|
||||
border-left: none
|
||||
@@ -0,0 +1,21 @@
|
||||
<template name="viewerSection">
|
||||
<div class="viewerSection">
|
||||
<div class="sidebarMenu sidebar-left {{#if leftSidebarOpen}}sidebar-open{{/if}}">
|
||||
{{#if isTimepointBrowser}}
|
||||
{{>timepointBrowserSidebar (clone this)}}
|
||||
{{else}}
|
||||
{{#if instance.loading.get}}
|
||||
{{>loadingText}}
|
||||
{{else}}
|
||||
{{>studyBrowserSidebar (clone this studiesInformation=instance.studiesInformation.get)}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="mainContent {{#if leftSidebarOpen}}sidebar-left-open{{/if}} {{#if rightSidebarOpen}}sidebar-right-open{{/if}}">
|
||||
{{>viewerMain (clone this)}}
|
||||
</div>
|
||||
<div class="sidebarMenu sidebar-right {{#if rightSidebarOpen}}sidebar-open{{/if}}">
|
||||
{{>measurementTable (clone this)}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,72 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { $ } from 'meteor/jquery';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
Template.viewerSection.onCreated(() => {
|
||||
const instance = Template.instance();
|
||||
|
||||
instance.isTimepointBrowser = () => !!OHIF.viewer.data.currentTimepointId;
|
||||
|
||||
OHIF.viewer.quickSwitchStudyBrowserTemplate = 'timepointBrowserQuickSwitch';
|
||||
if (!instance.isTimepointBrowser()) {
|
||||
OHIF.viewer.quickSwitchStudyBrowserTemplate = 'studyBrowserQuickSwitch';
|
||||
instance.loading = new ReactiveVar(true);
|
||||
instance.studiesInformation = new ReactiveVar([]);
|
||||
const filter = { studyInstanceUid: OHIF.viewer.data.studyInstanceUids };
|
||||
OHIF.studies.searchStudies(filter).then(studiesData => {
|
||||
instance.loading.set(false);
|
||||
instance.studiesInformation.set(studiesData);
|
||||
}).catch(error => {
|
||||
instance.loading.set(false);
|
||||
const text = 'An error has occurred while retrieving studies information';
|
||||
OHIF.ui.notifications.danger({ text });
|
||||
OHIF.log.error(error);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Template.viewerSection.events({
|
||||
'transitionend .sidebarMenu'(event) {
|
||||
if (!event.target.classList.contains('sidebarMenu')) return;
|
||||
window.ResizeViewportManager.handleResize();
|
||||
},
|
||||
|
||||
'ohif.measurements.timepoint.changeViewType .timepoint-browser-list'(event, instance, viewType) {
|
||||
const $browserList = $(event.currentTarget);
|
||||
const $allBrowserItems = $browserList.find('.timepoint-browser-item');
|
||||
|
||||
// Removes all active classes to collapse the timepoints and studies
|
||||
$allBrowserItems.removeClass('active');
|
||||
|
||||
if (viewType === 'key') {
|
||||
const { timepointIds, currentTimepointId } = OHIF.viewer.data;
|
||||
timepointIds.forEach(timepointId => {
|
||||
const $browserItem = $allBrowserItems.filter(`[data-id=${timepointId}]`);
|
||||
$browserItem.find('.timepoint-item').trigger('ohif.measurements.timepoint.load');
|
||||
});
|
||||
|
||||
// Show only current timepoint expanded on key timepoints tab
|
||||
const $browserItem = $allBrowserItems.filter(`[data-id=${currentTimepointId}]`);
|
||||
$browserItem.find('.timepoint-item').trigger('click');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Template.viewerSection.helpers({
|
||||
leftSidebarOpen() {
|
||||
return Template.instance().data.state.get('leftSidebar');
|
||||
},
|
||||
|
||||
rightSidebarOpen() {
|
||||
return Template.instance().data.state.get('rightSidebar');
|
||||
},
|
||||
|
||||
isTimepointBrowser() {
|
||||
return Template.instance().isTimepointBrowser();
|
||||
},
|
||||
|
||||
studiesInformation() {
|
||||
return Template.instance().studiesInformation.get();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,81 @@
|
||||
@require '{ohif:design}/app'
|
||||
|
||||
.viewerSection
|
||||
display: flex
|
||||
flex: 1
|
||||
flex-flow: row nowrap
|
||||
align-items: stretch
|
||||
height: 'calc(100% - %s)' % ($toolbarHeight + $topBarHeight)
|
||||
width: 100%
|
||||
|
||||
.sidebarMenu
|
||||
height: 100%
|
||||
// required transformation to make inner fixed elements relative to this one
|
||||
transform(scale(1))
|
||||
transition($sidebarTransition)
|
||||
|
||||
.sidebar-option
|
||||
height: 100%
|
||||
max-width: inherit
|
||||
position: absolute
|
||||
transform(translateX(100%))
|
||||
transition($sidebarTransition)
|
||||
width: 100%
|
||||
|
||||
&.active
|
||||
transform(translateX(0%))
|
||||
|
||||
.sidebar-left
|
||||
theme('border-right', '%s solid $uiBorderColor' % $uiBorderThickness)
|
||||
flex: 1
|
||||
margin-left: - $studiesSidebarMenuWidth
|
||||
max-width: $studiesSidebarMenuWidth
|
||||
order: 1
|
||||
visibility: hidden
|
||||
|
||||
&.sidebar-open
|
||||
margin-left: 0
|
||||
visibility: visible
|
||||
|
||||
.loadingTextDiv
|
||||
theme('color', '$textSecondaryColor')
|
||||
font-size: 32px
|
||||
|
||||
.mainContent
|
||||
flex: 1
|
||||
height: 100%
|
||||
order: 2
|
||||
overflow: visible
|
||||
position: relative
|
||||
transition($sidebarTransition)
|
||||
width: 100%
|
||||
|
||||
.viewerMain
|
||||
left: 0
|
||||
position: absolute
|
||||
top: 0
|
||||
|
||||
.sidebar-right
|
||||
flex: 1
|
||||
margin-right: - $rightSidebarMenuWidth
|
||||
max-width: $rightSidebarMenuWidth
|
||||
order: 3
|
||||
position: relative
|
||||
visibility: hidden
|
||||
|
||||
&[data-timepoints="3"]
|
||||
margin-right: - ($rightSidebarMenuWidth + 135.5px)
|
||||
max-width: $rightSidebarMenuWidth + 135.5px
|
||||
|
||||
&[data-timepoints="4"]
|
||||
margin-right: - ($rightSidebarMenuWidth + 270px)
|
||||
max-width: $rightSidebarMenuWidth + 270px
|
||||
|
||||
&.sidebar-open
|
||||
margin-right: 0
|
||||
visibility: visible
|
||||
|
||||
.studiesListedChanger
|
||||
theme('border-bottom', '%s solid $uiBorderColor' % $uiBorderThickness)
|
||||
padding: 20px 10px
|
||||
text-align: center
|
||||
Reference in new issue
Block a user