Work towards study / series hover tools (LT-251)
This commit is contained in:
parent
0f7020a39f
commit
e1de7eaf21
@ -587,7 +587,7 @@ HP.ProtocolEngine = class ProtocolEngine {
|
|||||||
viewportData.push(currentViewportData);
|
viewportData.push(currentViewportData);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.LayoutManager.layoutTempleName = layoutTemplateName;
|
this.LayoutManager.layoutTemplateName = layoutTemplateName;
|
||||||
this.LayoutManager.layoutProps = layoutProps;
|
this.LayoutManager.layoutProps = layoutProps;
|
||||||
this.LayoutManager.viewportData = viewportData;
|
this.LayoutManager.viewportData = viewportData;
|
||||||
|
|
||||||
|
|||||||
@ -22,8 +22,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="studyHover js-hide-studies {{ #unless studiesOpen}}hidden{{/unless}}">
|
<div class="studyHover js-hide-studies {{ #unless studiesOpen}}hidden{{/unless}}">
|
||||||
|
{{>studyTimepointBrowser timepointViewType=timepointViewType}}
|
||||||
</div>
|
</div>
|
||||||
<div class="seriesHover js-hide-series {{ #unless seriesOpen }}tiny{{/unless}}">
|
<div class="seriesHover js-hide-series {{ #unless seriesOpen }}tiny{{/unless}}">
|
||||||
|
{{#each thumbnail in (thumbnails currentStudy)}}
|
||||||
|
{{>thumbnailEntry thumbnail}}
|
||||||
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
Template.studySeriesQuickSwitch.onCreated(function studySeriesQuickSwitchOnCreated() {
|
Template.studySeriesQuickSwitch.onCreated(function studySeriesQuickSwitchOnCreated() {
|
||||||
const instance = this;
|
const instance = this;
|
||||||
|
|
||||||
|
var viewportIndex = instance.data.viewportIndex;
|
||||||
|
|
||||||
instance.seriesOpen = new ReactiveVar(false);
|
instance.seriesOpen = new ReactiveVar(false);
|
||||||
instance.studiesOpen = new ReactiveVar(false);
|
instance.studiesOpen = new ReactiveVar(false);
|
||||||
|
|
||||||
|
instance.data.timepointViewType = new ReactiveVar();
|
||||||
|
instance.data.timepointViewType.set('key');
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.studySeriesQuickSwitch.events({
|
Template.studySeriesQuickSwitch.events({
|
||||||
@ -30,5 +35,58 @@ Template.studySeriesQuickSwitch.helpers({
|
|||||||
|
|
||||||
studiesOpen() {
|
studiesOpen() {
|
||||||
return Template.instance().studiesOpen.get();
|
return Template.instance().studiesOpen.get();
|
||||||
|
},
|
||||||
|
|
||||||
|
currentStudy() {
|
||||||
|
console.log('currentStudy');
|
||||||
|
var viewportIndex = Template.instance().data.viewportIndex;
|
||||||
|
Session.get('CornerstoneNewImage' + viewportIndex);
|
||||||
|
|
||||||
|
layoutManager = window.layoutManager;
|
||||||
|
if (!layoutManager) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var studyInstanceUid = layoutManager.viewportData[viewportIndex].studyInstanceUid;
|
||||||
|
var study = ViewerStudies.findOne({
|
||||||
|
studyInstanceUid: studyInstanceUid
|
||||||
|
});
|
||||||
|
|
||||||
|
return study;
|
||||||
|
},
|
||||||
|
|
||||||
|
currentTimepoint() {
|
||||||
|
console.log('currentStudy');
|
||||||
|
var viewportIndex = Template.instance().data.viewportIndex;
|
||||||
|
Session.get('CornerstoneNewImage' + viewportIndex);
|
||||||
|
|
||||||
|
layoutManager = window.layoutManager;
|
||||||
|
if (!layoutManager) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var studyInstanceUid = layoutManager.viewportData[viewportIndex].studyInstanceUid;
|
||||||
|
var study = ViewerStudies.findOne({
|
||||||
|
studyInstanceUid: studyInstanceUid
|
||||||
|
});
|
||||||
|
|
||||||
|
var timepoint = Timepoint.findOne({
|
||||||
|
timepointId: study.timepointId
|
||||||
|
});
|
||||||
|
|
||||||
|
return timepoint;
|
||||||
|
},
|
||||||
|
|
||||||
|
thumbnails: function(study) {
|
||||||
|
var stacks = createStacks(study);
|
||||||
|
|
||||||
|
var array = [];
|
||||||
|
stacks.forEach(function(stack, index) {
|
||||||
|
array.push({
|
||||||
|
thumbnailIndex: index,
|
||||||
|
stack: stack
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return array;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -49,7 +49,9 @@ $switchSize = 50px
|
|||||||
left: -350px
|
left: -350px
|
||||||
width: 400px
|
width: 400px
|
||||||
height: 500px
|
height: 500px
|
||||||
background: red
|
background: black
|
||||||
|
opacity: 0.8
|
||||||
|
border-radius: 5px
|
||||||
transition(all 0.3s ease)
|
transition(all 0.3s ease)
|
||||||
|
|
||||||
.seriesHover
|
.seriesHover
|
||||||
@ -59,10 +61,17 @@ $switchSize = 50px
|
|||||||
left: 50px
|
left: 50px
|
||||||
width: 700px
|
width: 700px
|
||||||
height: 900px
|
height: 900px
|
||||||
background: blue
|
background: black
|
||||||
|
opacity: 0.8
|
||||||
|
border-radius: 5px
|
||||||
transition(all 0.3s ease)
|
transition(all 0.3s ease)
|
||||||
|
|
||||||
&.tiny
|
&.tiny
|
||||||
width: 0
|
width: 0
|
||||||
height: 0
|
height: 0
|
||||||
opacity: 0
|
opacity: 0
|
||||||
|
|
||||||
|
.thumbnailEntry
|
||||||
|
margin: 0
|
||||||
|
width: 33%
|
||||||
|
display: inline-block
|
||||||
|
|||||||
@ -21,8 +21,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ >studySeriesQuickSwitch side="left"}}
|
{{ >studySeriesQuickSwitch side="left" viewportIndex=0}}
|
||||||
{{ >studySeriesQuickSwitch side="right"}}
|
{{ >studySeriesQuickSwitch side="right" viewportIndex=1}}
|
||||||
|
|
||||||
<div class="pull-right toolbarSectionEntry">
|
<div class="pull-right toolbarSectionEntry">
|
||||||
{{ >caseProgress }}
|
{{ >caseProgress }}
|
||||||
|
|||||||
@ -5,6 +5,6 @@ Template.viewerMain.onRendered(function() {
|
|||||||
var parentElement = instance.$("#layoutManagerTarget").get(0);
|
var parentElement = instance.$("#layoutManagerTarget").get(0);
|
||||||
window.layoutManager = new LayoutManager(parentElement, studies);
|
window.layoutManager = new LayoutManager(parentElement, studies);
|
||||||
|
|
||||||
ProtocolEngine = new HP.ProtocolEngine(layoutManager, studies);
|
ProtocolEngine = new HP.ProtocolEngine(window.layoutManager, studies);
|
||||||
HP.setEngine(ProtocolEngine);
|
HP.setEngine(ProtocolEngine);
|
||||||
});
|
});
|
||||||
@ -14,7 +14,7 @@ createStacks = function(study) {
|
|||||||
// Define an empty array of stacks
|
// Define an empty array of stacks
|
||||||
var stacks = [];
|
var stacks = [];
|
||||||
|
|
||||||
if (!study.seriesList) {
|
if (!study || !study.seriesList) {
|
||||||
return stacks;
|
return stacks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user