Skip to content

Notebook: Z-stacks saved as recorded projections from the Axes step; 3-D stacks kept recorded (redesign 3, part 3) - #286

Merged
guijacquemet merged 12 commits into
mainfrom
claude/redesign3-3-projection
Nov 12, 2026
Merged

guijacquemet merged 12 commits into
mainfrom
claude/redesign3-3-projection

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

Redesign iteration 3, part 3 of 4, stacked on #285. Items (aa) and (bb) of "OWNER v0.5.1 NOTEBOOK TEST" (RESTART.md). Refs #176.

Summary

  • Z and T in the viewer: the t and z sliders of Notebook: one image viewer for every step, formatted report, X/Y pixel inputs (redesign 3, part 1) #284 are on every step; a time-lapse goes through the steps unchanged (one plane per time point; tested end to end).
  • Z-stacks: save the dataset as projections (notebook_projection). A Z-stack is still refused (z_stack_not_supported, the red message stays). The Axes step then shows one card:
    • the Projection (maximum, mean, sum; the list starts on "choose a method": no default) and the slices used (all, unless changed);
    • Show this projection of the image above: the example's image projected from its reduced planes with projection.PlaneAccumulator, for looking only;
    • Write the projected copies and continue with them, available once a method is chosen and the example is ticked (the roles the copies are read with are the user's), with its blocker line otherwise. It calls convert_experiment(projection=Projection(...)): the copies, conversion record version 3 and every refusal of convert --project, nothing new;
    • the copies go to <output>/projected_<method>[_z<start>-<stop>] (an output folder may hold its experiment, contract §15), and the app opens them as the experiment: scanned and checked again, a line says what they are copies of, and the user confirms their axes (one click: the copies name them). Nothing is confirmed for the user.
    • Opening the stacks again with the same output folder offers Continue with the copies written earlier (nothing is rewritten).
  • 3-D kept compatible (bb). The original stacks are only read (tested: their SHA-256 is the same before the projection and after the run). They are recorded, with no new field: the record's source_root and, per image, the same relative path, the stack's fingerprint, source_content_sha256, source_z_axis, source_z_size and z_range; the run records the record's SHA-256 and RunInputs.projection hands source_root and the per-image entries to the bricks. A volume request can therefore find the stack of any analysed image later without a migration. Keep the 3-D stacks for 3-D-capable tools (fiberfeatures) is shown greyed out with the line "3-D analysis is not enabled yet". Capabilities.volume_support and A_VOLUME_NOT_SUPPORTED are untouched.

Notes for review

  • The projected tree is a new source. In the notebook it shares the user's output folder (nothing is published there for the stacks: they cannot pass the axes). The CLI text still recommends a new output folder; both are consistent with the record.
  • OME-Zarr Z-stacks are refused by the projection as before (projection_zarr_not_supported), shown under the button.
  • The stacked axis_step other bricks embed does not get the card.

Tests

tests/test_notebook_projection.py (new): Z, T and Z+T fixtures through save and run; the copies equal numpy max/mean bit for bit; the record's source facts; the greyed option and its reason; refusals; reopening. Full gate counts in the last PR of the stack.


Generated by Claude Code

…ep; the 3-D stacks stay recorded

Owner's test of v0.5.1, items (aa) and (bb). When the roles give Z-stacks the Axes step
offers the projection (method with no default, slices, a look), writes the projected copies
and their conversion record into the output folder with convert_experiment, and opens them
as the experiment. The original stacks are only read and stay named in the record; the
3-D option is shown greyed with its reason. Capabilities.volume_support and
A_VOLUME_NOT_SUPPORTED are unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
… in full

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
…dding API is pinned)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
…it (Windows)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
…check

A method or slice range chosen for one folder stayed chosen after another folder
was scanned and checked (a stale answer with no default). They now reset when the
folder check changes; a pixel size or masks stated on the same check keep them.

Regression test: test_a_projection_chosen_for_one_folder_is_not_chosen_for_another.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Base automatically changed from claude/redesign3-2-axes to main November 12, 2026 03:43

Copy link
Copy Markdown
Contributor Author

Independent review: #286 (Z/T sliders, explicit Z projection step)

Verdict: approve after one fix (pushed). Merged the axes branch forward as 3d43b7a, with no conflicts. Retargeted to main after #285 merged (6940bb6).

Defect found and fixed: aa55464. The projection method (which has no default) and the slice range chosen for one folder stayed chosen after another folder was scanned and checked. My script reproduced it: method max and slices 1 to 3 chosen on folder A were still set on folder B. They now reset on every new folder check, keyed on the check's discovery. A pixel size or masks stated on the same check keep the choice, because recalibrated/remasked keep the same discovery. Regression test: test_a_projection_chosen_for_one_folder_is_not_chosen_for_another. I confirmed it fails without the fix.

Checked with my own scripts:

  • The originals' SHA-256 is unchanged after a mean projection of slices 1 to 3.
  • Record v3: source_root, and per entry source_relative_path, source_content_sha256 (equal to my own SHA-256 of each original), source_z_axis, source_z_size = 5, z_range = [1, 4].
  • After the copies are opened, confirmed_mapping is None: their axes are confirmed again by the user. The example tick does not survive a folder change.
  • review_axes on a ZCYX stack still gives z_stack_not_supported, and Confirm axis roles stays disabled with its reason.
  • Capabilities.volume_support and A_VOLUME_NOT_SUPPORTED are untouched (no diff to run_inputs*). Keep the 3-D stacks is disabled and shows "3-D analysis is not enabled yet".

Gate on aa55464 (Ruff check, Ruff format, code rules, pytest -n 2): 5447 passed, 4 skipped. The skips are the same four as #284: root-user file modes (one), case-sensitive file system (three). CI is 14/14 green.


Generated by Claude Code

@guijacquemet
guijacquemet merged commit be5cead into main Nov 12, 2026
14 checks passed
@guijacquemet
guijacquemet deleted the claude/redesign3-3-projection branch November 12, 2026 03:43
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.

2 participants