# Create a volumetric mesh

**URL:** https://discourse.slicer.org/t/create-a-volumetric-mesh/2931
**Category:** Development
**Created:** [May 25, 2018, 2:07pm UTC](https://discourse.slicer.org/t/create-a-volumetric-mesh/2931 "2018-05-25T14:07:19Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Hikmat](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@Hikmat](https://discourse.slicer.org/u/Hikmat)
#### Post date: [May 25, 2018, 2:07pm UTC](https://discourse.slicer.org/t/create-a-volumetric-mesh/2931/1 "2018-05-25T14:07:19Z")

</div>

Operating system: Windows 10  
Slicer version: Slicer 4.8.1

I have clipped a ScalarVolumeNode to define the region of interest. I would now like to create a volumetric mesh from this scalar volume. I am aware of tools and methods to create a surface model (ie. grayMaker, modelMaker). However, are there any tools for volumetric meshes? I have tried Cleaver Tet Mesher but with no success.

Thanks.

---

<div class="post-metadata">

### Author: ![Michael\_Hardisty](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/michael_hardisty/32/1593_2.png) [@Michael\_Hardisty](https://discourse.slicer.org/u/Michael_Hardisty)
#### Post date: [May 25, 2018, 3:37pm UTC](https://discourse.slicer.org/t/create-a-volumetric-mesh/2931/2 "2018-05-25T15:37:08Z")

</div>

Hi Hikmat,

I have previously used cleaver to generate a volumetric mesh. There is previous discussion on discourse about this, here is the relevant text:

“I tried using cleaver with limited success. I had a lot of trouble with the extension initially. After I spoke with Andras Lasso I was able to get the meshing working. The main thing I did to get cleaver to work with my data was to create a label map with a value of 75 on the inside and -75 on the outside. I used simple filters to do the shifting and scaling.”

Here is a link to the discussion: [https://discourse.slicer.org/t/usage-of-volumetric-meshes/620/3](https://discourse.slicer.org/t/usage-of-volumetric-meshes/620/3)

Best,

Michael

---

<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: [May 25, 2018, 3:56pm UTC](https://discourse.slicer.org/t/create-a-volumetric-mesh/2931/3 "2018-05-25T15:56:19Z")

</div>

Segment mesher extension greatly simplifies volumetric mesh generation. It can create volumetric meshes directly from segmentation nodes. It takes care of creating image data in the format that Cleaver2 expects.

If your input is a surface mesh in a model node then you can convert it to segmentation node using Segmentations module.

---

<div class="post-metadata">

### Author: ![Hikmat](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@Hikmat](https://discourse.slicer.org/u/Hikmat)
#### Post date: [May 25, 2018, 6:02pm UTC](https://discourse.slicer.org/t/create-a-volumetric-mesh/2931/4 "2018-05-25T18:02:32Z")

</div>

Thanks Andras, this works great.

I now have an overlay of my surface model and the corresponding volumetric mesh.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/5/f50d0bf0eb56644bd8a530efee9e780e85eb0603.jpeg)

I would like to “fuse” their properties: the surface mesh defines only the exterior whereas the volumetric mesh discretizes the interior structure.

Is there a way to manipulate the volumetric mesh (or the surface mesh) in Slicer so that I have a model whose exterior is well-visualized (as in the surface mesh) but whose interior structure is also defined (as in the volumetric mesh)?

---

<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: [May 25, 2018, 6:17pm UTC](https://discourse.slicer.org/t/create-a-volumetric-mesh/2931/5 "2018-05-25T18:17:57Z")

</div>

For visualization, I would only use surface meshes. Why do you need volumetric meshes for visualization?

---

<div class="post-metadata">

### Author: ![Hikmat](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@Hikmat](https://discourse.slicer.org/u/Hikmat)
#### Post date: [May 25, 2018, 6:29pm UTC](https://discourse.slicer.org/t/create-a-volumetric-mesh/2931/6 "2018-05-25T18:29:20Z")

</div>

I am writing a simulator for decompression surgery - in which a lamina needs to be removed (laminectomy).  
I have created a tool that “grinds” away at the bone surface - kind of like an “Erasing” tool.

Although I agree that a surface mesh is adequate for visualization, the spine would be a hollow structure and thus not a useful representation for laminectomy. Thus, it would be nice if I had a “solid” model so that there would be underlying layers of bone as the surface is grinded away at.

---

<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: [May 25, 2018, 7:09pm UTC](https://discourse.slicer.org/t/create-a-volumetric-mesh/2931/7 "2018-05-25T19:09:02Z")

</div>

For all these you don’t need a volumetric mesh. Segment Editor can do volumetric visualization already. Enable “Show 3D”, maybe disable smoothing to make updates faster (you can later set up volume rendering to make 3D updates even faster). You can use the Erase effect with a sphere option to grind bone.

---

<div class="post-metadata">

### Author: ![Hikmat](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@Hikmat](https://discourse.slicer.org/u/Hikmat)
#### Post date: [May 25, 2018, 7:23pm UTC](https://discourse.slicer.org/t/create-a-volumetric-mesh/2931/8 "2018-05-25T19:23:24Z")

</div>

This is exactly what I needed and the Erase tool is a huge plus.  
Wish I had known this beforehand so that I didn’t have to develop my own Erase tool.  
Thanks Andras; it is much appreciated.

---

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [August 28, 2018, 1:19pm UTC](https://discourse.slicer.org/t/create-a-volumetric-mesh/2931/9 "2018-08-28T13:19:17Z")

</div>

A post was merged into an existing topic: [Convert a surface mesh to a volumetric mesh in 3DSLICER](https://discourse.slicer.org/t/convert-a-surface-mesh-to-a-volumetric-mesh-in-3dslicer/1416/6)
