First pass at a Hanging Protocol implementation and editor (LT-131)
This commit is contained in:
1 parent
dfcb33153f
commit
2e52d9e3c1
157 files changed
+8869
-23585
No files matched your search
@@ -0,0 +1,38 @@
|
||||
Template.gridLayout.helpers({
|
||||
height: function() {
|
||||
var rows = this.rows || 1;
|
||||
return 100 / rows;
|
||||
},
|
||||
width: function() {
|
||||
var columns = this.columns || 1;
|
||||
return 100 / columns;
|
||||
},
|
||||
viewports: function() {
|
||||
var numViewports = this.rows * this.columns;
|
||||
var viewportData = this.viewportData;
|
||||
var numViewportsWithData = this.viewportData.length;
|
||||
|
||||
if (numViewportsWithData < numViewports) {
|
||||
var difference = numViewports - numViewportsWithData;
|
||||
for (var i = 0; i < difference; i++) {
|
||||
viewportData.push({
|
||||
viewportIndex: numViewportsWithData + i + 1,
|
||||
rows: this.rows,
|
||||
columns: this.columns
|
||||
});
|
||||
}
|
||||
} else if (numViewportsWithData > numViewports) {
|
||||
return viewportData.slice(0, numViewports);
|
||||
}
|
||||
|
||||
return viewportData;
|
||||
}
|
||||
});
|
||||
|
||||
Template.gridLayout.onRendered(function() {
|
||||
OHIF.viewer.updateImageSynchronizer = new cornerstoneTools.Synchronizer('CornerstoneNewImage', cornerstoneTools.updateImageSynchronizer);
|
||||
});
|
||||
|
||||
Template.gridLayout.onDestroyed(function() {
|
||||
OHIF.viewer.updateImageSynchronizer.destroy();
|
||||
});
|
||||
Reference in new issue
Block a user