ANTsX / ANTs

Advanced Normalization Tools (ANTs)
Apache License 2.0
1.21k stars 381 forks source link

4D template constructed problem using antsMultivariateTemplateConstruction2.sh #1327

Closed lzh-znso4 closed 2 years ago

lzh-znso4 commented 2 years ago

Hi, ANTs experts,

I'm trying to construct a 4D DTI tensor template by using antsMultivariateTemplateConstruction2.sh script. Here is my command:

antsMultivariateTemplateConstruction2.sh -d 4 -o T_ -a 0 -i 4 -g 0.2 -j 10 -c 2 -w 1 -n 0 -m CC -r 1 -q 80x60x40x20 *.nii.gz

The input files are:

The input images are 20 subjects' 4D DTI tensor images. Each DTI tensor image contains 6 tensor elements listed in the 4th dimension. All input images are pre-aligned in MNI space using antsRegistrationSyN.sh. I set the dimension parameter '-d 4' while it doesn't seem to work. The command still followed the setting that the parameter is '-d 3'. The following is some printed information:

Creating template T_template0.nii.gz from a population average image from the inputs. DTI_tensor_MNI_sub_1.nii.gz DTI_tensor_MNI_sub_2.nii.gz DTI_tensor_MNI_sub_3.nii.gz

bigimage 4 maxSize [193, 229, 193] Setting physical space of output average image based on largest image Averaging 3 images with dim = 3 vector components 1 reading DTI_tensor_MNI_sub_1.nii.gz reading DTI_tensor_MNI_sub_2.nii.gz reading DTI_tensor_MNI_sub_3.nii.gz writing output Sharpening method none ......

The dimension is still 3. Is there any mistake in my command?

For now I consider a roundabout solution. I have succesfully constructed a 3D template (DTI FA template of same subject cohort) before and there is a final warped deformation field file of each subject's FA map. Can I just apply the warped deformation field on the DTI tensor image and average them according to the subjects to be the final tensor template? Is the performance consistent with the true script-constructed-template?

Thank you for your help!

cookpa commented 2 years ago

Unfortunately there's no tensor registration metric available, so you have to use a proxy measure like FA but you can do a multivariate registration (-k), for example you could use FA and axial diffusivity together.

After registration, you can warp the tensor images using antsApplyTransforms with the -e option.

lzh-znso4 commented 2 years ago

OK. Thanks for your advice. I'll try it.