Updated lesionTable to store measurement ID. Worked on refactoring functions in lesionTable.js to allow loading of series from a click on a row
This commit is contained in:
1 parent
a3c0048490
commit
9ad2ccaaaf
11 files changed
+254
-259
No files matched your search
@@ -199,9 +199,10 @@ Template.thumbnailEntry.onRendered(function() {
|
||||
Template.thumbnailEntry.events({
|
||||
// Touch drag/drop events
|
||||
'touchstart .thumbnailEntry, mousedown .thumbnailEntry': function(e) {
|
||||
var data = Template.parentData(2);
|
||||
data.studyInstanceUid = this.stack.studyInstanceUid;
|
||||
data.seriesInstanceUid = this.stack.seriesInstanceUid;
|
||||
var data = {
|
||||
studyInstanceUid: this.stack.studyInstanceUid,
|
||||
seriesInstanceUid: this.stack.seriesInstanceUid
|
||||
};
|
||||
thumbnailDragStartHandler(e, data);
|
||||
},
|
||||
'touchmove .thumbnailEntry': function(e) {
|
||||
|
||||
@@ -146,16 +146,6 @@ function loadSeriesIntoViewport(data) {
|
||||
|
||||
// Start loading the image.
|
||||
cornerstone.loadAndCacheImage(imageId).then(function(image) {
|
||||
// Fire an event to give notice that a new series was loaded in the viewport
|
||||
var eventType = "ViewerBaseSeriesLoaded";
|
||||
var eventData = {
|
||||
element: element,
|
||||
stack: stack,
|
||||
study: data.study,
|
||||
series: data.series
|
||||
};
|
||||
$(document).trigger(eventType, eventData);
|
||||
|
||||
// If there is a saved object containing Cornerstone viewport data
|
||||
// (e.g. scale, invert, window settings) in the input data, apply it now.
|
||||
//
|
||||
@@ -311,6 +301,11 @@ function loadSeriesIntoViewport(data) {
|
||||
if (viewportIndex === Session.get('activeViewport')) {
|
||||
enablePrefetchOnElement(element);
|
||||
}
|
||||
|
||||
// Run any renderedCallback that exists in the data context
|
||||
if (data.renderedCallback && typeof data.renderedCallback === "function") {
|
||||
data.renderedCallback(element);
|
||||
}
|
||||
}, function(error) {
|
||||
// If something goes wrong while loading the image, fire the error handler.
|
||||
errorLoadingHandler(element, imageId, error);
|
||||
@@ -392,7 +387,7 @@ Template.imageViewerViewport.onRendered(function() {
|
||||
|
||||
// If no seriesInstanceUid or studyInstanceUid were supplied, display the drag/drop
|
||||
// instructions and then stop here since we don't know what to display in the viewport.
|
||||
if (this.data.seriesInstanceUid === undefined || this.data.studyInstanceUid === undefined) {
|
||||
if (!this.data.seriesInstanceUid || !this.data.studyInstanceUid) {
|
||||
element.classList.add('empty');
|
||||
$(element).siblings('.imageViewerLoadingIndicator').css('display', 'none');
|
||||
$(element).siblings('.viewportInstructions').show();
|
||||
|
||||
Reference in new issue
Block a user