Repository navigation
Coordinate frame: exported plane, selection planes, file frame, size mismatch (QuPath #21) - #27
Merged
Merged
Conversation
…ze mismatch (SPEC_WRONG_SCIENCE section 1) - the image open in QuPath is exported on the plane the viewer shows at run start, whole image included; points and outlines are drawn on it (1.1.9, 1.2.7, CF-10) - selected annotations must lie on one plane and on the exported one: selection_mixed_planes / selection_plane_mismatch, for the Image area and the RegionOf mask (QuPath #21) - a file input is its own pixel frame: results are a table and a file, the status says so (1.3, CF-07) - an ApplyTo image or labels result of another size than what the tool received is said once (1.1.7, CF-11) - tests/gui_test_frame_body.groovy runs CF-01, 07..12, 14 from conformance.json against a real worker (tests/frame_app) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
… viewport, mismatch while the viewer is off plane 0) Found by a sabotage check: reading the plane as 0/0 in the area resolution was not caught. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
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.
Phase 2, theme 2 (coordinate frame) for the QuPath host:
docs/SPEC_WRONG_SCIENCE.mdsection 1 of LabConstrictor-Tools andwrong_science.coordinateofconformance.json(CF-01..CF-14; CF-09 and CF-10 are the QuPath-specific cases). Fixes #21. The Napari reference is LabConstrictor-napari #52.What changes
t/zlands on the exported plane, not on plane 0. A project image or a file has no viewer plane and is exported from z=0, t=0 (as before).selection_mixed_planes, annotations on one other plane withselection_plane_mismatch; the host never switches the plane. The refusal is one sentence (z/t named), logged with its code and carried in the outcome asreason; nothing is exported or drawn, no results folder is made.file input: results are in the file's pixel frame(conformancefile_input_note). An output's source is now the input itsApplyTonames (also when the result message does not repeat it), else the first image input.ApplyToand has another size than what the tool received (the crop, if a crop was exported) is said once in the status line with the conformance sentence'labels' is 6 x 4 but 'Image' was exported as 12 x 8; shown at the pixel origin, not aligned.c = x0 + (x + 0.5) * downsampleand[x, y]/(y, x)were already right; they are now pinned by the tests below (CF-01, CF-09, CF-12, CF-14).Issues
Tests
tests/gui_test_frame_body.groovy(53 checks, picked up bytests/run_gui_ci.sh, README updated). It reads CF-01..14 from the conformance file of labconstrictor-tools (LC_CONFORMANCE, elsepython -m labconstrictor_tools.conformance --pathof the registered app), builds ASYM (tests/fixtures/asym.tif, 8 x 12,100*y + x) and the same image as 2 time points x 2 z-planes (asym_zt.tif), and drives the real dialog and a real worker (tests/frame_app, new test appframe, registered bytests/ci_setup_apps.sh; its tool reports what it received: image shape and pixels, mask shape and pixels). Checked: the worker's input (exported crop values 204 / 509, mask pixels equalrect_mask_pixelsand values 203..305, mask all ones in the crop shape), the exported files, the drawn coordinates read back from the annotations (point atc, outline box), the planes (z/t) of every annotation, nothing else drawn, results folder count unchanged on a refusal, the refusal sentences and codes (codes compared withhost_internal_codes), CF-12 (Replace with another frame), CF-14 placement arithmetic at downsample 2 and 4 with offsets.ispans[i, i+1), so it is drawn at vertex + 0.5 (spec 1.1.3:target_px + 0.5).NOT_APPLICABLE, never as passed): CF-02..06 and CF-13 (a QuPath image has no transform, identity by construction, spec 1.3). Unsupported (printed asUNSUPPORTED): CF-14 export at downsample 2 and 4 (the host exports at 1.0 only); only the placement arithmetic of those variants is checked.selectionMask) is equivalent (the mask code reads only that area's size and offset). One was missed (the area resolution reading the plane as 0/0: no test had the viewer off plane 0 with an Image area), so I added CF-10h (selection area, viewport and a (0,0) selection while the viewer shows (1,1)); it is now caught. The first fixture also showed thatlabels_to_shapessimplifies outlines, so the test tool writes the exact box instead.Existing tests changed
None. (No existing test pinned the old whole-image plane; the full qupath-gui suite is green with the new body.)
Spec gaps and conservative choices
(nothing was changed; files are in <path>)); the suffix is not added because a plane refusal happens before any file is written.qupath: table_and_file); outlines are "listed as a file" in the results window and the status carries the conformance note.ApplyToresult has another size, and nothing is said when the sizes agree.sourcein the sentence is the label of the input parameter.Axes("YX")guard kept: a tool that declares axes still refuses a whole-image export of a stack, with the Tools sentence (existing behaviour,wrong_dimensions); the spec is silent. The exported plane for a tool without declared axes is the viewer plane.target_unavailable) is theme 4 and is not done; hence Keep QuPath image identity and result coordinates tied to the image used at run start #16 stays open.hs_err_pid*.logfiles committed at the repo root (not mine).Not verified
qupath-guion Ubuntu, QuPath 0.7.0, Xvfb); Windows and macOS were not run by anything, here or in CI. Other QuPath versions not tried.🤖 Generated with Claude Code
https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN