# Convert file of .vtk of Segment Mesher

**URL:** https://discourse.slicer.org/t/convert-file-of-vtk-of-segment-mesher/37351
**Category:** Support
**Tags:** segmentation, segmentmesher
**Created:** [July 13, 2024, 10:13am UTC](https://discourse.slicer.org/t/convert-file-of-vtk-of-segment-mesher/37351 "2024-07-13T10:13:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![khajta](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/khajta/32/76581_2.png) [@khajta](https://discourse.slicer.org/u/khajta)
#### Post date: [July 13, 2024, 10:13am UTC](https://discourse.slicer.org/t/convert-file-of-vtk-of-segment-mesher/37351/1 "2024-07-13T10:13:05Z")

</div>

I am a new of using Segment Mesher and mesh phantom. I can export the segmented organ using Cleaver method and save as .vtk. However, the input for phits program need .node and .ele. How to convert this file?

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [July 13, 2024, 8:26pm UTC](https://discourse.slicer.org/t/convert-file-of-vtk-of-segment-mesher/37351/2 "2024-07-13T20:26:03Z")

</div>

There are lots of mesh conversion tools that can convert between various file formats. Slicer can write volumetric meshes as VTK unstructured grid in .vtk or .vtu format. The .node/.ele format is tetgen tetrahedral mesh. For example, you can use [meshio](https://github.com/nschloe/meshio).

---

<div class="post-metadata">

### Author: ![khajta](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/khajta/32/76581_2.png) [@khajta](https://discourse.slicer.org/u/khajta)
#### Post date: [July 14, 2024, 2:09am UTC](https://discourse.slicer.org/t/convert-file-of-vtk-of-segment-mesher/37351/3 "2024-07-14T02:09:43Z")

</div>

Thank you for your reply. I try to search this issue and I found that TetGen is a toll for this task as well. Which one is easy to use in your opinion?

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [July 14, 2024, 2:38am UTC](https://discourse.slicer.org/t/convert-file-of-vtk-of-segment-mesher/37351/4 "2024-07-14T02:38:21Z")

</div>

Segment mesher can use Cleaver or TetGen for mesh generation. Cleaver tend to work better for creating meshes from medical image segmentations, while TetGen may perform a bit better if you want to create volumetric mesh for parts designed in CAD software. TetGen has restrictive license that may prevent you from using it in commercial projects, while Cleaver has no such limitation.

There are hundreds of other volumetric meshing tools, such as netgen (but that has restrictive license, too) ot fTetWild (a robust, high-quality volumetric mesher with non-restrictive license).

---

<div class="post-metadata">

### Author: ![khajta](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/khajta/32/76581_2.png) [@khajta](https://discourse.slicer.org/u/khajta)
#### Post date: [July 14, 2024, 3:57am UTC](https://discourse.slicer.org/t/convert-file-of-vtk-of-segment-mesher/37351/5 "2024-07-14T03:57:53Z")

</div>

> [@lassoan](#):
>
> esher can use Cleaver or TetGen for mesh generation. Cleaver tend to work better for creating meshes from medical image segmentations, while TetGen may perform a bit better if you want to create volumetric mesh for parts designed in CAD software. TetGen has restrictive license that may prevent you from using it in commercial projects, while Cleaver has no such limitation.
> 
> There are hundreds of other volumetric meshing tools, such as netgen (but that has restrictiv

Thank you very much.
