# Fail to export geometry based on DTI images to .stl file

**URL:** https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171
**Category:** Support
**Tags:** diffusion
**Created:** [June 13, 2018, 4:04pm UTC](https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171 "2018-06-13T16:04:52Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Kewei](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@Kewei](https://discourse.slicer.org/u/Kewei)
#### Post date: [June 13, 2018, 4:04pm UTC](https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171/1 "2018-06-13T16:04:52Z")

</div>

Hi,  
I have generated the geometry of the brain fibers based on DTI, but when I saved the file as the \*.stl file and opened it in another 3D software, I saw nothing. How can I solve this problem?  
Thanks,  
Kewei

---

<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: [June 13, 2018, 4:38pm UTC](https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171/2 "2018-06-13T16:38:55Z")

</div>

Please try the `Export tractography to PLY (mesh)` module, available in the SlicerDMRI extension since early April.

Note that we use PLY specifically because it supports color.

Most software with STL import also supports PLY, but if you specifically need OBJ (supports color) or STL (no color) you can [convert in MeshLab](https://github.com/SlicerDMRI/SlicerDMRI/wiki/How-to-export-atlas-or-tractography-for-visualization-in-Blender).

---

<div class="post-metadata">

### Author: ![Kewei](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@Kewei](https://discourse.slicer.org/u/Kewei)
#### Post date: [June 13, 2018, 5:15pm UTC](https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171/3 "2018-06-13T17:15:55Z")

</div>

Hi Isaiah,  
Thanks for your reply. I tried based on your advice, however, when I opened the \*ply file exported from 3D slicer in the MeshLab. I just saw points (not the geometry of the fibers), and the \*.stl file converted from the MeshLab still contained nothing.  
Thanks,  
Kewei

---

<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: [June 13, 2018, 5:36pm UTC](https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171/4 "2018-06-13T17:36:19Z")

</div>

Hi Kewei. I’ve used this module with a variety of tractography, on a mac, and meshlab 2016.12. If you want to send me a small, sample .vtk file, I can take a quick look. Save it from the vtkMRMLFiberBundleNode with the usual Save Data interface.

> **email**
>
> `inorton -at- partners -.- org`

---

<div class="post-metadata">

### Author: ![Kewei](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@Kewei](https://discourse.slicer.org/u/Kewei)
#### Post date: [June 13, 2018, 5:41pm UTC](https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171/5 "2018-06-13T17:41:32Z")

</div>

Hi isaiah,  
Thanks for your advice. I need to get the permission to send my file to you. I will tell you since I get the permission done.  
Thanks,  
Kewei

---

<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: [June 13, 2018, 6:10pm UTC](https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171/6 "2018-06-13T18:10:48Z")

</div>

You can test this with public data:

- go to Sample Data module, download `DTI Brain`
- use Tractography Seeding module, place a seed point (fiducial) inside the brain to generate a fiberbundle [see this tutorial, page 59](http://dmri.slicer.org/tutorials/neurosurgical_planning_dti)
- export the resulting vtkMRMLFiberBundle as PLY and load to MeshLab.

If the above steps don’t work, then send me the VTK from the sample data. Also please mention the OS, Slicer version, and MeshLab version.

---

<div class="post-metadata">

### Author: ![Kewei](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@Kewei](https://discourse.slicer.org/u/Kewei)
#### Post date: [June 13, 2018, 7:25pm UTC](https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171/7 "2018-06-13T19:25:25Z")

</div>

Kewei Bian ÒÑÓëÄã¹²Ïí OneDrive for Business ÎÄ¼þ¡£ÈôÒª²é¿´£¬Çëµ¥»÷ÏÂÃæµÄÁ´½Ó¡£

[  
 ](https://uwoca-my.sharepoint.com/:u:/g/personal/kbian2_uwo_ca/EVqTnampVQFJuhDe7C0duU8BRPdb6jdybCx99qNyPIt_Vw)  
[![](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/2X/7/73a0286f78f4681e26d6ba244599d6b8ae97e7a8.png)](https://uwoca-my.sharepoint.com/:u:/g/personal/kbian2_uwo_ca/EVqTnampVQFJuhDe7C0duU8BRPdb6jdybCx99qNyPIt_Vw)

[FiberBundle.stl](https://uwoca-my.sharepoint.com/:u:/g/personal/kbian2_uwo_ca/EVqTnampVQFJuhDe7C0duU8BRPdb6jdybCx99qNyPIt_Vw)

[  
 ](https://uwoca-my.sharepoint.com/:u:/g/personal/kbian2_uwo_ca/EWxPtKQWnYtGkPVO2tr4CogBLydsMR6m1nFFwKF7z-Mtlw)  
[![](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/2X/7/73a0286f78f4681e26d6ba244599d6b8ae97e7a8.png)](https://uwoca-my.sharepoint.com/:u:/g/personal/kbian2_uwo_ca/EWxPtKQWnYtGkPVO2tr4CogBLydsMR6m1nFFwKF7z-Mtlw)

[FiberBundle.ply](https://uwoca-my.sharepoint.com/:u:/g/personal/kbian2_uwo_ca/EWxPtKQWnYtGkPVO2tr4CogBLydsMR6m1nFFwKF7z-Mtlw)

Hi Isaiah,

I have attached the geometry based on part of sample case in \*.ply and \*.stl format. There are points in MeshLab when I open \*.ply, which is the same as I met of my own file; the \*.stl is still 1 kb, same as that of my data as well.

---

<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: [June 13, 2018, 7:47pm UTC](https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171/8 "2018-06-13T19:47:33Z")

</div>

I can reproduce this kind of result if I use Save Data, then select “.stl” or “.ply” as the output format in the dropdown.

However, I have just tested the `Export tractography to PLY (mesh)` tool again in the latest Slicer nightly (2018-06-11), and it works as expected. I include a screenshot below; please make sure you are using that module.

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/5/75b1c696e22aaad357ed00adbd619d6a8aeeb9e8.png)

---

<div class="post-metadata">

### Author: ![Kewei](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@Kewei](https://discourse.slicer.org/u/Kewei)
#### Post date: [June 13, 2018, 8:39pm UTC](https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171/9 "2018-06-13T20:39:42Z")

</div>

> [@ihnorton](#):
>
> `Export tractography to PLY (mesh)` tool

Hi Isaiah ,  
I will try the way you suggested. However, where can we get the Export tractography to PLY (mesh) tool? I can’t find it in the slicer (4.8.1, 4.9.0 and 4.5.0-1).  
Thanks,  
Kewei

---

<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: [June 13, 2018, 8:52pm UTC](https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171/10 "2018-06-13T20:52:22Z")

</div>

> [@Kewei](#):
>
> where can we get the Export tractography to PLY (mesh) tool

Hi Kewei, it is available in the SlicerDMRI extension in nightly builds since early April. Sorry for the confusion, I thought it was installed already based on earlier discussion. Please see install instructions [here](http://dmri.slicer.org/download/).

---

<div class="post-metadata">

### Author: ![Kewei](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@Kewei](https://discourse.slicer.org/u/Kewei)
#### Post date: [June 14, 2018, 1:21pm UTC](https://discourse.slicer.org/t/fail-to-export-geometry-based-on-dti-images-to-stl-file/3171/11 "2018-06-14T13:21:40Z")

</div>

Hi Isaiah,  
I have successfully gotten the geometry based on the way you suggested.  
Thanks for your help!  
Kewei
