I’m trying to take a subjects full warp to an FOD template and combine it with another full warp.
I am aware transformcompose can take separate affines and nonlinear warps and combine them but it doesn’t work with the full warps.
Is it possible to combine the full warps that contain the affine and the nonlinear warp? Or maybe decompose them so that transformcompose works?
I’m pretty sure you want to be looking at transformconvertwarpconvert () to extract from the full warp format only the specific warp in which you are interested, such that you can then compose it with other transformations.
That’s not it either. It says transformconvert is for converting linear transforms in ITK and FSL into a mrtrix format. I can recompute the transforms using mrregister and save the affine and the nonlinear warp out separately but was seeing if there was an easier and faster way then rerunning mrregister.
You can not compose full 5D warps as they are defined in their respective midways space and we currently have no tools to estimate the midway space between two arbitrary warps. As Rob points out, you can, however, combine 4D deformation fields via using transformcompose. To convert full warps to deformation fields, you’d use warpconvert:
For a transformation chain from image 1 to image 2 with target 3 this should (not tested) extract and combine the linear and nonlinear transformations:
Hi Max
I think I have the same problem, or at least something very similar.
I have a full warp from the population_template process.
I want to apply these two in a single mrtransform step.