Skip to content

Conversation

@FIrgolitsch
Copy link
Contributor

@FIrgolitsch FIrgolitsch commented Nov 12, 2025

I've added a rigid registration step before the affine registration, only if the affine is chosen. Both transforms are then placed in a composite transform and saved to disk.
Other changes:

  • Reduced the max iterations to 1500
  • Reduced the gradient magnitude tolerance to 1e-6 by default. I looked around a little, and it seems for noise images the recommended value is 1e-6 to 1e-8. As our images are quite noisy, I reduced the value. Quick testing showed it looked fine, and the convergence times are so much faster now (naturally). The register_pairwise step now only takes about 10 minutes.

Closes #79

@CHrlS98 Let me know what you think!

@FIrgolitsch FIrgolitsch requested a review from CHrlS98 November 12, 2025 03:57
@FIrgolitsch FIrgolitsch linked an issue Nov 12, 2025 that may be closed by this pull request
@FIrgolitsch
Copy link
Contributor Author

Some quick images of the reconstruction with this:
image
image

@FIrgolitsch
Copy link
Contributor Author

FIrgolitsch commented Nov 12, 2025

Next, I want to try adding masks. I think the registration process is still trying to register on the background tiles. The masks can also be used to clean up any background noise.

@FIrgolitsch
Copy link
Contributor Author

FIrgolitsch commented Nov 12, 2025

I've added the masks. Here are some updated images of the reconstruction. The settings are exactly the same as the previous images, just with the new masks. I still need to verify the mask creation; it's a very simple Otsu threshold right now. As the maskless version seems better, I think it needs some work still.
image
image

@CHrlS98
Copy link
Contributor

CHrlS98 commented Nov 12, 2025

Also a comment on the masks. Since the normalization is done prior to registration, the background should be pretty close to 0 when registration occurs.

@FIrgolitsch FIrgolitsch force-pushed the 79-improve-pairwise-registration branch from d90e9c3 to 180188a Compare November 13, 2025 05:05
@FIrgolitsch FIrgolitsch force-pushed the 79-improve-pairwise-registration branch from 180188a to 186aa53 Compare November 13, 2025 05:07
@FIrgolitsch
Copy link
Contributor Author

@CHrlS98 I think it's ready. The channel logic was a bit of a mess, but I got there. I also changed all the copy directives for the output files to move. I don't think we should duplicate some of that data, as it can quickly get out of hand.

…oid file duplication and persist data after work directory removal
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.

Improve Pairwise Registration

3 participants