-
Notifications
You must be signed in to change notification settings - Fork 100
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
histograms #4703
histograms #4703
Conversation
Think a file is missing:
|
We try to only trigger channel changes when a channel changes and if several channels change E.g. setModel(greyscale) then the active channel is triggered last. Also have tried not to use rgb colours anywhere since the coversion between rgb and hex colours is unecessary and we don't want to have to handle both when channel change is triggered
@@ -113,6 +115,7 @@ | |||
<script type="text/javascript" src="{% static "3rdparty/aop-1.3.js" %}"></script> | |||
<script type="text/javascript" src="{% static "webgateway/js/ome.postit.js"|add:url_suffix %}"></script> | |||
<script type="text/javascript" src="{% static "3rdparty/farbtastic-1.2/farbtastic.js" %}"></script> | |||
<script type="text/javascript" src="{% static "webgateway/js/ome.histogram.js" %}"></script> |
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.
you are missing url_suffix
Not much use to be able to click up and down a single value. Also made the UI more cluttered.
Behaviour:
Edit:
|
RFE:
|
RFE:
|
Bug: Unsolicited switching of channels in histogram after first open.
|
Couple of RFEs and one bug. Stopping testing for today. |
Issues with default channel shown by histogram:
Selecting slider on another channel or clicking into text box does not change histogram - have to change value to trigger - no way to just look at the histogram of a channel as it is without having to change something and then change it back. If I decrease the minimum value in a channel or increase the maximum value then there is no change to range displayed in the histogram The font size of the values displayed on the histogram needs to be reduced - too intrusive. Find it very confusing only having the max value text on the histogram only appearing as the line moves to the left. Only having the min value displayed by default just triggers “what is that number?”. Should have the max value to the left of the max line, not to the right. I think it may also be better to have the text colour the same as the channel and line as this will make context more obvious. If I increase the max value beyond the default using the text box, then use the slider to reduce it and - without releasing slider - go back to max - the value decreases. Releasing the slider and then repeating this - the max value continues to decrease progressively until the default maximum is reached and then it seems to stablise on that. I think this may have something to do with the slider still taking in values after the cursor on the slider has gone beyond the max point of the slider. In Insight the moment you click on the max slider button the max value returns to the default value. Min slider button/values behaves the same as max in both. This does occur in 5.2.3 but is intermittent. |
@will-moore @pwalczysko |
Don't set histogram to different channel on 'channelChange' since this is triggered multiple times when settings are pasted/reset etc. Instead, trigger specific 'channelToggle' when channels are toggled on/off
Should be mostly fixed now.
Other things I forgot to mention before:
|
Better without the numbers in the histogram. Toggling channel works as expected. Histogram not changing colour when selecting a slider on another channel - only when moving - is this because selecting a slider without moving it does nor trigger an event? Like @pwalczysko - finding the behaviour between full range/min/max confusing. Histogram only shows between min and max and lines only appear on histogram when min/max is reached. Would still like histogram and greyscale boxes swapped sides. |
TODO: remove rendering-engine code for histograms of projected images. |
This prevents unnecessary triggering of events when channels are not turned on/off. See ome#4703 (comment)
|
Tested using http://web-dev-merge.openmicroscopy.org/webclient/ user-3 Behaves as expected. Good to merge from my POV. |
@@ -1570,7 +1570,11 @@ def load_metadata_preview(request, c_type, c_id, conn=None, share_id=None, | |||
'c': ",".join(chs), | |||
'm': r['model'] == 'greyscale' and 'g' or 'c' | |||
}) | |||
maxW, maxH = conn.getMaxPlaneSize() |
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.
could you for the new variables use max_w
etc.?
@pytest.mark.parametrize("bins", [None, 10]) | ||
def test_histogram_bin_count(self, bins): | ||
""" | ||
Test that the we get histogram json of the expected size. |
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
size_x = 125 | ||
size_y = 125 | ||
img_id = self.create_test_image(size_x=size_x, size_y=size_y, | ||
session=self.sf).id.val |
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.
getId().getValue() is preferrable
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.
Hmmm - why is .getValue()
preferable?
We use .val
a lot everywhere. E.g.
OmeroWeb wmoore$ grep ".val" -r test/integration/ | wc
727 3229 64263
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.
In the Python stack we almost universally prefer the id.val
style rather than using the accessor methods.
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.
understood so will need to go over the inconsistency I have noticed in various locations
The style probably evolves through time
""" | ||
Gets a histogram of 256 columns (grey levels) for the chosen | ||
channel of an image. A single plane is specified by ?theT=1&theZ=2 | ||
or use ?p=intmax for a projection. |
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.
this is no longer the case
no pintmax
Looks all good, tested on eel as well as locally. |
This adds histograms to Preview panel of web (will also add to image viewer - not ready yet).
Based on designs at ome/design#37
Also https://trello.com/c/6gKn8FT2/40-histogram
To test (NB: start with refresh of browser to avoid cached js files)
NB: I have removed the 'rangewidget' which gives channel start/end inputs their up/down buttons. I think this wasn't useful functionality and looks better with it gone. See before (above) and after (below)