Skip to content

v0.4.1 — folding groups, a window that stays put, no stale frames, legible overlay

Choose a tag to compare

@sleuthy-sloth sleuthy-sloth released this 25 Oct 07:36

Clivus v0.4.1. Free software (GPL-3.0-or-later); research and engineering tooling, not a certified
medical device, and nothing here has been validated for diagnosis.

This release is the answer to four issues a radiologist hit in 0.4.0, plus one follow-up those photos
turned up. Each fix has a test that was checked to fail without it; the verbatim runs are in
docs/UNIT-6-EVIDENCE.md.

What changed

Groups fold. The browser already split a folder into patient and study headers; they could not be
closed, so forty studies meant scrolling past several hundred series. Click a header (or put the caret on
it and press Left/Right) and everything under it gets out of the way. Folding is navigation, not closing:
the image you are reading stays on screen, no slice is decoded, and the caret moves to the header rather
than to another series. Fold state is keyed by patient ID and study UID, so a scan batch that rebuilds
every row cannot lose it, and two patients sharing a name cannot share a fold. A search shows what it
matches even inside a folded group, and clearing the search puts the folds back.

The window you choose stays chosen. setFrame() used to re-derive window/level from every frame that
arrived, so stepping one slice threw the adjustment away — the comment on the function said as much. The
frame's own default now applies only when the image changes identity: a different series, or a different
matrix. Stepping forward, backward, or re-decoding a slice keeps your window; Reset View (double-click or
R) still returns it to the image's full range.

Scrolling stops flashing frames you already left. Three scheduling defects, measured with counters
that now live in the code and a probe that runs headless:

  • a decoded frame was presented even when the wheel had moved on. A 12-step burst presented slice 2 (an
    abandoned target) and stayed on it — the wheel said 12, the screen said 2. Now it presents only what
    was the target when it arrived, then the current one.
  • the request path decoded a slice the speculative pool was already decoding: two reads of the same file,
    two presentations of the same frame. It now waits for the speculative decode.
  • a step that was waiting on the prefetch did not advance the wheel's target, so a fast spin dropped
    every second notch. Steps are measured from the target now.

On a Pi 5 against local disk, a 15-step walk served 14 of 15 steps from the speculative decode with a
median request→present under the probe's 20 ms sampling granularity. Those are decode-and-schedule
numbers, not frame-rate claims: this machine has no GPU-bound paint path to measure.

The corner overlay is legible. Two photographs of the running app showed two lines of 8 pt grey text
over a dark image; local OCR read the characters correctly, so it was size and contrast, not encoding.
The font floor is 10 pt (ceiling 18), and each corner block gets a backing plate sized to its text.
Measured over the left block on mid-grey: contrast 1.84:1 → 6.09:1. Both images are in
docs/img/overlay-legibility-*.png, painted by the same paintOverlays() the canvas calls.

The overlay blocks also no longer share one full-width rectangle: a long series description used to run
underneath the window/level block, and both blocks were drawn into their own measured box, which re-wrapped
the text at a narrower width and clipped it.

Verification

  • 30 test targets green on this host (26 existing plus browser_groups, overlay_layout, scroll,
    window_level). Baseline before the work was 25/26 — cine is timing-sensitive on four cores and
    failed once on an untouched tree, then passed.
  • Every behaviour above has a test that was disabled in place, rebuilt and re-run; the failing line is
    quoted in docs/UNIT-6-EVIDENCE.md.
  • Windows: windows.yml (core + pixel math) and windows-app.yml (full GUI, packaged folder) run on
    every push and on demand. This tag's Windows folder is attached below.

Not verified, stated plainly

  • The garbled-text report itself. The corner overlay was genuinely hard to read and is fixed; whether
    that is what the reporter saw is unconfirmed. If text still looks wrong on their machine, the useful
    question is which text, and whether the characters are wrong or the layout is.
  • Nobody has launched a packaged Windows build on Windows hardware. The CI runner has no GPU, so its
    --bench smoke step produces no output and says nothing about fps.
  • Scrolling was measured on a Pi 5 with local disk. A Windows workstation's paint path, DPI scaling and
    GPU are not covered by any number in this release.
  • The fold gesture was driven through real QMouseEvents under the offscreen platform, not by a human
    clicking on a desktop.
  • No clinical validation, no regulatory assessment, no diagnostic claims.