muschellij2 / extrantsr

R Package to build on ANTsR
GNU General Public License v3.0
6 stars 3 forks source link

Output of the transformatio matrix into a .mat or .txt file. #4

Closed Filojoe closed 7 years ago

Filojoe commented 7 years ago

Hello. I have a comparably simple and maybe ridiculous problem that i can´t find a solution for.

I am performing image registration of some quantitative MRI sequences on a T1w template (i.e. we use the 3D T1w image of the same study subject as the template). However my knowledge about R and antsR are quite rudimentary so my code includes only the absolute necessary lines:

filename <- ants_regwrite(filename = file, retimg = TRUE, outfile = "data/output/somefile.nii.gz", template.file = t1_template, interpolator = "Linear", typeofTransform = "SyN", verbose = TRUE)

Registration works surprisingly well and we are happy with the result of the outfile. However, with this code, only the outputfile (i.e. the registrated image.nii.gz) is created as a new file in my outputfolder. What i desperately need is a output code that creates the transformationmatrix as a single file as well. So, my aim is to get two files per registration: one registrated outfile/image and besides the transformation matrix.

Thanks you so much for helping!

muschellij2 commented 7 years ago

Please use the registration function - it's like ants_regwrite 2.0 - this gives the output you want.