jni / affinder

Quickly find the affine matrix mapping one image to another using manual correspondence points annotation
https://jni.github.io/affinder/
BSD 3-Clause "New" or "Revised" License
17 stars 13 forks source link

multi-time-point multi-channel issues #25

Open VolkerH opened 3 years ago

VolkerH commented 3 years ago

Hi @jni,

just a brief placeholder for something that I noticed today.

When using a dataset with channel order (c,y,x) and 3 channels, napari loads this as if it was a time-series or Z-stack. After clicking 3 points with affinder I noticed that it didn't switch to the other layer. After clicking a 4th point it crashed. Looking at the error message I interpret the behaviour as affinder thinking it needs to align volumes or some other dimension misinterpretation.

As some users may want to register a single frame to a time series, or several multi-channel time-series on top of each other the interpretation of the dimension becomes important. I heard there is a guardian of dimensions keeping an eye on such matters.

Can try and create a more detailed report in the coming days, but I guess as affinder is still WIP maybe this is already on your radar.

jni commented 3 years ago

Yeah, I expect that this would work in the far future. Indeed the idea was for affinder to be able to align 3D volumes, for which you need four points before you start. I guess based on what you're saying, one of your images had 3 channels, and the other one was maybe 2D only? That would indeed cause a crash.

For now, affinder is assuming that all the dimensions of both images are spatial, and that both images have the same shape. We can probably add some UI elements to select which axes to align, and then affinder can create points layers of the correct dimensionality. Having said that, it will only work with trailing axes until napari is smarter with its axis matching.