# MESH OF (GMSH and SLICER)

**URL:** <https://community.freefem.org/t/mesh-of-gmsh-and-slicer/757>\
**Category:** General Discussion\
**Created:** [January 25, 2021, 1:16am UTC](https://community.freefem.org/t/mesh-of-gmsh-and-slicer/757 "2021-01-25T01:16:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pitagoras1](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@Pitagoras1](https://community.freefem.org/u/Pitagoras1)\
**Post date:** [January 25, 2021, 1:16am UTC](https://community.freefem.org/t/mesh-of-gmsh-and-slicer/757/1 "2021-01-25T01:16:09Z")

</div>

Hi,

I have a question, and I am very grateful if anyone can help me …

How to read in Freefem ++ a mesh brought from SLICER-3D to gmsh?

When I created the segmentation of an image using the 3D slicer, I generated a Vtk figure. I use gmsh to create an .msh file, but when I try to load into Freefem ++ the following error appears:

My code is:

load “msh3”   
load “medit”  
load “tetgen”  
load “gmsh”  
load “mshmet”  
mesh3 Th = gmshload3(Pedao.mesh");  
plot(“3D Mesh”, Th);

$MeshFormat  
4.1 0 8  
$EndMeshFormat  
$Entities  
6 7 7 0

I use this version of gmsh … what could be giving error?

Best regards,

Pitágoras Carvalho.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [January 25, 2021, 7:06am UTC](https://community.freefem.org/t/mesh-of-gmsh-and-slicer/757/2 "2021-01-25T07:06:01Z")

</div>

You need to use Msh format version 2, not 4.

---

<div class="post-metadata">

**Author:** ![Pitagoras1](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@Pitagoras1](https://community.freefem.org/u/Pitagoras1)\
**Post date:** [January 27, 2021, 4:34pm UTC](https://community.freefem.org/t/mesh-of-gmsh-and-slicer/757/3 "2021-01-27T16:34:29Z")

</div>

Thank you very much for your attention.
