HCP deformation files for registration in MNI template

Dear MRtrix community,

I created with MRtrix a template FOD from a dataset of 5 subjects taken from the HCP, and I also have an MNI template of 2mm. I would like to register the FOD and the tck files already created to the MNI space but following this guide Warping FOD and tck files to MNI template I discovered there are 2 files (standard2acpc_dc.nii.gz and acpc_dc2standard.nii.gz) which I don’t find in their website.

Can some of you kindly send me those files via email/wetranfer or suggest to me the link where I can download them?

Thanks a lot.


Hi Tommaso

They’re a bit tricky to find, but those files should be available in the folder <subject>/MNINonLinear/xfms:

$ aws s3 ls s3://hcp-openaccess/HCP_1200/111009/MNINonLinear/xfms/         
2018-08-16 11:24:53    3013206 NonlinearRegJacobians.nii.gz
2018-08-16 11:24:53    9761230 acpc_dc2standard.nii.gz
2018-08-16 11:24:53    8777653 standard2acpc_dc.nii.gz

(I use aws to access HCP data from the command line, but you should be able to see the same directory structure in the online download interface)

hope that helps!


Hi Fiona,

Thanks a lot for your help! I found the files you meant following your suggestion but I thought these files were not present in each subject but one general which summarized all the data. Because I tried to follow the steps for the registration of both tracts and FOD to MNI but doesn’t work at all :confused: maybe i am doing something wrong.

THanks again


Hmm, I’m not sure what you mean by this I’m afraid.

Could you be more specific about how it doesn’t work? Are there errors or the results just don’t look right? There’s another thread here about trying to use those transformation files, does that look like the same problem you are facing? If so, the solution at the end of the thread might help you :slight_smile:

Hi Fiona,

I also faced this problem.
Thanks for your guidance, I checked the topic you recommended, however, I found that the solution mentioned may not be adaptable from now on.
I ran the command and got the error below:

mrconvert standard2acpc_dc.nii.gz tmp-[].nii -force
zsh: no matches found: tmp-[].nii

Have you met this problem? How do you solve it?

In my opinion, this command aims to separate the standard2acpc_dc.nii.gz into three temporary nii each contains one axis. So I try running the following commands to do the same(just my thought…) thing.

mrconvert standard2acpc_dc.nii.gz -coord 3 0 -axes 0,1,2 tmp_1.nii
mrconvert standard2acpc_dc.nii.gz -coord 3 1 -axes 0,1,2 tmp_2.nii
mrconvert standard2acpc_dc.nii.gz -coord 3 2 -axes 0,1,2 tmp_3.nii

mv tmp_1.nii x.nii
mrcalc x.nii -neg tmp_1.nii -force
mrcat tmp_?.nii tmp.nii
warpconvert tmp.nii displacement2deformation mni2acpc_mrtrix.nii.gz -force
rm x.nii tmp_?.nii

tcktransform fibs_1M_act_sift.tck mni2acpc_mrtrix.nii.gz fibs_1M_act_sift_MNI.tck

If we just assess the result, I think it makes sense. However, I’m not sure whether it’s an appropriate method.

I’d appreciate if you could provide some comments.


OK, this is due to macOS deciding to move to the zsh shell, rather than the default bash shell found in most other flavours of Unix (and previous version of macOS). We just need to ‘tell’ zsh not to try to interpret the square brackets, which should hopefully be possible with a simple pair of inverted commas:

mrconvert standard2acpc_dc.nii.gz 'tmp-[].nii' -force
1 Like

yep, while I do love zsh the nomatch behaviour is très annoying. You can disable it with

setopt +o nomatch
# To revert change:
#setopt -o nomatch  

and then the -[] syntax should work as-is. (This will affect other globbing behaviours you may or may not be used to so worth reading up to be sure.) Or use quotes as Donald suggests.

In any case, your workaround looks fine to me :slight_smile:


Thanks for your simple and effective solution!
I did ignore that the error is about zsh, next time I’ll check more carefully.

Thanks for your quick reply and for sharing your solution!
I tried your and Dr.Tournier’s solution, and both of them works.