Skip to content
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

Tile Redraw #5

Open
pranthakur opened this issue Mar 29, 2018 · 3 comments
Open

Tile Redraw #5

pranthakur opened this issue Mar 29, 2018 · 3 comments

Comments

@pranthakur
Copy link

Hello, I have created some image correction shaders (gamma correction etc)
Now i want to update gamma factor via some UI, and pass as a uniform.

After updating UI item, i am calling
openSD.world.resetItems() => it makes all tiles to reload/ download again which is an issue.
is there any way to just redraw entire canvas/tile ?

@thejohnhoffer
Copy link
Owner

thejohnhoffer commented May 5, 2018

I'm not sure how to trigger fresh downloads of everything, but I've been using:

openSD.world.resetItems();
openSD.world.update();

to trigger redraws of all tiles in all tiledImages

@yellowtailfan
Copy link

I have also implemented gamma adjustment using viaWebGL. I am using viewer.world.resetItems() after changing the gamma to force a redraw.

The issue is that resetItems() refetches all the image data (which may take some time) and even if the image data is local, the update has a distracting delay during which the canvas is blank. The delay is about 200 ms.

My question is whether there is some way to trigger fast redrawing after changing the gamma, so that the transition between different gamma values is instant and seamless without any flicker?

I saw your interactive branch (#6) however it's unclear how to trigger a quick redraw using the code in that branch.

@Aiosa
Copy link

Aiosa commented Apr 15, 2021

I solved this more generally using a timestamp. I think this simple solution works only with simple scenarios, such as only one tile source, no transparency etc., see:

openseadragon/openseadragon#866 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants