czbiohub-sf / shrimPy

shrimPy: Smart High-throughput Robust Imaging & Measurement in Python
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

Registration V2 #102

Closed edyoshikun closed 6 months ago

edyoshikun commented 10 months ago

This PR adds the following:

TODO:

Future PRs:

ieivanov commented 10 months ago

In the final version of the registration pipeline we should rotate the volumes by 90 deg such that they are in landscape mode rather than portrait mode (i.e. with larger width than height). Our brains process landscape aspect ratio more naturally and our monitors are built that way too. This is not critical now, but may affect some of the earlier design choices.

edyoshikun commented 8 months ago

@talonchandler let's schedule some time to go over this. Some design choices that we should also think about:

talonchandler commented 8 months ago

Excellent! @edyoshikun and I just finished a paired session and put together this list of (very superficial) TODO items. Thanks for all of your effort here @edyoshikun.

@edyoshikun I've tagged you on the ones that you're best suited to handle. I'll handle the rest.

talonchandler commented 8 months ago
talonchandler commented 8 months ago

I've run all of the individual steps, and I understand how everything works. Early next week I'll run this on Soorya's data from hummingbird to test it further, and I'll give the code a line-by-line look.

@edyoshikun feel free to comment on my changes if you'd like to take a look.

talonchandler commented 8 months ago

@ieivanov

we should rotate the volumes by 90 deg such that they are in landscape mode rather than portrait mode (i.e. with larger width than height)

@edyoshikun and I discussed this and we'll suggest using napari's rotate feature for landscape (maybe even triggering rotation if Y>X in some scripts). If we want to change the convention for the y axis, we think that would be a larger change that would break convention (at least wrt DaXi and Sapoznik papers). We're open to more discussion.

ieivanov commented 8 months ago

Quick comment: I found the source and target nomenclature quite confusing. Instead, registration algorithms (including ants) use fixed and moving names to refer to the two images being registered. We should switch to that naming

ieivanov commented 8 months ago

In 91375274c06779ddd76561b7e46c1fbafd60ddf4 I've tried to develop what I think is a bit more intuitive manual registration workflow. Here are the highlights:

Talon and Ed, let me know what you think

ieivanov commented 8 months ago

input_shape_zyx should be part of RegistrationSettings as it is needed for the LIR cropping

ieivanov commented 8 months ago

A few observations after working through the registration pipeline:

edyoshikun commented 8 months ago
ieivanov commented 8 months ago

@edyoshikun can you revert the last two commits and add them on a branch off of this one? The registration is currently working and useful, we should be careful not to break it.