MATLAB: Display the content of a tform matrix

imregtformtformtransformation

I am fusing two tomographic images using imregtform. I use it like that:
[optimizer,metric] = imregconfig('Multimodal')
trans_matrix = imregtform(moving,fixed,'translation',optimizer, metric)
imR2 = imwarp(imR,trans_matrix,'OutputView',imref2d(size(imR)));
It works nicely, the new warped image imR2 is overlapping the fixed one. Now, as I have thousands of images to treat, I want to get the tform matrix once and apply it to all other images. My problem is where I work, we have a task manager to use our cluster and I cannot put the tform matrix as in input. I've been searching but I can't find a way to get the content of tform properly (in this case it is a
affine2d with properties:
T: [3x3 double]
Dimensionality: 2
And if I am correct the T matrix is in this form: [1 0 0; 0 1 0; tx ty 1] It is possible to display these tx and ty? or the full matrix. I have tried
trans_matrix = imregtform(moving,fixed,'translation',optimizer, metric,'DisplayOptimization',1)
which shows the verbose, I get the sucessive pyramid steps but I don't understand what the Mattes Mutual information is.

Best Answer

Got it:
tx=trans_matrix.T(3,1)
ty=trans_matrix.T(3,2)