-
Notifications
You must be signed in to change notification settings - Fork 43
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
Histogram range editor #1175
Histogram range editor #1175
Conversation
girder/girder_large_image/web_client/vue/components/FrameSelector.vue
Outdated
Show resolved
Hide resolved
girder/girder_large_image/web_client/vue/components/CompositeLayers.vue
Outdated
Show resolved
Hide resolved
I see a lot of extraneous parameters in the tile style queries (layerName, custom, defaultMin, etc). Also, it doesn't seem to switch to the composited image until I fiddle with a setting -- I was expecting the previous behavior where all of the channels are composited without any specified min/max values until some value has been specified. This means that the range we display should probably be based purely on the dtype until we fiddle with values. I don't seem to be able to type fractional percentages in the scale range (I type 0.2 and immediately it reverts to 0). |
Eventually (in another PR), it'd be nice to be able to specify a default for any channel that has blank min/max values. That is, by default all channels would start with blank min/max values. If the overall defaults are set to 0.2% / 0.2% or 100 / 20000, then any channel with blank values would use those values, but channels with specified values would use those specific values. Clearing the numerical values in a channel would go back to using the default, and clearing the default would mean min / max are unspecified in the style. The default controls could be much like the individual channel controls, but wouldn't have a histogram (or we have to merge histograms for all channels). |
Can we make the default auto-range be 0.2% (not 0.02%) and prevent the user from dragging it past 50%? |
girder/girder_large_image/web_client/vue/components/CompositeLayers.vue
Outdated
Show resolved
Hide resolved
I removed the |
overflow-x: auto; | ||
overflow-y: hidden; | ||
overflow: auto; | ||
max-height: 300px; |
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 makes it surprising to edit the colors, as the color dialog gets hidden near the bottom. Also, if you expand a row such that it causes the scroll bar to appear, then something about the histogram gets cropped and I can't grab the right control handle:
The red band was visible before expanding all, and here the right handle isn't grabbable any more.
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.
@@ -83,7 +84,7 @@ export default Vue.extend({ | |||
this.imageMetadata.bands = Object.values(this.imageMetadata.bands).map( | |||
(b, i) => { | |||
if (!b.interpretation) { | |||
return `Band ${i}` | |||
return `Band ${i + 1}` |
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.
When #1214 is merged, we will always know how many bands an image has. Specifically, if there isn't a bands
entry which has the actual interpretation value, we should be using
https://github.com/girder/large_image/blob/master/large_image/tilesource/base.py#L1800-L1803
as the band interpretations if there are <= 4 bands. If there are more than 4 bands, the first three are considered red, green, blue and the are just numbered as we are now doing.
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 change could be in a separate PR.
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.
Should I take out the +1
s here?
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.
No. It doesn't have to be in a different PR.
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.
The main difference with #1214 is we now know for all sources how many bands there are and can name them when there are <= 4 bands.
When I clear the entry in the min or max edit fields, I see a console error: |
When I try to show all the histograms of a many channel image, it is asking for the wrong frame for the histogram. Rather than asking for frames 0,1,2,3,4,... it is asking for 0,1,3,6,10,... My guess is that frame and framedelta are both set. |
Fixed in 4a46617
Fixed in 448ef26 |
When you have scrolled down the list of channels, the color picker is out of view (scrolling up shows it). |
Changed in 3e2fd3a. Rather than having a color picker component for every row in the table with each being relative to the color picker column, we now have one color picker component relative to the table header, which is sticky during scrolling. |
@@ -33,7 +34,7 @@ export default Vue.extend({ | |||
}, | |||
methods: { | |||
updateStyle(style) { | |||
this.style = style | |||
this.style = Object.assign(this.style, style) |
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 does doing this.style =
in front of the Object.assign
do?
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.
Great.
Resolves #1117, resolves #1109, resolves #1122
Histograms include a mode to "exclude distribution tails". When this mode is enabled, the inputs for min and max become percentages from the ends. These automatically chop off 1% from each end (but if a bucket includes more than 1%, it may end up as more - in the below example, the minimum excludes 2%). The user can still change these values.
Histograms are drawn with some logic to shorten the height of the max frequency if it eclipses all other values.
From @manthey via Slack:
An example without max frequency shortening:
The same histograms drawn with max frequency shortening: