Skip to content

Add flatfield correction with BaSiCPy integration#11

Merged
hongquanli merged 19 commits into
mainfrom
feature/flatfield-correction
Jan 5, 2026
Merged

Add flatfield correction with BaSiCPy integration#11
hongquanli merged 19 commits into
mainfrom
feature/flatfield-correction

Conversation

@hongquanli

Copy link
Copy Markdown
Collaborator

Summary

  • Add flatfield correction module using BaSiCPy for illumination correction
  • Two modes: Calculate from tiles or Load from .npy file
  • Per-channel flatfield and optional darkfield correction
  • Constant darkfield per channel (physically accurate for uniform dark current)

Features

  • Calculate: Sample ~50 tiles and compute flatfield using BaSiCPy
  • Load: Drag-and-drop .npy flatfield files
  • Auto-save: Calculated flatfield saved as {input}_flatfield.npy
  • Auto-load: Existing flatfield loaded when input file is dropped
  • View: Matplotlib visualization with colorbars (flatfield + darkfield)
  • Clear: Reset flatfield state

UI Changes

  • New "Flatfield Correction" section between Preview and Settings
  • Enable/disable checkbox (default: enabled)
  • Radio buttons for Calculate vs Load mode
  • Include darkfield correction option
  • Status label showing channel count
  • View and Clear buttons

Test plan

  • Drop OME-TIFF file and verify auto-load of existing flatfield
  • Calculate flatfield with darkfield enabled
  • View flatfield/darkfield in matplotlib (check constant darkfield values)
  • Run stitching with flatfield correction enabled
  • Clear flatfield and verify state reset

🤖 Generated with Claude Code

Loading
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