Kindly ask you to look through my problem.I want to find inverse affine transformations and save them to .xml files.
I used RVSS tool in FIJI and saved transformations in .xml files to use after. Now I have info of affine tranformations structure and know createInverse() method and toXML method which allow to find inverse transform, write it to another .xml file and save it, but I m not java or whatever script writer and do not know how to perform it. I tried to use Record plugin in FIJI, but it did not help me. All useful links:
If both are Fiji compatible then just download them to your plugins folder ( the full plug in not the truncated version, restart Fiji (or ImageJ) and they should be in your Plugins menu.
I think I can help with this, but first a question - what would you like to do with the xml’s storing the inverses?
Also, would you mind posting the text of one of your xml’s to this thread, so that I can make sure we’re on the same page?
Thanks you! Unfortunately it did not work out.
Currently I managed to use createinverse() function for AffineModel2D. It look like this:
transf_dir = “C:/Users/Kirill/Desktop/on Research Term 5/Tests/Test No 2 05.11.2018/Test with Slice/Input/”
transf_name = “0001.xml”
input_CoordinateTransformList = Transform_Virtual_Stack_MT.readCoordinateTransform(transf_dir + transf_name);
input_AffineModel2D = input_CoordinateTransformList.get(0);
print “Initial direct transformation parameters are :”
shows transforms in"C:/Users/Kirill/Desktop/Test/Input/0000.xml"
output_AffineModel2D = input_AffineModel2D.createInverse();
output_CoordinateTransformList = CoordinateTransformList();
print ("\n Inverse transformations are parameters:" )
#Creates new .XML file and writes transformations to it.
New_xml = open(“C:/Users/Kirill/Desktop/on Research Term 5/Tests/Test No 2 05.11.2018/Test with Slice/Input Inverse/0001.xml”,“w+”);
So now I searching how to find Inverse for TranslationModel2D and make it cycle for batch of .xml files.
Surely, have a look a this one .xml:
<iict_transform class=“mpicbg.trakem2.transform.AffineModel2D” data=“0.9997599304420619 4.030862279563358E-4 -0.0021506696697330976 1.0044515955071915 16.048494915486707 -3.172515615209477” />
<iict_transform invertible=“true” class=“mpicbg.trakem2.transform.TranslationModel2D” data="-15.0 3.0" />
It looks like you’re most of the way there.
TranslationModel2D's also have a
Just keep in mind that to get the total inverse of a list of concatenated transforms is a list of the individual inverses in reverse order.
inverse([ A, B ]) = [ inverse(B), inverse(A) ]