# Averaging two TDI maps

**URL:** <https://community.mrtrix.org/t/averaging-two-tdi-maps/2211>\
**Category:** Uncategorized\
**Created:** [January 27, 2019, 6:58pm UTC](https://community.mrtrix.org/t/averaging-two-tdi-maps/2211 "2019-01-27T18:58:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeydabadi](https://community.mrtrix.org/user_avatar/community.mrtrix.org/zeydabadi/32/1425_2.png) [@zeydabadi](https://community.mrtrix.org/u/zeydabadi)\
**Post date:** [January 27, 2019, 6:58pm UTC](https://community.mrtrix.org/t/averaging-two-tdi-maps/2211/1 "2019-01-27T18:58:55Z")

</div>

Hi,  
I used `tckmap` to create TDI maps from two different shells of the same subject.  
I wanted to average these two maps but I got the error `"[ERROR] Dimensions of image 1400_TDI.mif do not match those of first input image 700_TDI.mif"` then I used `mrinfo` and realized that the dimension and transform are slightly different between the two maps.  
Any idea why this happens? and in case that this is normal how I can average the TDI maps?

Thanks,  
Mahmoud

---

<div class="post-metadata">

**Author:** ![jdtournier](https://community.mrtrix.org/user_avatar/community.mrtrix.org/jdtournier/32/2594_2.png) [@jdtournier](https://community.mrtrix.org/u/jdtournier)\
**Post date:** [January 30, 2019, 8:53am UTC](https://community.mrtrix.org/t/averaging-two-tdi-maps/2211/2 "2019-01-30T08:53:09Z")

</div>

This will most likely be due to your use of the `-vox` option only in the `tckmap` call. When that’s all it’s given, `tckmap` will try to figure a suitable bounding box for the output image based on the track data (by default, the first 10k streamlines, from memory). Since the tractography is typically at least a bit random, the bounding box will generally come out slightly different for different tractograms.

To fix this, the simplest is probably to add the `-template tdi1.mif` option to the second `tckmap` call, where `tdi1.mif` is the output of the _first_ `tckmap` call.
