-
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
Presets from Large Image Configuration file #1248
Conversation
This ends up adding all of the presets from the config file to the item's internal values when I create a different preset. We probably want to not add any preset to an item that matches a config preset exactly. Otherwise, for example, I change the name of the config preset and now I have two presets rather than one. |
You're right, I changed this so that I'm keeping the item presets separate from the folder presets rather than grouping them together in |
If there is a preset with the same name in the config and the item, we are showing both of them. The item preset should always win. |
Ok, I added a bit of logic to the |
I'm getting an error: |
86c2d69
to
10d376e
Compare
girder/girder_large_image/web_client/vue/components/PresetsMenu.vue
Outdated
Show resolved
Hide resolved
When I switch to a preset that is just a frame or just a channel, I get an error:
It seems like in these instances, |
Ok, thanks for catching that. I just added an extra |
I noticed an issue not related to this branch, but related to presets. I have two presets which only different based on if they have auto-range set on the active channels. Switch to the auto-on preset works fine, switching to the auto-off preset doesn't turn off the auto buttons. |
I added an |
I'm not seeing any difference. I'm using WD-76845-097.ome.tif and have the presets listed below. I also don't see it change properly from preset "CD4RO" and "CD4RO Auto"
|
57514a4
to
75347c1
Compare
Oh I see, there are two places where I needed an |
Now the auto range doesn't seem to be turning on for me. The autorange controls then don't change when clicked (like they are known to be on) and clicking the global autorange suddenly makes the style update. |
@manthey I made another adjustment in c1bfde7. I tried switching between a preset with no autoRanges, a preset with all channels autoRanged, and a preset with some channels autoRanged. I think it should work smoothly now. Could you give it another try? Thanks for your patience with the many iterations, and thanks for finding the edge cases. |
I still see some issues: (a) after going to a present, if I click the auto-range all button, all the channels turn on (they don't show that they are turned on, but the image changes). (b) sometimes when switching between two presets where one has auto-range on (e.g., my samples with CD4RO and the auto-ranged version), the auto-ranged version isn't shown (the controls looks right, but the image isn't). (c) If a folder-level preset has the same name as a local preset, they are both shown, but you can't select the folder-level preset -- I don't think it should be shown. (d) ideally, we shouldn't include parameters in the style used for fetching images if they aren't used, since that reduces caching (e.g., preset=true, autoRange). |
…too-large framedelta values
I still see: On the CD4RO / CD4RO auto, I select the first (not auto) and it shows properly. I select the auto and it briefly shows the auto and then shows the non-auto. |
344e450
to
7775456
Compare
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 working in all of my test cases. Though I do see an occasional error in the console (probably unrelated to this specific PR): HistogramEditor.vue:151 Error: <rect> attribute width: A negative value is not valid. ("-9")
Ok, thank you for testing. I'm not able to replicate this, though. Perhaps you could make an issue with how to replicate and I can address it in a separate PR? |
This PR allows a user to specify image view presets in their
.large_image_config.yaml
configuration file at the folder level. Presets specified in the configuration file will be added to the presets available for every image in that folder (as long as the preset is applicable to that image).We can write more complicated logic for determining whether a preset is applicable to an image, but for now, the
presetApplicable
function simply evaluates whether the preset'smode
andframe
values are available for the image.This PR also adds a section to the documentation explaining how to add presets to the configuration file. This section includes some basic example presets.