Fixes for LT-29, disable target measurements when pixel spacing is not available
This commit is contained in:
parent
831e546cd5
commit
b01a2cccee
@ -1,3 +1,5 @@
|
|||||||
|
Session.setDefault('activeViewport', false);
|
||||||
|
|
||||||
Template.viewer.onCreated(function() {
|
Template.viewer.onCreated(function() {
|
||||||
// Attach the Window resize listener
|
// Attach the Window resize listener
|
||||||
$(window).on('resize', handleResize);
|
$(window).on('resize', handleResize);
|
||||||
@ -92,7 +94,10 @@ Template.viewer.onCreated(function() {
|
|||||||
Session.set('ViewerData', ViewerData);
|
Session.set('ViewerData', ViewerData);
|
||||||
}
|
}
|
||||||
|
|
||||||
Session.set('activeViewport', ViewerData[contentId].activeViewport || 0);
|
Session.set('activeViewport', ViewerData[contentId].activeViewport || false);
|
||||||
|
|
||||||
|
// Set lesion tool buttons as disabled if pixel spacing is not available for active element
|
||||||
|
this.autorun(pixelSpacingAutorunCheck);
|
||||||
|
|
||||||
// Update the ViewerStudies collection with the loaded studies
|
// Update the ViewerStudies collection with the loaded studies
|
||||||
ViewerStudies = new Meteor.Collection(null);
|
ViewerStudies = new Meteor.Collection(null);
|
||||||
@ -218,9 +223,6 @@ Template.viewer.onCreated(function() {
|
|||||||
Template.viewer.onRendered(function() {
|
Template.viewer.onRendered(function() {
|
||||||
// Enable hotkeys
|
// Enable hotkeys
|
||||||
enableHotkeys();
|
enableHotkeys();
|
||||||
|
|
||||||
// Set lesion tool buttons as disabled if pixel spacing is not available for active element
|
|
||||||
this.autorun(pixelSpacingAutorunCheck);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.viewer.onDestroyed(function() {
|
Template.viewer.onDestroyed(function() {
|
||||||
|
|||||||
@ -37,6 +37,11 @@
|
|||||||
function addNewMeasurement(mouseEventData) {
|
function addNewMeasurement(mouseEventData) {
|
||||||
var element = mouseEventData.element;
|
var element = mouseEventData.element;
|
||||||
|
|
||||||
|
// LT-29 Disable Target Measurements when pixel spacing is not available
|
||||||
|
if (!mouseEventData.image.rowPixelSpacing || !mouseEventData.image.columnPixelSpacing) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
function doneCallback(lesionNumber) {
|
function doneCallback(lesionNumber) {
|
||||||
measurementData.lesionNumber = lesionNumber;
|
measurementData.lesionNumber = lesionNumber;
|
||||||
measurementData.active = false;
|
measurementData.active = false;
|
||||||
@ -108,6 +113,11 @@
|
|||||||
function addNewMeasurementTouch(touchEventData) {
|
function addNewMeasurementTouch(touchEventData) {
|
||||||
var element = touchEventData.element;
|
var element = touchEventData.element;
|
||||||
|
|
||||||
|
// LT-29 Disable Target Measurements when pixel spacing is not available
|
||||||
|
if (!touchEventData.image.rowPixelSpacing || !touchEventData.image.columnPixelSpacing) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
function doneCallback(lesionNumber) {
|
function doneCallback(lesionNumber) {
|
||||||
measurementData.lesionNumber = lesionNumber;
|
measurementData.lesionNumber = lesionNumber;
|
||||||
measurementData.active = false;
|
measurementData.active = false;
|
||||||
@ -949,6 +959,11 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LT-29 Disable Target Measurements when pixel spacing is not available
|
||||||
|
if (!eventData.image.rowPixelSpacing || !eventData.image.columnPixelSpacing) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// we have tool data for this element - iterate over each one and draw it
|
// we have tool data for this element - iterate over each one and draw it
|
||||||
var context = eventData.canvasContext.canvas.getContext('2d');
|
var context = eventData.canvasContext.canvas.getContext('2d');
|
||||||
context.setTransform(1, 0, 0, 1, 0, 0);
|
context.setTransform(1, 0, 0, 1, 0, 0);
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
pixelSpacingAutorunCheck = function() {
|
pixelSpacingAutorunCheck = function() {
|
||||||
log.info('lesionTool button change autorun');
|
log.info('lesionTool button change autorun');
|
||||||
/*if (!Session.get('ViewerData')) {
|
|
||||||
return;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// Get oncology tools
|
// Get oncology tools
|
||||||
var oncologyTools = $('button#lesion, button#nonTarget');
|
var oncologyTools = $('button#lesion, button#nonTarget');
|
||||||
@ -14,6 +11,10 @@ pixelSpacingAutorunCheck = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var element = $('.imageViewerViewport').get(activeViewportIndex);
|
var element = $('.imageViewerViewport').get(activeViewportIndex);
|
||||||
|
if (!element) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var enabledElement = cornerstone.getEnabledElement(element);
|
var enabledElement = cornerstone.getEnabledElement(element);
|
||||||
|
|
||||||
// Check value of rowPixelSpacing & columnPixelSpacing to define as unavailable
|
// Check value of rowPixelSpacing & columnPixelSpacing to define as unavailable
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user