-
Notifications
You must be signed in to change notification settings - Fork 30
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
Scale bar lengths #253
Scale bar lengths #253
Conversation
Added a single comment to the code, but otherwise works fine. Tested on firefox, safari and chrome. |
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.
From the IDR perspective, the rounded scale bar values matches the expectations from publication figures. Overall strong endorsement to have this in the next OMERO.iviewer release candidate.
For testing the lower units, it might be worth testing it against https://idr.openmicroscopy.org/webclient/img_detail/4495402/?dataset=4408 which scale bars should range from Angströms to microns.
@@ -222,7 +222,7 @@ export const PROJECTION = { | |||
*/ | |||
export const UNITS_LENGTH = [ | |||
{ unit: 'angstrom', | |||
threshold: 0.1, multiplier: 10000, symbol: '\u212B'}, | |||
threshold: 0.01, multiplier: 10000, symbol: '\u212B'}, |
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.
What is the impact of modifying this threshold?
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.
If, for example, the minimum length of scalebar was 0.08 microns
, then we look for a UNIT where the threshold is larger than this (starting at the smallest, angstrom
). With the old value of 0.1
, we pick angstrom
as a suitable unit for a scalebar of 0.08 microns
. When the scalebar is increased from 800 angstrom
to a rounded length, we end up with a length of 1000 angstrom
.
With the change in threshold, we instead end up picking nm
and we get a scalebar of 100 nm
which seems more appropriate.
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.
Ah I see, so anything below 0.01 microns
will be turned into angstroms rather than nanometers. Sounds like a fair cutoff and certainly better than 100 nm
. We can review this and further push towards 1nm
if needed.
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.
Ready for inclusion in the next 0.7.0 pre-release from my side.
Thanks a lot guys for implementing this! People are going to love this (though they may just assume that it has been like this)! |
We have finally updated iviewer for our CHAMBER server and delighted to see the improved scale bar in action. Thanks, guys! |
See #252
Now we calculate the length of the scalebar to show a nice rounded number.
To test:
E.g, zooming in looks something like this: