airlab-unibas / airlab

Image registration laboratory for 2D and 3D image data
Apache License 2.0
408 stars 92 forks source link

Rigid registration for non-square images #8

Closed amirid closed 5 years ago

amirid commented 5 years ago

Hi,

In the following function, how do you handle the non-square images? I think the magnitude of displacement vectors should be tuned according to the ratio of image length and width.

https://github.com/airlab-unibas/airlab/blob/051f9364e0bfb9974ebbaef271765183f25c08f6/airlab/transformation/pairwise.py#L89-L105

RobinSandkuehler commented 5 years ago

Hi, we handle non-square images by creating an image grid (-1, -1) -- (1, 1) for the image. If the image is not a square image, the delta of the grid is different for the width and the height. This leads to an implicit scaling for the height and the width. I hope this helps, otherwise please let me know.