# Registration of structural and diffusion weighted data

**URL:** <https://community.mrtrix.org/t/registration-of-structural-and-diffusion-weighted-data/203>\
**Category:** Uncategorized\
**Created:** [May 4, 2016, 6:44pm UTC](https://community.mrtrix.org/t/registration-of-structural-and-diffusion-weighted-data/203 "2016-05-04T18:44:56Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![Lucius](https://community.mrtrix.org/user_avatar/community.mrtrix.org/lucius/32/1156_2.png) [@Lucius](https://community.mrtrix.org/u/Lucius)\
**Post date:** [October 27, 2017, 7:24am UTC](https://community.mrtrix.org/t/registration-of-structural-and-diffusion-weighted-data/203/22 "2017-10-27T07:24:27Z")

</div>

Hi @SuperClear,

yes, in the end it worked.  
Are both your images 3d and not one 3d and the dwi 4d?  
You can use the command provided by @maxpietsch here: [ants reg](https://community.mrtrix.org/t/warping-tck-files-using-flirt-fsl/459/8).

You could use this to get get a 3d dwi before using above mentioned command:

`ExtractSliceFromImage 4 anonym_b0.nii anonym_b0_volume0.nii.gz 3 0`

then it should work.

With epi\_reg I got as well huge data-sets, so I didn’t continue to use that.

For registration from t1 to mni152 i use the betted t1 (skullstrip via fsl bet) and register it with:

`flirt [options] -in <inputvol> -ref <refvol> -omat <outputmatrix>`

and use then the generated .mat file for other data sets from the same aquisition:  
`flirt [options] -in <inputvol> -ref <refvol> -applyxfm -init <matrix> -out <outputvol>`

It seems to me that your images are not in talairach space, since for that, the anterior and posterior commissure should lie on a horizontal line.  
But I think one of the experts should comment on those processes.  
Still, I hope that helped a bit.

Best regards, Lucius

---

_[View the full topic](https://community.mrtrix.org/t/registration-of-structural-and-diffusion-weighted-data/203)._
