Closed andreasmarnold closed 11 months ago
Ah. No, the issue is that we don't take into account the other transformations in the reference image (scale, translate, rotate, shear). Those are defined in addition to the affine.
Thanks for the report!
Just noticed that I again did not consider rotation and shear in my changes.
Also... when thinking about this, I realized that affine transformations (e.g. translation & rotation) are not inherently commutative. Since I don't know exactly in which order napari applies the transformations, I was wondering what's the best way to consider them here.
When trying to transform images that have a scale <1, the resulting transformed image is wrong. Is it possible that this is a result of defining the affine in relation to the reference image in apply_tf (line 66)?
Here's an example to quickly reproduce the problem. However, it will be necessary to use the plugin.