# How the tensor is stored in NRRD

**URL:** https://discourse.slicer.org/t/how-the-tensor-is-stored-in-nrrd/34084
**Category:** Support
**Tags:** dicom
**Created:** [February 1, 2024, 12:03pm UTC](https://discourse.slicer.org/t/how-the-tensor-is-stored-in-nrrd/34084 "2024-02-01T12:03:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Yixun\_Liu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yixun_liu/32/9310_2.png) [@Yixun\_Liu](https://discourse.slicer.org/u/Yixun_Liu)
#### Post date: [February 1, 2024, 12:03pm UTC](https://discourse.slicer.org/t/how-the-tensor-is-stored-in-nrrd/34084/1 "2024-02-01T12:03:47Z")

</div>

Hi,  
I use the 3DSlicer Diffusion module to load DWI, estimate its tensor and then store the tensor image into NRRD. I want to know how the tensor is stored in NRRD?  
Is it stored as 6 upper triangle elements of the 3x3 tensor matrix or the lower triangle or others?  
I also want to know which VTK class can be used to correctly load the tensor image?

Thanks.  
Yixun

---

<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: [February 1, 2024, 3:36pm UTC](https://discourse.slicer.org/t/how-the-tensor-is-stored-in-nrrd/34084/2 "2024-02-01T15:36:36Z")

</div>

[https://teem.sourceforge.net/nrrd/format.html](https://teem.sourceforge.net/nrrd/format.html)

---

<div class="post-metadata">

### Author: ![Yixun\_Liu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yixun_liu/32/9310_2.png) [@Yixun\_Liu](https://discourse.slicer.org/u/Yixun_Liu)
#### Post date: [February 6, 2024, 4:30am UTC](https://discourse.slicer.org/t/how-the-tensor-is-stored-in-nrrd/34084/3 "2024-02-06T04:30:45Z")

</div>

Thank you very much！
