Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #825 +/- ##
===========================================
+ Coverage 99.37% 99.41% +0.03%
===========================================
Files 71 72 +1
Lines 9175 9540 +365
Branches 1197 1267 +70
===========================================
+ Hits 9118 9484 +366
+ Misses 31 29 -2
- Partials 26 27 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…toolbox into multichannel-reading
…Analytics/tiatoolbox into multichannel-reading
shaneahmed
reviewed
Feb 13, 2026
shaneahmed
reviewed
Feb 13, 2026
shaneahmed
reviewed
Feb 13, 2026
Member
shaneahmed
left a comment
There was a problem hiding this comment.
This looks good and I can successfully load the images in TIAViz. However, I am not clear how to read the channels in python. Could you add some examples in the docstring?
shaneahmed
approved these changes
Feb 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds ** multichannel (e.g., immunofluorescence) image support** across readers, the TileServer, and the Bokeh visualization app. It introduces a new
MultichannelToRGBpost‑processing pipeline that composites N‑channel data to RGB, a channel/color selection UI (with enhancement control) in the app, and corresponding TileServer endpoints to sync state. It also hardens TIFF/OME channel‑metadata parsing, adds qptiff samples for testing, and refactorsWSIPatchDatasetto improve input validation and tissue‑mask handling. Additional tests cover edge cases across readers, metadata parsing, UI, and server routes.Multichannel Image Support, TileServer & Bokeh UI Enhancements, and Reader/Dataset Hardening
Key Changes
✨ Features
Post‑processing for multichannel images
tiatoolbox.utils.postproc_defs.MultichannelToRGBclass for converting multi‑channel arrays to RGB, with configurable color dict, channel activity/order, and anenhancefactor. Includes extensive unit tests.WSIReader API:
post_procWSIReader.open(..., post_proc="auto" | None | callable)now propagates to all reader types."auto"appliesMultichannelToRGBfor multiplex TIFF/virtual inputs (returns RGB).Noneskips post‑processing (returns native channel count).Bokeh app – Channel/color UI
TileServer endpoints
GET /tileserver/channels→ current{channels, active}state.PUT /tileserver/channels→ set color map & active channels.PUT /tileserver/enhance→ set global enhancement factor.QPTIFF sample integration
multiplex_example.qptiff(+ small variant) to remote samples; fixtures & tests use them end‑to‑end through app and server.🧠 TIFF/OME Metadata & Reader Hardening
ScanColorTable, andFilterColorsblocks, with sane fallbacks (auto‑generated colors, tolerant of missing/invalid values). Objective power inference falls back to MPP when missing. Extensive edge‑case tests included.TIFFWSIReader. Some paths that previously resolved to OpenSlide may now returnTIFFWSIReader.🧰 Dataset Refactor
WSIPatchDataset:_validate_inputs, with clearer errors._setup_mask_reader(now retries with MPP when power is unavailable)._filter_patches.🖼️ Docs
🔧 Other
*.qptiff; minor UI and server startup robustness tweaks; small lint/style fix.Breaking / Behavior‑Changing Notes
post_proc="auto"(default) returns RGB (3 channels). To obtain raw N‑channel data, callers must passpost_proc=None.TIFFWSIReaderinstead ofOpenSlideWSIReader. Tests and assertions updated to accept either where appropriate.WSIPatchDatasetnow validates shapes early and raises more precise errors.Usage Examples
1) Programmatic reading (RGB composite vs raw channels)