Applying bUnwarpJ results to images in MATLAB

I am registering some brain anatomy images from two-photon microscopy. BUnwarpJ produced nice results, such that the deformation of the brain tissue was corrected.

As I have a pipeline for data analysis written in MATLAB, I was wondering whether I can use the results produced by bUnwarpJ (the direct_tranf.txt files) in MATLAB, to transform other images with the same deformation.

I have checked the direct_tranf.txt file. It seems not so easy to apply it to images without bUnwarpJ. The other option was converting it to the “raw” format. However, it is still mysterious to me how I can apply the raw transformation to images outside ImageJ.

Could you give me any suggestions on how to do this? I have uploaded two sample images and the bUnwarpJ results as an example to Dropbox at here

Thank you very much and cheers,