Skip to content

Modernize lazy flatfield correction code#92

Open
minnerbe wants to merge 32 commits intozarrv3from
experiments/lazy-correction
Open

Modernize lazy flatfield correction code#92
minnerbe wants to merge 32 commits intozarrv3from
experiments/lazy-correction

Conversation

@minnerbe
Copy link
Copy Markdown
Collaborator

@minnerbe minnerbe commented Jan 9, 2026

This PR aims to update the lazy flatfield correction code in net.preibisch.mvrecon.fiji.spimdata.imgloaders.flatfield in several ways:

  • add an image loader that implements the ViewerImgLoader interface
  • use improved downsampling code for on-the-fly downsampling of flatfields
  • use the N5 api to load the flatfields to also be able to work with chunked / cloud storage

This is still a draft as more features will likely still be added.

@minnerbe minnerbe marked this pull request as draft January 9, 2026 22:32
@minnerbe minnerbe marked this pull request as ready for review February 27, 2026 21:59
@minnerbe
Copy link
Copy Markdown
Collaborator Author

I finally tested this on real data. The overhead of doing on-the-fly correction to just loading and transforming a single dataset is about 20-25%, which seems reasonable to me.

@mkitti please have a look and let me know if you run into any problems. There are a couple of xml files that show how to specify flatfield images and coding agents should be pretty good at extending those to cloud-hosted data. This was only tested for two setups (one local, one s3-hosted), so I still expect some rough edges.

@mkitti
Copy link
Copy Markdown

mkitti commented Feb 27, 2026

Also pinging @indecisiveuser for testing.

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