How to combine affine and full warp

Hi
I am trying to combine two transformation operations into a single operation to avoid double re-slicing.

I have a population_template from a number of DWI scans.
The template creation process worked great, and I am happy. However the final space for my data should be aligned with an ACPC dataset I have. It is rather easy to align the template with the ACPC image using an affine transform. (linear but not rigid).
However I want to transform the input data from the template into the ACPC space. I have made a small image to illustrate what I want:


It sounds to me like a job for transformcompose, but that function does not seem to work with full_warps, and it certainly does not like combining it with an affine transform txt.
Suggestions?
One I idea I have is using ID files?
Best
Mark

Hi,
You can convert your txt to mif format by:

warpinit {your template image} warp_init.mif
mrtransform warp_init.mif -linear affine.txt -template {your ACPC image} -interp linear -nan warp_affine.mif

And then use transformcompose to combine them. transformcompose should work with warp images, and if not, your full_warp.mif might not be in deformation format. Trywarpconvert. You might need something like:

warpconvert full_warp.mif warpfull2deformation  deformation.mif

and use deformation.mif.
Hope it works.

Shen