-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from aleksandra-tarkowska/feature/big_image_roi
Feature/big image roi
- Loading branch information
Showing
17 changed files
with
792 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+3.87 KB
components/tools/OmeroWeb/omeroweb/webgateway/media/img/arrowDown_grey.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.87 KB
components/tools/OmeroWeb/omeroweb/webgateway/media/img/arrowRight_grey.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.16 KB
components/tools/OmeroWeb/omeroweb/webgateway/media/img/ellipse16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.16 KB
components/tools/OmeroWeb/omeroweb/webgateway/media/img/polygon16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.16 KB
components/tools/OmeroWeb/omeroweb/webgateway/media/img/rectangle16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions
77
components/tools/OmeroWeb/omeroweb/webgateway/media/js/3rdparty/panojs/control_roi.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
PanoJS.CONTROL_ROI_STYLE = "position: absolute;"; | ||
|
||
function ROIControl(viewer) { | ||
this.viewer = viewer; | ||
this.createDOMElements(); | ||
|
||
this.scale = 1; | ||
this.x = 0; | ||
this.y = 0; | ||
this.width = 0; | ||
this.height = 0; | ||
|
||
this.viewer.addViewerMovedListener(this); | ||
this.viewer.addViewerZoomedListener(this); | ||
this.viewer.addViewerResizedListener(this); | ||
|
||
// load thumbnail image | ||
this.init(); | ||
} | ||
|
||
|
||
ROIControl.prototype.init = function() { | ||
this.updateDOMElements(); | ||
this.viewer.notifyViewerZoomed(); | ||
} | ||
|
||
ROIControl.prototype.createDOMElements = function() { | ||
var de = this.viewer.surface; | ||
|
||
this.dom_element = document.createElement('div'); | ||
this.dom_element.id = 'roi_canvas_big'; | ||
this.dom_element.className = 'roi_canvas_big'; | ||
this.dom_element.setAttribute("style", PanoJS.CONTROL_ROI_STYLE); | ||
de.appendChild(this.dom_element); | ||
|
||
} | ||
|
||
ROIControl.prototype.updateDOMElements = function() { | ||
var cur_size = this.viewer.currentImageSize(); | ||
this.width = cur_size.width; | ||
this.height = cur_size.height; | ||
|
||
this.dom_element.style.width = this.width + 'px'; | ||
this.dom_element.style.height = this.height + 'px'; | ||
this.dom_element.style.left = this.x + 'px'; | ||
this.dom_element.style.top = this.y + 'px'; | ||
} | ||
|
||
ROIControl.prototype.viewerMoved = function(e) { | ||
if (!this.dom_element || typeof this.dom_element == 'undefined') return; | ||
this.x = e.x; | ||
this.y = e.y; | ||
this.updateDOMElements(); | ||
|
||
//notify the viewer | ||
var vp = $.WeblitzViewport('#weblitz-viewport'); | ||
var theT = vp.getTPos(); | ||
var theZ = vp.getZPos(); | ||
|
||
if (vp.viewportimg.get(0).refresh_rois) { | ||
vp.viewportimg.get(0).setRoiZoom(this.scale*100); | ||
} | ||
if (vp.viewportimg.get(0).setRoiZoom) { | ||
vp.viewportimg.get(0).refresh_rois(theZ, theT); | ||
} | ||
} | ||
|
||
ROIControl.prototype.viewerZoomed = function(e) { | ||
this.scale = e.scale; | ||
this.viewerMoved(e); | ||
} | ||
|
||
ROIControl.prototype.viewerResized = function(e) { | ||
this.viewerMoved(e); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.