ANTsX / ANTs

Advanced Normalization Tools (ANTs)
Apache License 2.0
1.19k stars 380 forks source link

Problem about the outputs of antsApplyTransforms #1605

Closed songpeilun123 closed 9 months ago

songpeilun123 commented 1 year ago

Hi, everyone,

Recently, I tried to use ANTs to process the fMRI data. Firstly, I used the FSL to do the slice timing correction and head motion correction. Then, due to I have no structural images, I computed the mean functinal data as the template T.nii. I tried to use the ANTs to perform the registration. After mapping the fMRI series to the T.nii by using the command of antsApplyTransforms, I used the MRIcro to check the results. The first 39 volumes look good for me, but the left volumes are not aligned well. Commands are listed as follows:

os.system('antsRegistrationSyNQuick.sh -d 3 -f {} -m {} -o {}'.format(ref_path_name, mov_path1, outname_ants_1)) os.system('antsApplyTransforms -d 3 -e 3 -n linear --float -i {} -r {} -t {} -t {} -o {}'.format(mov_path2, ref_path_name, fmri2T_nlineartrans, fmri2T_lineartrans, outname_ants_2))

ref_path_name: The 3D template T.nii, which is the mean functional data. mov_path1 : the first volume of the funtional data. outname_ants_1: results of the antsRegistrationSyNQuick.sh. mov_path2: the whole 4D functional data. fmri2T_nlineartrans: 1Warp.nii.gz. fmri2T_lineartrans: _0GenericAffine.mat. outname_ants_2: results of the antsApplyTransforms.

Here are the results of the antsApplyTransforms visualized by MRIcro (left is the first volume and the right is the fortieth volume). By the way, each volume of the original data is aligned well. image

ntustison commented 1 year ago

You would need to post the data for us to do any further investigation of this issue.

cookpa commented 1 year ago

The wraparound is an error in the I/O somewhere - registration transforms couldn't do this.

We can try to help if you can post data