Skip to content

Consistently paint loading tiles white#327

Draft
btbest wants to merge 2 commits intoilastik:mainfrom
btbest:consistent-white-loading-tiles
Draft

Consistently paint loading tiles white#327
btbest wants to merge 2 commits intoilastik:mainfrom
btbest:consistent-white-loading-tiles

Conversation

@btbest
Copy link
Copy Markdown
Contributor

@btbest btbest commented Jun 10, 2025

This unifies loading behaviour across applets in ilastik. Previously, applets that only display raw data would leave unloaded tiles invisible, while applets with sparse layers (e.g. user labels) would paint tiles white until data is loaded.

The below example shows the viewer in the data selection applet, where the behaviour now changes. In other applets, e.g. pixel classification Training, the viewer already behaves like in the "After" screenshot.

Unifying the behaviour in the opposite direction (making the "Before" the default everywhere) would be harder, because then volumina would have to inspect layer-tile contents after loading them to determine whether they are empty (and hence whether to paint them). Probably wouldn't be too nasty in terms of performance, but I think the white loading tile is better anyway?

Before:
image

After:
image

This unifies behaviour across applets in ilastik. Previously, applets that only display raw data would leave unloaded tiles invisible, while applets with sparse layers (e.g. user labels) would paint tiles white until data is loaded.
@btbest btbest force-pushed the consistent-white-loading-tiles branch from 4f6527d to 6f02255 Compare June 10, 2025 15:43
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.55%. Comparing base (5cce7b4) to head (b34f7d2).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #327      +/-   ##
==========================================
+ Coverage   36.48%   36.55%   +0.06%     
==========================================
  Files         107      107              
  Lines       11371    11358      -13     
==========================================
+ Hits         4149     4152       +3     
+ Misses       7222     7206      -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@btbest btbest requested a review from k-dominik June 11, 2025 08:54
@k-dominik
Copy link
Copy Markdown
Contributor

Good that you are looking into this. But I can't say I'm a fan. The constant flashing when scrolling (only raw data) is super disturbing. And the white background also works as a "good" placeholder for black-background images (where you'd see a change). But there's also the inverse around where white can be a proper background color and then this is not informative at all. Making it worse everywhere for the sake of consistency is not an approach I want to back.

About introspecting having content or not - I assume a label array with a single pixel annotated would still result in the mostly white background issue... no?

@btbest
Copy link
Copy Markdown
Contributor Author

btbest commented Jun 11, 2025

I guess that was easier than I thought 🙃 maybe give the transparent loading a try. The only problem I see is that occasionally a tile can end up a mix of pure red, green or blue, I guess this is when some of the non-data layers load faster than raw data. But it's not bad enough to be disturbing, so I like this one. (So with this change, Training now behaves differently but data selection/features is as before)

@k-dominik
Copy link
Copy Markdown
Contributor

k-dominik commented Jun 11, 2025

I can easily get to raw data display like this during loading (note: raw data here is grayscale)

image

@btbest
Copy link
Copy Markdown
Contributor Author

btbest commented Jun 11, 2025

I guess there are no easy solutions...

Assuming this happens simply by adding https://s3.embl.de/i2k-2020/platy-raw.ome.zarr in data selection, I can't reproduce it on my system, so my guess is it's due to differences in how Qt renders on Win vs Mac... but I do get rendering artifacts on Win as well, so if I can get those fixed then I guess this might also fix them on Mac.

In any case, atm there is another issue where wiping the viewport when scrolling to new areas doesn't work consistently, so then the transparent loading tiles leave the old image from the previous view visible...

@btbest btbest marked this pull request as draft July 15, 2025 13:50
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

Successfully merging this pull request may close these issues.

2 participants