Repository navigation
Affine fits at a candidate plane; tool texts the second dogfood run guessed at - #50
Conversation
…uessed at The second Fable run's top ask: trying a section at another position meant writing it, fitting, writing it back and restoring, four writes per candidate. job.context.fits.fit_elastix takes position_mm and angles and fits at that plane on a copy of the stack, writing nothing; the proposal's record says the plane it was made at, and overlay_picture draws it there. The texts it had to guess at now say it: look's picture number is `id`, make_image's gamma direction, interactive_transform clearing a deformation, mark_damage leaving the registration until the next fit, and what each artifact kind of a script's reply is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47a0a416ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| position_mm=position_mm, | ||
| angles=angles, |
There was a problem hiding this comment.
Build the transform proposal in the candidate plane's geometry
When a section has a noncentral stored pivot and the candidate plane changes the atlas anatomy's bounding box, the returned proposal contains inconsistent normalized parameters and physical knobs. Although elastix_fit now uses the candidate placement, the subsequent self._proposals.transform_from_params(...) still reads the original section: Proposals.transform_from_params computes the canvas size, pivot and physical translation at its original position and angles. After accepting the candidate as documented, interactive_transform reads those incorrect stored knobs through held_knobs and rebuilds the affine on the candidate canvas, unexpectedly shifting the registration even when changing an unrelated knob. Construct the proposal using the same trial state and section used for fitting.
Useful? React with 👍 / 👎.
Requested by Nash · project thread
Why
The second Fable dogfood run (xhigh, scripting, all tools, Carey 04-0180, on main after PR 49) listed where it still got stuck. Its top ask: to try a section at another position it had to write the position, fit, write it back and restore, four writes per candidate.
What changes
job.context.fits.fit_elastix(id, position_mm=..., angles=...)fits at that plane on a copy of the stack, from the section's current transform with its deformation left out, and writes nothing. The record'sfitholds the plane;overlay_picture(id, proposal={"transform": p.record, "position_mm": mm})draws it. Checked on a real Carey job: three candidates 0.3 mm apart drawn side by side, job unchanged.look's picture number isid;make_image's gamma says below 1 brightens;interactive_transformsays a change clears the deformation;mark_damagesays the registration stays until the next fit;help(job)lists what each artifact kind is.Checks
tests/test_script_findings.py: the candidate-plane fit leaves every status row unchanged and records its plane; the four texts.Not here
trace_bordersstarts: the run's 401 came from the lab OpenAI login, which needs signing in again; LangSlice already refreshes once on a 401, and I found no cheap call that proves a login without spending an image request.🤖 Generated with Claude Code