From 820ae4a80d6b83ff244a9be05efbf3a1f6de3212 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquemet Date: Tue, 13 Oct 2026 14:50:35 +0000 Subject: [PATCH 1/2] Calibration: unit catalog, unknown is a value, field states, _calibration request (SPEC_WRONG_SCIENCE section 2) - units come from the conformance catalog of the installed labconstrictor-tools (symbols exact, words case-insensitive after trimming, 72/96 dpi unknown, damaged micro sign refused) - a linked PixelSizeOf field is unset / auto / user (a flag set by the person's edits); an unknown source clears it; the declared default is never a stand-in - a required linked field that is unset blocks the run with the spec sentence; an Optional one sends null - anisotropic pixels (tolerance 1e-3) and non-length units are unknown with a warning - the request carries the per-axis reserved input _calibration (x and y); the run record keeps it - TIFF files are read by their own tags (OME / ImageJ unit first, resolution tags only when not a default dpi); QuPath's own 72 dpi reading of such a TIFF is not trusted unless the calibration was entered in QuPath - tests/gui_test_calibration_body.groovy runs CAL-01..20 and CAL-T1..T9 through the form, the request and real worker runs Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN --- README.md | 13 +- .../qupath/LabConstrictorTools.groovy | 528 ++++++++++++++++-- tests/calibration_fixtures.py | 29 + tests/frame_app/frame_lc_tools.py | 22 +- tests/gui_test_calibration_body.groovy | 327 +++++++++++ tests/gui_test_parity_pixel_body.groovy | 32 +- tests/run_gui_ci.sh | 2 + 7 files changed, 888 insertions(+), 65 deletions(-) create mode 100644 tests/calibration_fixtures.py create mode 100644 tests/gui_test_calibration_body.groovy diff --git a/README.md b/README.md index 42f423e..fd7feaa 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Without the jar: open `src/main/resources/org/cellmigrationlab/labconstrictor/qu ## What it does * Pick an app and a tool. Numbers (range, unit), choices, checkboxes, text, files and folders become fields; parameters of a group sit under a heading, advanced ones in a collapsed section, optional ones without a default have a "set" box (unticked = the tool gets nothing), and `enabled_when` greys fields out. -* **Image inputs**: the image open in QuPath, any image of the open project, or a file. QuPath's image is exported losslessly as TIFF (the whole image, or the part chosen under **Image area**, see below). The pixel size of the chosen image or typed file (its header is read) fills the tool's pixel-size field (micrometres) until you edit the field (then your value is kept); pixels that are not square are said in the status line ("pixel size differs: Y .. µm, X .. µm - the tool takes one value and gets X"). +* **Image inputs**: the image open in QuPath, any image of the open project, or a file. QuPath's image is exported losslessly as TIFF (the whole image, or the part chosen under **Image area**, see below). The pixel size of the chosen image or typed file fills the tool's pixel-size field (see **Pixel size** below). * Results open in a window: values, tables (as a table: the first 100 000 rows, then "table 'name' (N rows, first M shown; the full table is in P)", the Napari wording; cells with commas, quotes and line breaks are read as CSV says), images (a preview, the path and an "Open in QuPath" button), alignment matrices, files, messages (also shown under the status line) and points. * **Interaction hints** of the manifest: a `choices_from` parameter is a dropdown filled by another tool of the app (a text field when that tool cannot answer), `clear_after_run` parameters are reset after a successful run, a `Collapsed` group is a folded section, and an output with `Replace()` reuses the results window of the tool instead of opening a new one. * **Channel selector**: an image input declared with `PickChannel()` gets a Channel chooser (the channel names of the chosen image, or of a file); the tool receives only that channel. @@ -24,6 +24,15 @@ Without the jar: open `src/main/resources/org/cellmigrationlab/labconstrictor/qu * Results are kept in `~/.labconstrictor/results/