# DWI, DTI, Tractography

**URL:** https://discourse.slicer.org/t/dwi-dti-tractography/14202
**Category:** Support
**Created:** [October 22, 2020, 10:52am UTC](https://discourse.slicer.org/t/dwi-dti-tractography/14202 "2020-10-22T10:52:02Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Mohammed\_Alahmari](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammed_alahmari/32/8552_2.png) [@Mohammed\_Alahmari](https://discourse.slicer.org/u/Mohammed_Alahmari)
#### Post date: [October 22, 2020, 10:52am UTC](https://discourse.slicer.org/t/dwi-dti-tractography/14202/1 "2020-10-22T10:52:02Z")

</div>

Operating system: Windows  
Slicer version: 4.11.0  
Expected behavior:  
Actual behavior: Hi everyone

 ![Capture](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/3/c36db264d93b76b2d0b6b1124457a1b13b1762d1.jpeg) ,  
I have been given a new DWI project. The project compares different sequencing parameters to visualize the facial nerve. I’m a beginner to the MRI field including DTI and DWI topics. I read the tutorial of SoniaPujol entitled “WhiteMatterExplorationTutorial\_SoniaPujol-RonKikinis” and could follow the steps on the tutorial dataset successfully. However, when I tried to apply the same steps to my data, I couldn’t. I tried to find the differences between my data and the dataset of the tutorial and found:

- The tutorial dataset includes in one file, 41 volumes acquired with 41 different diffusion-sensitizing gradient directions, and one baseline image acquired without diffusion weighting.
- While I have 3 images’ files for each sequence parameters:
- 1 file contains the baseline image (b0)
- 1 file contains the DW images
- 1 file contains the T2 images that we want to use for selecting the ROI.  
I read about image registrations and masking on the Q&A page, but I get confused, there are too many topics and I don’t know which one suits my data. So, can anyone tell me the steps (in order) I should follow to prepare my data for FN tractography?

Attached is a screenshot of my files.

Best regards  
Mohammed

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [October 22, 2020, 6:10pm UTC](https://discourse.slicer.org/t/dwi-dti-tractography/14202/2 "2020-10-22T18:10:59Z")

</div>

Hi @Mohammed_Alahmari -

Unfortunately it looks like you may only have a partial dataset and there’s not much you can do until you get ahold of some more information. I’ll give you some hints, but the field of diffusion imaging has a lot of “gotcha” issues that make it very hard to work with data unless you are very familiar with exactly how it was produced (what software and what conventions were used).

If the file marked “DWI” is a raw diffusion weighted scan, then you would need to have the `bvals` and `bvecs` files in order to interpret it for tractography.

The fact that it’s got `DTI` in the filename indicates it may already be estimated tensor voxels, in which case you may be able to load and work with it (try to open it in Slicer and if it’s a tensor it may load, but still may not be correct because conventions vary about how tensors are represented in nii files).

If the file is DTI tensors, then there’s a good chance you can load it and do tractography. If not, you need to go back and trace the history of the data. Best if you can start with the dicom.

---

<div class="post-metadata">

### Author: ![Mohammed\_Alahmari](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammed_alahmari/32/8552_2.png) [@Mohammed\_Alahmari](https://discourse.slicer.org/u/Mohammed_Alahmari)
#### Post date: [October 22, 2020, 7:33pm UTC](https://discourse.slicer.org/t/dwi-dti-tractography/14202/3 "2020-10-22T19:33:15Z")

</div>

Hi Steve,

Thanks for your reply,

I know it is challenging, especially for someone who is unfamiliar with the field. But, with your hints and the support of the slicer community, I hope to overtake the challenge and enjoy learning something new; )

So sorry, I have also the bvals and bvecs files, I thought they are not necessary.

To be honest, I also do not know if the file I have is DWI or DTI. I guess it is a DTI, I attached the protocol for you to check. I also attached a capture of the files I have.

 ![files that I have](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/3/43312035627389ce266ee32c725063a046ddb786.jpeg) ![protocol](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/0/806bb8a27e95ab783796f4ec39c74b49a3d0c749.jpeg) ![protocol_](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/5/951b46360f7dff354c1b6ee1ab41f0c060feda14.jpeg) ![protocol__](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/e/9e3c726b350ba7b0367bb8f93c2fa553cad78704.jpeg)

Best regards  
Mohammed

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [October 22, 2020, 7:49pm UTC](https://discourse.slicer.org/t/dwi-dti-tractography/14202/4 "2020-10-22T19:49:39Z")

</div>

Okay, yes, if you have the `bvals` and `bvecs` files then it should be DWI (the original gradient images). The latest versions of dcm2niix should be able to convert nii to nrrd in this case, and the converted nrrd should load in Slicer for use with SlicerDMRI. I’m not sure where the latest features are documented, but @Chris_Rorden or @tbillah should be able to give some pointers.

> [@Mohammed\_Alahmari](#):
>
> I hope to overtake the challenge and enjoy learning something new; )

That’s the spirit!

---

<div class="post-metadata">

### Author: ![Mohammed\_Alahmari](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammed_alahmari/32/8552_2.png) [@Mohammed\_Alahmari](https://discourse.slicer.org/u/Mohammed_Alahmari)
#### Post date: [October 22, 2020, 7:55pm UTC](https://discourse.slicer.org/t/dwi-dti-tractography/14202/5 "2020-10-22T19:55:19Z")

</div>

Much appreciated Steve!

---

<div class="post-metadata">

### Author: ![tbillah](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tbillah/32/4139_2.png) [@tbillah](https://discourse.slicer.org/u/tbillah)
#### Post date: [October 23, 2020, 10:31pm UTC](https://discourse.slicer.org/t/dwi-dti-tractography/14202/6 "2020-10-23T22:31:30Z")

</div>

Hello all,

With whatever command you have for `dcm2niix`, just use `-e` additionally to get NRRD directly from DICOM. [`dcm2niix` help message](https://github.com/rordenlab/dcm2niix#running) can be consulted for its use.

However, if you are trying to convert NIFTI to NRRD, use [`nhdr_write.py`](https://github.com/pnlbwh/conversion#introduction).
