-
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
New Frame selector Vue component #1086
Conversation
@annehaley See the changes I made and the comments on the last commit. If you think this would be clearer rebased onto master, please do so. |
3bbeb4c
to
ad01037
Compare
@manthey thank you for fixing |
Remove package-lock.json.
If we don't specify a style, the baseQuad is still used. Oddly, when we stop using the baseQuad I see some webGL warnings which I'll hunt down separately. It would be better to set a style of undefined if not needed (for instance not using channel compositing). There is one workaround of a potential caching bug that I'll also look into later.
ad01037
to
a563949
Compare
83675fc
to
e3cedec
Compare
@manthey could you help me figure out why the following failure is happening?
|
I used |
girder/girder_large_image/web_client/vue/components/CompositeChannels.vue
Outdated
Show resolved
Hide resolved
girder/girder_large_image/web_client/vue/components/CompositeChannels.vue
Outdated
Show resolved
Hide resolved
I don't want to merge anything that shows unfinished functionality. So, we either need to handle the unfinished parts (e.g., bands) or finish them. Once we've done that and addressed my color comments, we could merge this and leave everything else to future PRs. Ultimately, I haven't seen real-world data sets that have both more than three bands AND channels, so I think that we could have our modes be "Sliders / Composite Frames / Composite Bands". Composite Bands could be an option even on single band (greyscale) images with only one frame, since that would be a way of exposing the min/max controls. For bands, the colors should default based on the band interpretation (red/green/blue/gray) and then use unused colors for other interpretations (including alpha). The default initial checked bands should just be the first three bands (as opposed to channels where we default to all channels being on and composited). When we use this in the HistomicsUI context, we'll want these controls to fit in one of the side panels -- we'll be able to use CSS to adjust this. We just need to be aware that controls will be tight (more relevant as we add histograms and options for min/max besides numbers). The use of "0" as undefined for min/max isn't appropriate. Technically, the unset value can be different than 0 for min (and is determined based on datatype for max), and with float-based samples, 0 might actually be a sensible max in some odd case. We eventually want to have a mode for min and max that would be "default/value/min(or max)" where "default" wouldn't use a number, "value" would be the current mode (but there can be data where this is floating point on a scale of [0,1] or [-1,1] or other values, so the controls can't restrict to integers unless we check that makes sense), and "min" or "max" would let you specify a numerical value from [0,1] (or maybe from [0%, 100%]) which would be the amount of the histogram to exclude from the ends (e.g., "min:0.002" sets the minimum such that 0.2% of the samples are below the picked value). And, for non-composited axes, we'll eventually want a "max-merge" option (which would disable the slider). This might conceptually have other choices (so maybe it is a drop-down control of slider/max-merge rather than a checkbox). When we do show this histogram, it is relatively cheap to get the histogram for all the bands of the current frame. For multiple channels, we end up needing to currently ask for the histogram for all channels at the current frame position. Since each frame has its own histogram, we might want to overlay two histograms -- one of the current frame/channel (possibly applying max-merge) and one of the combined histograms of all frames with that channel. Getting that combined histogram is initially expensive in time (and when we have it, we might want an additional min/max mode of combined min/combined max). We'll want to show the min/max values on the histogram as vertical bars. And, in my list of wants, we may eventually want a checkbox to enable/disable all channels (or bands) so that you can quickly re-enable them or go to a single channel/band. |
When we construct the style, it is somewhat more efficient to specify the base frame as the |
Could you provide an example? I don't understand what this would look like from the documentation. |
I see some linting errors in the latest commit. Running |
1de78dd
to
bf9766f
Compare
When I have the axis mode and slide the channel slide to a non-zero value and then switch to composite channels, it still adds frame = so it ends up with the wrong frames being composited or fails if the last channel is picked. |
Ideally, when we switch between frame and axis or vice versa we would preserve the view (that is frame is directly equivalent to a set of axis values and vice versa). This could be fixed in a follow on PR. |
var params = { | ||
useCredentials: true, | ||
autoshareRenderer: false, | ||
keepLower: false, |
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 undesirable when we don't have a base image (such as a map). It makes panning much less attractive as low res tiles aren't shown while high res tiles are loaded. Probably when we are using keepLower false, we need to explicitly hide the lower of our two styled layers. Can you recall what the symptoms were that you were correcting?
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.
I had included this because it was in the params
object on line 98 previously, but now I understand that this was only intended for the geospatial cases. I can move this to the geospatial if
block instead.
const baseUrl = this._getTileUrl('{z}', '{x}', '{y}'); | ||
const match = baseUrl.match(/[?&](_=[^&]*)/); | ||
const updated = match && match[1] ? ('&' + match[1]) : ''; | ||
setFrameQuad(this.metadata, this._layer, { |
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.
Let me look into how to refactor what you've done -- we really don't want to use the setFrameQuad
on images that aren't multiframe or are geospatial.
If you think my latest changes are good and CI passes, go ahead and merge. |
Resolves #498, resolves #1108, resolves #1111
Improvements for future PRs: