Skip to content

Multisem inpainting - #234

Merged
trautmane merged 16 commits into
newsolverfrom
multisem-inpainting
Sep 12, 2026
Merged

Multisem inpainting#234
trautmane merged 16 commits into
newsolverfrom
multisem-inpainting

Conversation

@minnerbe

Copy link
Copy Markdown
Collaborator

This PR updates the inpainting code for wafer 60/61 data:

  • For every sfov in the stage coordinates of an aligned stack, it computes how far that sfov is from the ROI as given in the xlog data.
  • The first layer of the aligned stack is treated as the true position of sfovs and a point cloud is generated from that (coordinates = sfov centers from render, values = distance from ROI from xlog).
  • For the exported stack (N5), each chunk is put in the global coordinate system its distance to the ROI is computed by interpolation from the point cloud.
  • For all chunks that are close enough to the ROI (i.e., closer than a given threshold in micron), pixels are inpainted if the mask has a values < 255.
  • If a chunk is modified, it is saved in the original dataset and the original chunk is backed up to a different dataset (so we could go back).

This seems to work reasonably well: it's fairly quick, requires no manual intervention, and even caught some holes that were way too small for me to see on a downsampled mask. From a method point-of-view, I think this is done.

@trautmane let me know if I should add some support for multi-stack setups.

templiert added a commit to templiert/EM_recon_pipeline that referenced this pull request Aug 4, 2026
Obsoletes the heuristically-discovered magic 5 MFOV offset in saalfeldlab/render#234
Conflicts:
	render-ws-spark-client/src/main/java/org/janelia/render/client/spark/multisem/Wafer6061Inpainter.java

Kept the rewritten inpainter from this branch and applied the n5-universe
StorageFormat rename from newsolver. bigdataviewer-core 10.6.11 dropped
bdv.export.Downsample; use the identical copy in n5-spark
(org.janelia.saalfeldlab.n5.spark.util.Downsample), which is also what
N5DownsamplerSpark uses to build the pyramid.
@trautmane
trautmane merged commit 3ae94dd into newsolver Sep 12, 2026
2 checks passed
@trautmane
trautmane deleted the multisem-inpainting branch September 12, 2026 19:09
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