I would like to calculate an affine transformation matrix from bead images (four images/channels) and apply it to many images (thousands). I used Register Virtual Stack plugin and saved the tranformation parameters as .xml. These can be applies to the same images or other 4 images.
The problem is that the Transform Virtual Stack plugin allows only to have the same number of transformation files in a folder as there are images in another image folder. I dont want to copy thousands of image into batches of four images into folders and thought I could use the TransformJ plugin.
There the problem is that the matrix loaded from TransformJ is a .txt file (tab, comma or space separated) and the matrix look a bit different (e.g. z-dimension). Anyway, I read the documentation of the two plugins and I can transform the parameters from .xml into a matrix from TransformJ, but for some reason the affine TransformJ image is not fully corrected…
Does anyone know, if in general it should be possible to use the parameters derived from Register Virtual Stack (RVS) and apply them within the TransformJ plugin? I thought an affine transformation suppose to be the same math, isnt it?
I realized that the RVS model is using the AffineModel2D and the TranslationModel2D in the xml. Does anyone know why (since translation is just one part of affine transformation)? For most of the xml the TranslationModel2D is just [0,0], but others are not. I found with some test images, that if I combine/add the TranslationModel2D parameters to the translation parameters of the AffineModel2D, then the model makes sense and is consistent for similar image. So, I dont think that this actually the problem, and I also see insufficient correction in cases where TranslationModel2D is [0,0].
I could also provide image to reproduce the problem I have. Unfortunately I cannot write Java plugins, then I guess one could write a plugin that loades one transformation file and applies it to the current image!?
Any help is very much appreciated! Thanks in advance!
All the best for 2017,