Skip to content

Fit a z-stack from QuPath - #19

Merged
alex1075 merged 2 commits into
mainfrom
feature/zstack
Sep 9, 2026
Merged

alex1075 merged 2 commits into
mainfrom
feature/zstack

Conversation

@alex1075

@alex1075 alex1075 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Extensions > FLIMKit bridge > Fit a z-stack... points FLIMKit's z-stack fit at a folder of region_zN.ptu slices and adds each fitted stack to the project as a real z-stack, so the z-slider moves through the slices and an annotation carries the plane it was drawn on.

Needs flimkit-bridge#4 for the endpoints.

The folder is scanned first

A directory chooser is easy to miss with, and the fit is long enough that finding out afterwards is expensive. An empty folder is refused with the naming pattern; a folder with something in it says how many stacks and slices before any settings are offered.

Getting the volume across

It arrives as a path rather than as bytes, the same way the stitch pipeline hands over its products. Over a forwarded port that path is meaningless locally, so when QuPath cannot open it the extension falls back to GET /v1/zstack/volume.ome.tif and stores the result beside the project, saying which stacks came that way.

The slices themselves are never uploaded: ptu_dir is a path FLIMKit opens, so a forwarded session names a folder the bridge can see and gets a 404 naming the folder if it does not.

The project entry carries the pooled fit

Not only its conclusions. The locked lifetimes, how many photons they were fitted from, which IRF, and the calibrated chi-squared. The lifetimes alone do not say whether to trust them.

Versions

Extension, gradle build, pyproject.toml and CITATION.cff all move to 0.6.0 together, and the catalog gains the release, as CLAUDE.md requires.

Tests

14 in ZStackResultsTest, headless. Full suite passes; the three failures in the Python tests predate this branch (stale local copies of phasor.normalise, and a machine-IRF test wanting more than one installed).

alex1075 and others added 2 commits September 8, 2026 16:14
Extensions > FLIMKit bridge > Fit a z-stack... points FLIMKit's z-stack
fit at a folder of region_zN.ptu slices and adds each fitted stack to the
project as a real z-stack, so the z-slider moves through the slices and an
annotation carries the plane it was drawn on.

The folder is scanned before the settings dialog. A directory chooser is
easy to miss with and the fit is long enough that finding out afterwards
is expensive, so an empty folder is refused with the naming pattern and a
folder with something in it says how many stacks and slices first.

The volume reaches QuPath as a path rather than as bytes, the same way the
stitch pipeline hands over its products. Over a forwarded port that path
is meaningless locally, so when QuPath cannot open it the extension falls
back to GET /v1/zstack/volume.ome.tif and stores the result beside the
project, saying which stacks came that way.

The project entry carries the pooled fit, not only its conclusions: the
locked lifetimes, how many photons they were fitted from, which IRF, and
the calibrated chi-squared. The lifetimes alone do not say whether to
trust them.

Needs flimkit-bridge 0.8.0 for the z-stack endpoints.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RxD4ykNwSf7AkdZ5jRgLc
@alex1075
alex1075 merged commit be0a025 into main Sep 9, 2026
7 checks passed
@alex1075
alex1075 deleted the feature/zstack branch September 9, 2026 07:39
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.

1 participant