# 5ttgen: Provided T2 image does not match input T1 image

**URL:** <https://community.mrtrix.org/t/5ttgen-provided-t2-image-does-not-match-input-t1-image/1204>\
**Category:** Uncategorized\
**Created:** [September 29, 2017, 3:17pm UTC](https://community.mrtrix.org/t/5ttgen-provided-t2-image-does-not-match-input-t1-image/1204 "2017-09-29T15:17:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olga](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/o/57b2e6/32.png) [@Olga](https://community.mrtrix.org/u/Olga)\
**Post date:** [September 29, 2017, 3:17pm UTC](https://community.mrtrix.org/t/5ttgen-provided-t2-image-does-not-match-input-t1-image/1204/1 "2017-09-29T15:17:59Z")

</div>

Hello experts,

I’m trying to incorporate T2 image along with a T1 to generate 5tt. I am using FLIRT / transformconvert / mrtransform to register images. FLIRT -in T1 -ref B0 2 followed by transformconvert and mrtransform (inverse) to get coregistered high resolution T1. Now, I’ve tried to bring my T2 “to condition” by registering it to: 1.initial T1 and 2. T1-coreg (which is a result form step 1). In both cases FLIRT is followed by transformconvert / mrtransform. Results of both visually are very similar. Neither result 1 or 2 gets through giving error: Provided T2 image does not match input T1 image. Please advise!

Thanks,  
Olga

---

<div class="post-metadata">

**Author:** ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Post date:** [October 8, 2017, 4:36am UTC](https://community.mrtrix.org/t/5ttgen-provided-t2-image-does-not-match-input-t1-image/1204/2 "2017-10-08T04:36:55Z")

</div>

Hi Olga,

The way that the `5ttgen fsl` script incorporates a T2 image into the segmentation process is by passing both to FSL’s `fast` command, where both image modalities are used within the hMRF model. This requires that both images be defined on the same image grid. Therefore our usual advice in the context of registration of altering just the image header transformation matrix and specifically _not_ re-gridding the image data does _not_ apply in this instance: the T2-weighted image _must_ be explicitly re-sampled to the voxel grid of the T1-weighted image.

Rob

---

<div class="post-metadata">

**Author:** ![Olga](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/o/57b2e6/32.png) [@Olga](https://community.mrtrix.org/u/Olga)\
**Post date:** [October 9, 2017, 3:41pm UTC](https://community.mrtrix.org/t/5ttgen-provided-t2-image-does-not-match-input-t1-image/1204/3 "2017-10-09T15:41:20Z")

</div>

Thank you, Rob! By now I’ve completed 5tt generation without T2, but will try in a few days with the T2 - curious to see the difference.

Olga
