TVMean

118 views
Skip to first unread message

Jose

unread,
Feb 17, 2012, 5:15:07 PM2/17/12
to DTI-TK

I am new to imaging so some of these questions might be ridiculously
basic. But here goes. So I'm trying to build an atlas, but first I
need to build a template. I am trying to use TVMean command for this
as per the tutorial. However the resulting template has a lot more
slices than the original images. Is this supposed to happen? What
exactly is then each slice in the output file? Also, when I take the
FA map of the template using TVtool, it looks as if the background in
the original image wasn't masked. But I'm pretty sure the original
image was masked. Why would this happen? Thanks!

Hui Zhang

unread,
Feb 17, 2012, 5:36:44 PM2/17/12
to dt...@googlegroups.com
Dear Jose,

> I am new to imaging so some of these questions might be ridiculously
> basic. But here goes. So I'm trying to build an atlas, but first I
> need to build a template. I am trying to use TVMean command for this
> as per the tutorial. However the resulting template has a lot more
> slices than the original images. Is this supposed to happen?

Depending on exactly what you did. It'll be useful if you can provide
the exact sequence of commands you used. Tell us about the properties
of the input volumes. (Try VolumeInfo on one of your input volumes and
post its output)

> What
> exactly is then each slice in the output file? Also, when I take the
> FA map of the template using TVtool, it looks as if the background in
> the original image wasn't masked. But I'm pretty sure the original
> image was masked. Why would this happen?

It'll be helpful if you can post a screenshot of what you see.

Gary

Jose Barona

unread,
Feb 27, 2012, 6:26:37 PM2/27/12
to dt...@googlegroups.com

  Dear Gary,

  Thank you so much for your quick reply! Sorry it took me so long to reply but I was away from the lab for most of last week. Anyway, here's what I did, I'll try to be as specific as I can:


As I said I attempted to create a template using DWI images from 3 subjects.
Voxel dimensions are 1.875x1.875x5.00 mm
Each DWI image is a nifti file with 432 slices I split using the FSL command fslsplit into 16 volumes of 27 slices each.
I then used the camino command anlyzedti to extract the tensor information from these volumes.
Then for each subject I created a nifti tensor file using:
    ImageToTensorVolume subject_d hdr subject_tensor.nii.gz 1
I then scaled this file as per the tutorial using:
    TVtool -in subject_tensor.nii.gz -scale 10,000,000,000
Created text "tensors.txt" with the filename of all three tensor files.
Used:
   TVMean -in tensors.txt -out template.nii.gz
I also did some resampling using:
   TVResample -in template.nii.gz -align center -size 128 128 64 -vsize 1.875 1.875 5.00
Also got the FA map:
   TVtool -in template.nii.gz -fa   

As I mentioned, I am new to this so I am not quite sure what the template is. My guess is that it is an average of the tensor for each direction on each slice? Also, as I mentioned, I keep getting an FA map with a noisy background. However, I made sure that all the subject images were brain masked with the background all set to 0 before processing. Where is this noisy background coming from? I am attaching a screenshot of both the template and the FA map and I can provide more details/images if needed.

Thanks so much for taking the time to help with this, I really do appreciate it!

 Regards,
                Jose Barona
template.jpg
template_fa.jpg

Hui Zhang

unread,
Feb 28, 2012, 6:02:55 AM2/28/12
to dt...@googlegroups.com
Hi Jose,

As I said I attempted to create a template using DWI images from 3 subjects.
Voxel dimensions are 1.875x1.875x5.00 mm
Each DWI image is a nifti file with 432 slices I split using the FSL command fslsplit into 16 volumes of 27 slices each.
I then used the camino command anlyzedti to extract the tensor information from these volumes.
Then for each subject I created a nifti tensor file using:
    ImageToTensorVolume subject_d hdr subject_tensor.nii.gz 1

It seems okay so far.
 
I then scaled this file as per the tutorial using:
    TVtool -in subject_tensor.nii.gz -scale 10,000,000,000

Not sure you have the right number of zeros in the scaling factor.  Download our example data set and check the range of the mean diffusivity.  If you have done it right, your MD range should be similar to that of the example.
 
Created text "tensors.txt" with the filename of all three tensor files.

You missed a number of important steps here.

I'm not sure if you are looking at the right tutorial.  Here is the link to the most current version


I quote the relevant passage below:

Hope that helps.

Gary

Jose Barona

unread,
Mar 2, 2012, 3:35:22 AM3/2/12
to dt...@googlegroups.com

  Dear Gary,

 Thanks again for your response. I realized I was doing multiple things wrong, including but not limited to the scaling part. I just want to ask again just to be sure, so the template obtained with TVMean is just an image with the average value of each tensor for all the subjects, is that correct? I'm sorry if some of these questions are too obvious, but like I said I am new to MRI and I can't find documentation regarding this specific command. Thanks again for your help, I really do appreciate it!

 Regards,
                  Jose

Hui Zhang

unread,
Mar 2, 2012, 7:03:17 AM3/2/12
to dt...@googlegroups.com
Hi Jose,
 
 Thanks again for your response. I realized I was doing multiple things wrong, including but not limited to the scaling part. I just want to ask again just to be sure, so the template obtained with TVMean is just an image with the average value of each tensor for all the subjects, is that correct? I'm sorry if some of these questions are too obvious, but like I said I am new to MRI and I can't find documentation regarding this specific command. Thanks again for your help, I really do appreciate it!

 A template is conceptually an object to represent some canonical or standard space.  In the case of the template we are interested in creating with diffusion data, that space should describe not only the standard locations of various parts of the neuroanatomy but also the typical diffusion properties at the corresponding locations (e.g., mean diffusivity and fractional anisotropy).

DTI-TK provides a series of steps to create such a template from the multi-subject diffusion data you provide. The basic idea is that if you somehow have a set of aligned images, all you have to do to create a suitable template is to simply average them.  TVMean is the tool that does the averaging.  The bulk of DTI-TK provides a mechanism for you to align your images as good as possible.  In combination, they hopefully give you some nice template in the end.

Gary


Reply all
Reply to author
Forward
0 new messages