Skip to content

feat: improve zoom montage QC PNGs — better mask color, no-mask output, n4 bg option#144

Merged
akhanf merged 3 commits intomainfrom
copilot/update-zoom-montage-outputs
Apr 4, 2026
Merged

feat: improve zoom montage QC PNGs — better mask color, no-mask output, n4 bg option#144
akhanf merged 3 commits intomainfrom
copilot/update-zoom-montage-outputs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

The ROI zoom montage QC figures had a yellow mask overlay (hard to see on grayscale), produced only one output per run, and always used the raw SPIM as background.

Changes

Mask overlay color

  • Changed colormap from "spring" (yellow) → "Reds" (red), which is visually distinct on grayscale SPIM data

No-mask output

  • Each qc_segmentation_roi_zoom / qc_vessels_roi_zoom rule now produces two PNGs:
    • ..._desc-{desc}_roimontage.png — with red mask overlay (unchanged filename)
    • ..._desc-{desc}nomask_roimontage.png — raw SPIM, no overlay
  • nomask suffix on the desc entity ensures the two files are adjacent in alphanum sort
  • Crops are cached so the second figure is generated with no additional I/O

N4-corrected background (--qc_roi_zoom_bg_n4)

  • New CLI flag; when set together with --correction_method n4, uses the N4 bias-field corrected OME-Zarr as the background image instead of raw SPIM
  • The corrected zarr is added as an explicit Snakemake input only when the flag is active, preserving normal dependency tracking
spimquant bids/ out/ participant \
  --correction_method n4 \
  --qc_roi_zoom_bg_n4

Files changed

File Change
workflow/scripts/qc_segmentation_roi_zoom.py Color, dual outputs, n4 bg path, DPI standardized to 150
workflow/rules/qc.smk png_nomask output, conditional spim_n4 input, use_n4_bg param
workflow/Snakefile No-mask targets added to all_participant for seg and vessel
config/snakebids.yml --qc_roi_zoom_bg_n4 CLI option

Copilot AI changed the title [WIP] Update zoom montage QC PNGs for better visibility and options feat: improve zoom montage QC PNGs — better mask color, no-mask output, n4 bg option Apr 4, 2026
Copilot AI requested a review from akhanf April 4, 2026 13:23
@akhanf akhanf marked this pull request as ready for review April 4, 2026 13:44
@akhanf akhanf merged commit 51adba5 into main Apr 4, 2026
2 checks passed
@akhanf akhanf deleted the copilot/update-zoom-montage-outputs branch April 4, 2026 20:22
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