ohif-viewer/Packages/ohif-viewerbase/lib/switchToImageRelative.js
Erik Ziegler ab4d4c9008 Work on refactoring measurements out of Lesion Tracker package
- Removed AssociatedStudies Collection
- Measurement API is generated from configuration files
- Data exchange methods are defined in configuration
2016-11-15 08:21:46 +01:00

14 lines
503 B
JavaScript

/**
* This function switches to an image given an element and
* the relative distance from the current image in the stack
*
* e.g. switchToImageRelative(element, -1) to switch to currentImageIdIndex - 1
*
* @param element
* @param {number} [distanceFromCurrentIndex] The image index in the stack to switch to.
*/
switchToImageRelative = function(distanceFromCurrentIndex) {
var element = getActiveViewportElement();
cornerstoneTools.scroll(element, distanceFromCurrentIndex);
};