PWV-3: Creating ohif:log package and partially refactoring ohif:measurements
This commit is contained in:
1 parent
f3f32518c6
commit
60aa1d0982
76 files changed
+410
-479
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
applyWLPreset = function(presetName, element) {
|
||||
log.info("Applying WL Preset: " + presetName);
|
||||
OHIF.log.info("Applying WL Preset: " + presetName);
|
||||
var viewport = cornerstone.getViewport(element);
|
||||
|
||||
if (presetName === 'Default') {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
* @param element {node} DOM Node representing the viewport element
|
||||
*/
|
||||
displayReferenceLines = element => {
|
||||
log.info("imageViewerViewport displayReferenceLines");
|
||||
OHIF.log.info("imageViewerViewport displayReferenceLines");
|
||||
|
||||
// Check if image plane (orientation / loction) data is present for the current image
|
||||
const enabledElement = cornerstone.getEnabledElement(element);
|
||||
|
||||
@@ -214,7 +214,7 @@ Meteor.startup(function() {
|
||||
$.fn.reverse = [].reverse;
|
||||
|
||||
function previousActivePanel() {
|
||||
log.info('nextActivePanel');
|
||||
OHIF.log.info('nextActivePanel');
|
||||
var currentIndex = Session.get('activeViewport');
|
||||
currentIndex--;
|
||||
|
||||
@@ -233,7 +233,7 @@ function previousActivePanel() {
|
||||
}
|
||||
|
||||
function nextActivePanel() {
|
||||
log.info('nextActivePanel');
|
||||
OHIF.log.info('nextActivePanel');
|
||||
var currentIndex = Session.get('activeViewport');
|
||||
currentIndex++;
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
/**
|
||||
* This function enables stack prefetching for a specified element (viewport)
|
||||
* It first disables any prefetching currently occurring on any other viewports.
|
||||
@@ -5,7 +7,7 @@
|
||||
* @param element {node} DOM Node representing the viewport element
|
||||
*/
|
||||
enablePrefetchOnElement = function(element) {
|
||||
log.info("imageViewerViewport enablePrefetchOnElement");
|
||||
OHIF.log.info("imageViewerViewport enablePrefetchOnElement");
|
||||
|
||||
// Loop through all viewports and disable stackPrefetch
|
||||
$('.imageViewerViewport').each(function() {
|
||||
@@ -20,4 +22,4 @@ enablePrefetchOnElement = function(element) {
|
||||
if (stack && stack.data.length && stack.data[0].imageIds.length > 1) {
|
||||
cornerstoneTools.stackPrefetch.enable(element);
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -1,3 +1,5 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
/**
|
||||
* Obtain an imageId for Cornerstone based on the WADO-RS scheme
|
||||
*
|
||||
@@ -55,6 +57,6 @@ getWADORSImageId = function(instance) {
|
||||
|
||||
var imageId = cornerstoneWADOImageLoader.imageManager.add(image);
|
||||
|
||||
log.info('WADO-RS ImageID: ' + imageId);
|
||||
OHIF.log.info('WADO-RS ImageID: ' + imageId);
|
||||
return imageId;
|
||||
};
|
||||
@@ -3,7 +3,7 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
// Displays Series in Viewports given a Protocol and list of Studies
|
||||
LayoutManager = class LayoutManager {
|
||||
constructor(parentNode, studies) {
|
||||
log.info('LayoutManager');
|
||||
OHIF.log.info('LayoutManager');
|
||||
|
||||
this.parentNode = parentNode;
|
||||
this.studies = studies;
|
||||
@@ -99,7 +99,7 @@ LayoutManager = class LayoutManager {
|
||||
}
|
||||
|
||||
updateViewports() {
|
||||
log.info('updateViewports');
|
||||
OHIF.log.info('updateViewports');
|
||||
|
||||
if (!this.viewportData ||
|
||||
!this.viewportData.length ||
|
||||
@@ -176,7 +176,7 @@ LayoutManager = class LayoutManager {
|
||||
}
|
||||
|
||||
enlargeViewport(viewportIndex) {
|
||||
log.info('Zooming Into Viewport: ' + viewportIndex);
|
||||
OHIF.log.info('Zooming Into Viewport: ' + viewportIndex);
|
||||
|
||||
if (!this.viewportData ||
|
||||
!this.viewportData.length) {
|
||||
|
||||
Reference in new issue
Block a user