Header

How to register a tensor to a scalar image

Submitted by liuc15 on
Category

Dear Okan,

 

I have a tensor image generated by DR TAMAS. I want to transform this tensor image to a scalar image template (T1 or T2).

 

What command should I use?

 

I tried used DTIREG:

 

DTIREG --moving_tensor tensor.nii --fixed_scalars T1_template.nii

 

But it was not working.

 

Should I use the tensor to generate a FA image, and then use ANTS to transform the FA to the T1_template.nii, and then use DR TAMAS to read the transformation from ANTS and apply it to the tensor?

Can DR TAMAS read the transformation files from ANTS?

 

Or there is a more direct way to do it?

 

Thanks a lot!

 

 

 

Submitted by nayaka on Thu, 06/06/2019 - 11:22

Permalink

Hi,

There are several ways in DRTAMAS to co-register the DTI and T1/T2 template. To address your question, it would be helpful to know if your ultimate goal is to co-register the templates or specifically bring the DTI template into the T1/T2 template space?

Amritha

Submitted by liuc15 on Thu, 06/13/2019 - 15:02

In reply to by nayaka

Permalink

 

I have created a T1/T2 template using ANTS, and DTI template using DRTAMAS.

 

Yes, I want to bring the DTI template into the T1/T2 template space.

Submitted by irfanogl on Thu, 06/13/2019 - 15:13

Permalink

Hello,

DRTAMAS is again for tensor operations only.  So what I suggest is to ComputeTRMAp (Trace or in otherwords MD), out of the tensor template. Then use ANTS to register this on to your T1/T2 template.

Then you can combine the affine/diffeomorphic transformations coming out of ANTS and Apply the Transformation to DRTAMAS tensor with "ApplyTransformationToTensor"

 

hope this helps.

 

 

 

Submitted by irfanogl on Thu, 06/13/2019 - 18:03

Permalink

Sorry should have given more details.

 

First you need to convert the affine_transform.mat into a txt with:

ConvertTransformFile 3 affine_transform.mat affine_transform.txt

Then you can use CombineTransformations:

CombineTransformationsWithOutputName -out combined_deffield.nii.gz -trans affine.txt diffeo.nii.gz

Then you can apply it:

ApplyTransformationToTensor  average_template_diffeo_6.nii  combined_deffield.nii.gz average_template_diffeo_6_tranformed.nii  FS your_T2_template.nii

hope this helps.