Work towards study / series hover tools (LT-251)
This commit is contained in:
1 parent
0f7020a39f
commit
e1de7eaf21
7 files changed
+80
-9
No files matched your search
+4
@@ -22,8 +22,12 @@
|
||||
</div>
|
||||
|
||||
<div class="studyHover js-hide-studies {{ #unless studiesOpen}}hidden{{/unless}}">
|
||||
{{>studyTimepointBrowser timepointViewType=timepointViewType}}
|
||||
</div>
|
||||
<div class="seriesHover js-hide-series {{ #unless seriesOpen }}tiny{{/unless}}">
|
||||
{{#each thumbnail in (thumbnails currentStudy)}}
|
||||
{{>thumbnailEntry thumbnail}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
+59
-1
@@ -1,8 +1,13 @@
|
||||
Template.studySeriesQuickSwitch.onCreated(function studySeriesQuickSwitchOnCreated() {
|
||||
const instance = this;
|
||||
|
||||
var viewportIndex = instance.data.viewportIndex;
|
||||
|
||||
instance.seriesOpen = new ReactiveVar(false);
|
||||
instance.studiesOpen = new ReactiveVar(false);
|
||||
|
||||
instance.data.timepointViewType = new ReactiveVar();
|
||||
instance.data.timepointViewType.set('key');
|
||||
});
|
||||
|
||||
Template.studySeriesQuickSwitch.events({
|
||||
@@ -30,5 +35,58 @@ Template.studySeriesQuickSwitch.helpers({
|
||||
|
||||
studiesOpen() {
|
||||
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;
|
||||
}
|
||||
});
|
||||
});
|
||||
+11
-2
@@ -49,7 +49,9 @@ $switchSize = 50px
|
||||
left: -350px
|
||||
width: 400px
|
||||
height: 500px
|
||||
background: red
|
||||
background: black
|
||||
opacity: 0.8
|
||||
border-radius: 5px
|
||||
transition(all 0.3s ease)
|
||||
|
||||
.seriesHover
|
||||
@@ -59,10 +61,17 @@ $switchSize = 50px
|
||||
left: 50px
|
||||
width: 700px
|
||||
height: 900px
|
||||
background: blue
|
||||
background: black
|
||||
opacity: 0.8
|
||||
border-radius: 5px
|
||||
transition(all 0.3s ease)
|
||||
|
||||
&.tiny
|
||||
width: 0
|
||||
height: 0
|
||||
opacity: 0
|
||||
|
||||
.thumbnailEntry
|
||||
margin: 0
|
||||
width: 33%
|
||||
display: inline-block
|
||||
Reference in new issue
Block a user