# 3D breast mesh from an image

**URL:** <https://community.freefem.org/t/3d-breast-mesh-from-an-image/4080>\
**Category:** General Discussion\
**Created:** [September 26, 2025, 8:48am UTC](https://community.freefem.org/t/3d-breast-mesh-from-an-image/4080 "2025-09-26T08:48:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lassounon](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@lassounon](https://community.freefem.org/u/lassounon)\
**Post date:** [September 26, 2025, 8:48am UTC](https://community.freefem.org/t/3d-breast-mesh-from-an-image/4080/1 "2025-09-26T08:48:31Z")

</div>

Hello everyone,  
I’m trying to create a 3D breast mesh from an image, just as I would with a 2D mesh. But it doesn’t work. I looked at the 3d-Leman example, but which isn’t generated directly from an image. Please help me.

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [October 3, 2025, 9:43am UTC](https://community.freefem.org/t/3d-breast-mesh-from-an-image/4080/2 "2025-10-03T09:43:42Z")

</div>

I sorry, But I do not understand, because a image is 2D,

---

<div class="post-metadata">

**Author:** ![lassounon](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@lassounon](https://community.freefem.org/u/lassounon)\
**Post date:** [October 3, 2025, 12:02pm UTC](https://community.freefem.org/t/3d-breast-mesh-from-an-image/4080/3 "2025-10-03T12:02:40Z")

</div>

Thank you, Professor, for your response.

I realize now that I did not ask my question clearly. In 2D, we can directly use the breast image, such as in “pgm” format, in FreeFEM to build the mesh. However, to create a 3D breast mesh, we need to first export the previously constructed 2D breast mesh as an “msh” file. Then, we use the command “mesh3 Th=buildlayers(Th2,nn,…)” in combination with “mesh Th2(‘Th.msh)”.

I would like to understand why we cannot use the image directly in “pgm” format in the 3D code instead of going through the 2D process with an “msh” file from the domain. Attached is what I have managed to accomplish in 3D.

 ![3D-BreastMesh](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/b/bb97f5a672e94ae8ca704bca2586e0ebaeeeae64.png)

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [October 6, 2025, 7:45am UTC](https://community.freefem.org/t/3d-breast-mesh-from-an-image/4080/4 "2025-10-06T07:45:56Z")

</div>

Yes, because , they are too much parameter to build the 2d mesh.
