# DTI Statistics for a specific ROI of a fiber?

**URL:** <https://discourse.slicer.org/t/dti-statistics-for-a-specific-roi-of-a-fiber/10385>\
**Category:** SlicerDMRI\
**Created:** [February 21, 2020, 4:49pm UTC](https://discourse.slicer.org/t/dti-statistics-for-a-specific-roi-of-a-fiber/10385 "2020-02-21T16:49:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![LearningSlicerYay](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LearningSlicerYay](https://discourse.slicer.org/u/LearningSlicerYay)\
**Post date:** [February 21, 2020, 4:49pm UTC](https://discourse.slicer.org/t/dti-statistics-for-a-specific-roi-of-a-fiber/10385/1 "2020-02-21T16:49:21Z")

</div>

Hi all,

I generated my fiber tracts using interactive markup.  
I would like to generate statistics based on a specific region of these tracts. Is there a way I can do this?

Many thanks,

---

<div class="post-metadata">

**Author:** ![zhangfanmark](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhangfanmark/32/4451_2.png) [@zhangfanmark](https://discourse.slicer.org/u/zhangfanmark)\
**Post date:** [February 21, 2020, 5:40pm UTC](https://discourse.slicer.org/t/dti-statistics-for-a-specific-roi-of-a-fiber/10385/2 "2020-02-21T17:40:58Z")

</div>

Hi,

Currently, we support only calculation of summary statistics of the whole fiber tract, e.g., the mean and the maximum FA of all points along the fiber tract.

Computing the statistics of a region of interest will need some coding work. For example, reading the tract in Python, then locating the fiber points of interest to calculate the statistics.

Regards,  
Fan

---

<div class="post-metadata">

**Author:** ![LearningSlicerYay](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LearningSlicerYay](https://discourse.slicer.org/u/LearningSlicerYay)\
**Post date:** [February 21, 2020, 5:58pm UTC](https://discourse.slicer.org/t/dti-statistics-for-a-specific-roi-of-a-fiber/10385/3 "2020-02-21T17:58:30Z")

</div>

Thanks for your response Fan.

When it’s calculating the statistics, if I have both a negative ROI node on a tract does it take that into account? I’m not sure how the nodes are incorporated into the VTKs…

---

<div class="post-metadata">

**Author:** ![zhangfanmark](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhangfanmark/32/4451_2.png) [@zhangfanmark](https://discourse.slicer.org/u/zhangfanmark)\
**Post date:** [February 21, 2020, 6:19pm UTC](https://discourse.slicer.org/t/dti-statistics-for-a-specific-roi-of-a-fiber/10385/4 "2020-02-21T18:19:00Z")

</div>

Hi,

The tractography statistics module will compute the diffusion parameters stored along the fiber tract. No ROI node will be taken into account. If you want to exclude fibers, you can update the fiber tracts first using negative ROI node. Then run the tractography statistics module. Still, this will calculate the statistics along the whole fiber tract.

Regards,  
Fan

---

<div class="post-metadata">

**Author:** ![emma1201](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@emma1201](https://discourse.slicer.org/u/emma1201)\
**Post date:** [March 28, 2022, 8:35am UTC](https://discourse.slicer.org/t/dti-statistics-for-a-specific-roi-of-a-fiber/10385/5 "2022-03-28T08:35:47Z")

</div>

Hi Fan and slicer fans,

Apologies for replying to an old thread. I am new to slicer and want to know how to read the FA maps into Python to generate per voxel (ie get all the set of information including the coordinate and the FA from DataProbe section B). Should I attempt to import the .nrrd file into python? Are there any tutorials I can refer to on how to get started with extracting the information?(such as [Script repository — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html))

Thank you so much! Sorry if the answer is very obvious!
