# Vtk fiber bundle import from mrtrix and/or good format description of the slicer polydata fiber bundle format

**URL:** <https://discourse.slicer.org/t/vtk-fiber-bundle-import-from-mrtrix-and-or-good-format-description-of-the-slicer-polydata-fiber-bundle-format/3846>\
**Category:** Support\
**Tags:** diffusion\
**Created:** [August 20, 2018, 1:23pm UTC](https://discourse.slicer.org/t/vtk-fiber-bundle-import-from-mrtrix-and-or-good-format-description-of-the-slicer-polydata-fiber-bundle-format/3846 "2018-08-20T13:23:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![UNSW\_MRI](https://avatars.discourse-cdn.com/v4/letter/u/ed655f/32.png) [@UNSW\_MRI](https://discourse.slicer.org/u/UNSW_MRI)\
**Post date:** [August 20, 2018, 1:23pm UTC](https://discourse.slicer.org/t/vtk-fiber-bundle-import-from-mrtrix-and-or-good-format-description-of-the-slicer-polydata-fiber-bundle-format/3846/1 "2018-08-20T13:23:51Z")

</div>

Hi,  
I was wondering if there is a good description of the vtk polydata format of the slicer fiber bundles?  
I currently have the following problem: When I use MRtrix for fiber tracking and convert the tracts to vtk polydata, Slicer imports the data just fine BUT I cannot use FA or orientaion based coloring. I guess this is stored in some place with the polydata of the fibre bundles, but I cannot find any documantation form that. Can anybody give me a hint how I can properly import this and add this information to the fiber bundles, so I can user these color schemes? Maybe there is a conversion step I am missing?

Thanks

Andre

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [August 20, 2018, 3:07pm UTC](https://discourse.slicer.org/t/vtk-fiber-bundle-import-from-mrtrix-and-or-good-format-description-of-the-slicer-polydata-fiber-bundle-format/3846/2 "2018-08-20T15:07:59Z")

</div>

Hi Andre,

> [@UNSW\_MRI](#):
>
> BUT I cannot use FA or orientaion based coloring. I guess this is stored in some place with the polydata of the fibre bundles, but I cannot find any documantation form that.

There are two options available.

- The fiber bundle VTK files can store an ordered array of tensors in a VTK cell array, with one tensor corresponding to each point. The visualization pipeline within Slicer then calculates the property requested for display on-the-fly from the tensors.

> **[Along tract analysis after tract segmentation](https://community.mrtrix.org/t/along-tract-analysis-after-tract-segmentation/1007/3)**
>
> Just in case you want to use the MRtrix3 functionality here, the commands you’re after are tcksample and tckresample. These admittedly need to be better documented. The process consists of first re-sampling the streamlines at equivalent locations...

- The second, probably simpler/tractable option, is to store pre-computed scalars, similarly in a polydata cell array, but this time with a single scalar value per point. After using the method detailed in the post above, the output text file could be loaded and added to the VTK as a cell array with (hopefully) a few lines of Python code.

---

<div class="post-metadata">

**Author:** ![ljod](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ljod/32/652_2.png) [@ljod](https://discourse.slicer.org/u/ljod)\
**Post date:** [August 20, 2018, 3:08pm UTC](https://discourse.slicer.org/t/vtk-fiber-bundle-import-from-mrtrix-and-or-good-format-description-of-the-slicer-polydata-fiber-bundle-format/3846/3 "2018-08-20T15:08:54Z")

</div>

Hi the FA can only be shown if tensors (or FA) are stored along the fibers. This data would have to come from MRtrix, but as far as I know it does not store tensors. The orientation coloring should still work, as that requires only the fibers. Did you go to Tractography Display and turn the color by orientation on?
