Skip to content

added support for using peak scan data in tile removal - #246

Merged
trautmane merged 4 commits into
newsolverfrom
remove-post-peak-scans-20260821
Aug 22, 2026
Merged

added support for using peak scan data in tile removal#246
trautmane merged 4 commits into
newsolverfrom
remove-post-peak-scans-20260821

Conversation

@trautmane

Copy link
Copy Markdown
Collaborator

No description provided.

@trautmane
trautmane requested review from minnerbe and a lite review from Copilot August 21, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new “peak scan JSON”-driven mode for Multi-SEM tile/layer removal, allowing stacks to be trimmed automatically based on per-slab peak scan metadata, and refactors pipeline/CLI plumbing to carry this new configuration alongside the existing explicit per-stack removal list.

Changes:

  • Introduces PeakScanData (JSON + GCS/local reader) and TileRemovalSetup (either peak-scan-driven removal and/or explicit stack list).
  • Updates the Spark Multi-SEM tile removal client to accept --peakScanJson and to route execution via TileRemovalSetup.
  • Updates alignment pipeline parameters to use TileRemovalSetup instead of a raw tileRemovalList.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
render-ws-spark-client/src/main/java/org/janelia/render/client/spark/pipeline/AlignmentPipelineParameters.java Switches pipeline parameter shape from tileRemovalList to TileRemovalSetup.
render-ws-spark-client/src/main/java/org/janelia/render/client/spark/multisem/MultiSEMTileRemovalClient.java Adds --peakScanJson and executes peak-based removal and/or explicit stack-list removal via TileRemovalSetup.
render-ws-java-client/src/main/java/org/janelia/render/client/parameter/TileRemovalSetup.java New serializable setup object for peak-scan-driven removal and/or explicit per-stack removal.
render-ws-java-client/src/main/java/org/janelia/render/client/multisem/PeakScanData.java New model + JSON reader for peak scan data from filesystem or Google Storage.
render-ws-java-client/src/main/java/org/janelia/render/client/multisem/MultiSEMTileRemovalClient.java Adds post-peak scan removal capability and adjusts scan-to-z mapping behavior.
Suppressed comments (1)

render-ws-java-client/src/main/java/org/janelia/render/client/multisem/MultiSEMTileRemovalClient.java:288

  • buildScanNameToZMap() now calls getTileIdsForZ() for every z in the stack, even when removeTiles() only needs to resolve a small set of requested scan names. For large stacks this can add a lot of extra web-service calls and slow removals. Consider reintroducing an early-exit path for the non-peak removal case (e.g., pass tileRemoval.buildScanNamesSet() into buildScanNameToZMap and break once all requested scan names are found), while keeping the full-scan map for peak-scan removal.
        for (final Double z : stackZValues) {

            final List<String> tileIds = dataClient.getTileIdsForZ(stack, z);


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@minnerbe minnerbe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @trautmane! I skimmed all of it, but paid special attention to how the number is handled (z value instead of scan), which seems to be correct.

trautmane and others added 3 commits August 21, 2026 19:54
@trautmane
trautmane merged commit 6846973 into newsolver Aug 22, 2026
2 checks passed
@trautmane
trautmane deleted the remove-post-peak-scans-20260821 branch August 22, 2026 09:12
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.

3 participants