-
Notifications
You must be signed in to change notification settings - Fork 31
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
Dont scale line widths on zoom #281
Dont scale line widths on zoom #281
Conversation
@@ -86,6 +86,14 @@ | |||
""" | |||
|
|||
|
|||
def scale_to_export_dpi(pixels): | |||
""" | |||
Origianl figure coordinates assume 72 dpi figure, but we want to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
commit after 19e3935 will need to be moved to the other PR |
Sorry, not sure I understand - can discuss tomorrow... |
This PR also includes commit from #275 |
96ec4e3
to
e65982a
Compare
Cleaned up history to remove commit from #275. |
e65982a
to
472cd4d
Compare
ecc9ff3
to
1b5be45
Compare
b174e75
to
c264815
Compare
Added support for line widths of 0.25 and 0.5 so we can more closely match existing thin lines when upgrading. |
As discussed with @will-moore , all works fine here, except the gap in sizes causes some arrows which were fine in old versions to appear too thin. This is (hopefully) caused by the gap of the allowed sizes between Another ToDo mentioned by @will-moore here is adding the upgrade logic to python, so that the export script can be run on old figures without opening these figures in the Figure UI first. As the opening in the Figure UI automatically upgrades the Figure, we need to take care for the situations where the old figures are directly fed into an export script. |
42c65e1
to
b6a2150
Compare
@pwalczysko I added support for 0.75 thick lines. |
Unrelated issue with a dialog, created https://trello.com/c/UVmZ2YsJ/18-bug-typo-in-dialog |
The 0.75 thickness is there and works nicely and I think it solves the problem |
Bug?: I do not seem to be able to copy ROIs from a small image to a big one. This means, the figure UI is pretending that I succeeded, and all is fine. But I cannot find the ROIs I just pasted onto the big image on it. I do not think this is a question of color, the ROIs are suitably colored. Also, I understand that with this PR, the ROIs pasted onto the big image should appear as big as they are on a small one. http://web-dev-merge.openmicroscopy.org/figure/file/41051 username: edit: After I have exported this Figure, I find one of the pasted ROIs (red arrow, or rather its head) on the pdf. It is on the canvas though, not on the big image where I pasted it. |
I am not sure if I get fully the workflow about running the script The json pasting is clear. But as I am pasting the json from nightshade figure, what do I give as the Webclient URL and Figure URL (the script demands these fields).
|
When following the workflow #281 (comment), it is important to note that the figure pdf was created successfully using the webclient |
Two (potential) problems still pending
|
The errors you're seeing are just warnings printed to |
@will-moore explained the case of lost Rois and we found them on the Figure finally. Did not realize that the ROIs will shrink on the big image because of the coordinates which are the same, and thus an arrow has infinetisimal length (although the thickness is kept at, say 2pt). This seems to be reasonable. This PR does solve the problem of shrinking of the ROIs out of view completely when these ROIs have been drawn on the same image zoomed out. I created https://trello.com/c/ni0q2h5c/16-bug-figuretopdf for the problem #281 (comment) Ready to merge FMPOV. |
Recent changes have improved the drawing of arrow (problem reported during testing). It |
336ac93
to
7028248
Compare
Updated to use the shape-editor 4.0.0 from npm. |
Re-test:
All works fine. Ready to merge. |
The problem we find with big images is that the current strategy of scaling stroke-widths of ROI shapes to the image pixels means that when you zoom out, the lines get thinner and are invisible for Big Images, unless you set a stroke width of 100!
Also, the scaling of stroke-widths with images is inconsistent with OMERO.iviewer, so thin lines drawn on a Big Image in iviewer are invisible in figure.
This PR includes ome/shape-editor#11 and means that when we zoom an image, the stroke widths stay the same. NB: since shape-editor is not released yet, I have copied the code over to test. When happy, can revert the TEMP commit and update version.
This means that all shapes on figure panels are shown on the figure at the same stroke-width, even when a panel is resized.
Export script is updated so that exported PDF / TIFF match what is in figure web UI.
When upgrading from older versions, we try to scale the line thickness to appear the same.
We now support line widths of 0.25 and 0.5 (previous minimum was 1).