Switched studies in Session to ViewerStudies and WorklistStudies Collections. Fixes studyDate selector issues

This commit is contained in:
Erik Ziegler committed 2015-11-17 18:17:51 +01:00
1 parent aa7982b11b
commit 1511642000
17 files changed
+82 -78

No files matched your search

@@ -1,6 +1,10 @@
Template.imageThumbnail.onRendered(function() {
var instance = this.data.stack.instances[0];
var element = this.find('.imageThumbnail');
cornerstone.disable(element);
$(element).find('canvas').remove();
cornerstone.enable(element);
var imageId = getImageId(instance);
@@ -1,15 +1,5 @@
Template.studyBrowser.helpers({
studies : function() {
var studies = Session.get('studies');
console.log(studies);
var array = [];
studies.forEach(function(study, index) {
array.push({
studyIndex: index,
study: study
});
});
return array;
}
studies : function() {
return ViewerStudies.find({selected: true});
}
});
@@ -190,6 +190,7 @@ function thumbnailDragEndHandler(e, target) {
}
Template.thumbnailEntry.onRendered(function() {
console.log(this.data);
var entry = this.find('.thumbnailEntry');
$(entry).data('seriesInstanceUid', Template.parentData(0).seriesInstanceUid);
$(entry).data('studyInstanceUid', Template.parentData(1).studyInstanceUid);
@@ -1,12 +1,12 @@
Template.thumbnails.helpers({
thumbnails: function() {
var stacks = createStacks(this.study);
var studyIndex = this.studyIndex;
var study = this;
var stacks = createStacks(study);
var array = [];
stacks.forEach(function(stack, index) {
array.push({
thumbnailIndex: index * (studyIndex + 1),
thumbnailIndex: index,
stack: stack
});
});