LT-275: Retrieving timepoint associations properly from backend

This commit is contained in:
Erik Ziegler committed 2016-11-15 08:24:30 +01:00
1 parent 2d291251e9
commit 60b72683d5
9 files changed
+42 -22

No files matched your search

@@ -12,9 +12,6 @@ Template.imageThumbnail.onRendered(() => {
// Disable cornerstone for thumbnail element and remove its canvas
cornerstone.disable(element);
// Enable cornerstone for thumbnail element again creating a new canvas
cornerstone.enable(element);
// Get the image ID
const stack = instance.data.thumbnail.stack;
const thumbnailIndex = instance.data.thumbnail.thumbnailIndex;
@@ -29,6 +26,9 @@ Template.imageThumbnail.onRendered(() => {
// Define a handler for success on image load
const loadSuccess = image => {
// Enable cornerstone for thumbnail element again creating a new canvas
cornerstone.enable(element);
cornerstone.displayImage(element, image);
delete ThumbnailLoading[thumbnailIndex];
$loading.css('display', 'none');
@@ -52,7 +52,7 @@ Template.imageThumbnail.onRendered(() => {
instance.data.currentStudy.dep.depend();
}
// Wait for the new data and reresh the image thumbnail
// Wait for the new data and refresh the image thumbnail
Tracker.afterFlush(() => {
instance.refreshImage();
});
@@ -13,14 +13,20 @@ Template.studySeriesQuickSwitch.onCreated(() => {
// Gets the current viewport data
const viewportIndex = instance.data.viewportIndex;
const viewportData = instance.getViewportData(viewportIndex);
if (!viewportData) {
return;
let study;
if (viewportData) {
// Finds the current study and return it
study = ViewerStudies.findOne({
studyInstanceUid: viewportData.studyInstanceUid
});
} else {
study = ViewerStudies.findOne();
}
// Finds the current study and return it
const study = ViewerStudies.findOne({
studyInstanceUid: viewportData.studyInstanceUid
});
if (!study) {
return;
}
// Change the current study to update the thumbnails
instance.data.currentStudy.set(study);
@@ -1,3 +1,5 @@
import { Template } from 'meteor/templating';
Template.studyTimepoint.onCreated(() => {
const instance = Template.instance();
@@ -1,3 +1,5 @@
import { Template } from 'meteor/templating';
Template.studyTimepointBrowser.onCreated(() => {
const instance = Template.instance();