LT-301: Addeing Stack Scroll, Reset, Rotate, Flip H, Flip V, Invert, Magnify, Elliptical ROI, Clear and Toggle CINE dialog buttons to More Tools panel

This commit is contained in:
Eloízio Salgado authored and Erik Ziegler committed 2016-11-15 08:29:46 +01:00
1 parent 5d02b76453
commit c004aee40f
10 files changed
+179 -6

No files matched your search

@@ -198,6 +198,44 @@ hasMultipleFrames = () => {
return true;
}
if(clipState) {
// Return true if the clip is playing
return !_.isUndefined(clipState.intervalId);
}
return false;
};
// Check if a study has multiple frames
hasMultipleFrames = () => {
// Its called everytime active viewport and/or layout change
Session.get('activeViewport');
Session.get('LayoutManagerUpdated');
const activeViewport = getActiveViewportElement();
// No active viewport yet: disable button
if(!activeViewport) {
return true;
}
// Get images in the stack
const stackToolData = cornerstoneTools.getToolState(activeViewport, 'stack');
// No images in the stack, so disable button
if (!stackToolData || !stackToolData.data || !stackToolData.data.length) {
return true;
}
// Get number of images in the stack
const stackData = stackToolData.data[0];
const nImages = stackData.imageIds && stackData.imageIds.length ? stackData.imageIds.length : 1;
// Stack has just one image, so disable button
if(nImages === 1) {
return true;
}
return false;
};