Adapting Viewers to the new cornerstone structure

This commit is contained in:
Bruno Alves de Faria committed 2018-02-27 07:25:15 -03:00
1 parent 99b88f08b3
commit dc767e5c83
19 files changed
+82 -70

No files matched your search

@@ -144,7 +144,8 @@ function computeScaleBounds(eventData, canvasSize, imageSize, horizontalReductio
};
}
function onImageRendered(e, eventData) {
function onImageRendered(e) {
const eventData = e.detail;
// Check whether pixel spacing is defined
if (!eventData.image.rowPixelSpacing || !eventData.image.columnPixelSpacing) {
@@ -219,7 +220,7 @@ function onImageRendered(e, eventData) {
function disable(element) {
// TODO: displayTool does not have cornerstone.updateImage(element) method to hide tool
$(element).off('CornerstoneImageRendered', onImageRendered);
$(element).off('cornerstoneimagerendered', onImageRendered);
cornerstone.updateImage(element);
}