Add Next/Previous Hanging Protcol stage buttons (only works with MG for now)
This commit is contained in:
1 parent
bfe6b80e27
commit
487ebf9541
13 files changed
+147
-6
No files matched your search
@@ -186,6 +186,7 @@ function thumbnailDragEndHandler(e, target) {
|
||||
|
||||
// Rerender the viewport using the drag and drop data
|
||||
rerenderViewportWithNewSeries(element, OHIF.viewer.dragAndDropData);
|
||||
Session.get('UseHangingProtocol', false);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<template name="hangingProtocolButtons">
|
||||
<button id="previousPresentationGroup" type="button"
|
||||
class="imageViewerCommand btn btn-sm btn-default"
|
||||
data-container="body"
|
||||
data-toggle="tooltip"
|
||||
data-placement="bottom"
|
||||
title="Previous presentation group"
|
||||
disabled="{{ #unless isPreviousAvailable }} true {{ /unless }}">
|
||||
<span class="fa fa-step-backward"></span>
|
||||
</button>
|
||||
<button id="nextPresentationGroup" type="button"
|
||||
class="imageViewerCommand btn btn-sm btn-default"
|
||||
data-container="body"
|
||||
data-toggle="tooltip"
|
||||
data-placement="bottom"
|
||||
title="Next presentation group"
|
||||
disabled="{{ #unless isNextAvailable }} true {{ /unless }}">
|
||||
<span class="fa fa-step-forward"></span>
|
||||
</button>
|
||||
</template>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
Template.hangingProtocolButtons.helpers({
|
||||
'isNextAvailable': function() {
|
||||
var presentationGroup = Session.get('WindowManagerPresentationGroup');
|
||||
var numPresentationGroups = WindowManager.getNumPresentationGroups();
|
||||
return presentationGroup < numPresentationGroups;
|
||||
},
|
||||
'isPreviousAvailable': function() {
|
||||
var presentationGroup = Session.get('WindowManagerPresentationGroup');
|
||||
return presentationGroup > 1;
|
||||
}
|
||||
});
|
||||
@@ -41,7 +41,11 @@ Template.imageViewerViewports.helpers({
|
||||
viewportRows: viewportRows
|
||||
};
|
||||
|
||||
inputData.DisplaySetPresentationGroup = Session.get('WindowManagerPresentationGroup');
|
||||
var hangingProtocolViewportData = WindowManager.getHangingProtocol(inputData);
|
||||
if (Session.get('UseHangingProtocol')) {
|
||||
viewportData = hangingProtocolViewportData;
|
||||
}
|
||||
|
||||
var numViewports = viewportRows * viewportColumns;
|
||||
for (var i=0; i < numViewports; ++i) {
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
{{ #if includeLayoutButton }}
|
||||
{{ >layoutButton }}
|
||||
{{ /if }}
|
||||
|
||||
{{ #if includeHangingProtocolButtons }}
|
||||
{{ >hangingProtocolButtons }}
|
||||
{{ /if }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -152,5 +152,11 @@ Template.toolbar.helpers({
|
||||
return this.toolbarOptions.includeLayoutButton;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
'includeHangingProtocolButtons': function() {
|
||||
if (this.toolbarOptions && this.toolbarOptions.includeHangingProtocolButtons !== undefined) {
|
||||
return this.toolbarOptions.includeHangingProtocolButtons;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user