-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misregistration between paper.js and OpenSeadragon #26
Comments
I have the impression that the misalignment appears only in computers with Retina displays. Is that your case? |
My machine is definitely not a true "Retina" display, but I don't know the exact resolution. I will try to reproduce it on some other platforms as I get a chance. It looks like an issue with paper.js. |
try this in the console:
In a retina display you get 2. |
The misregistration issue disappears when this line is commented our in initAnnotationOverlay (around line 1080):
@hspitzer : You explained me what that line did but I don't remember what it was. Could you explain again please? |
This line gets the size of the currently opened tileSource and sets the resolution of the paper.js canvas accordingly (using the I wanted to set the resolution of the canvas to always have the size of the underlying image, so that you can always take the annotations as pixel values. Especially if the image sizes change (when not using the big brain) this is very important. However, if retina displays display pixels differently, it makes sense that this line might be the culprit for the misregistation. |
Commit dcd4f9c fixes the mis-alignment bug. The main point was to comment out line 1080 in the initAnnotationOverlay function (it's still left in the code). |
On the current master branch (85c22a0), I am experiencing a number of situations in which the registration of objects drawn on the paper.js view are not properly saved and loaded across slices.
For example, here's a simple recipe that produces a strange result for me every time:
In all cases I have observed, the outline and the fill area of the region are now out of alignment. Further drawing on the original slice will show the same misregistration, where the outline and the fill area are not aligned. Further panning or zooming will produce unexpected results.
My guess is that we are missing some key bit of registration that needs to be performed as we switch slices. One other clue is that the order of operations 4 and 5 do not seem to matter - you can zoom, then switch, or switch, them zoom. Either way registration is lost.
The text was updated successfully, but these errors were encountered: