Create a voxel based mesh

Hi there,

I was wondering if it is possible to create a 3D mesh, where each voxel is an element using 3Dslicer? I have tried using the segmentmesher plugin but to no avail. At this point in time, I only need the mesh to validate an Abaqus subroutine. Hence, it does not to be smooth.


SegmentMesher works well for creating volumetric meshes. Please give more specifics about what problems you had.

Thanks for getting back so quick!

I found that I mainly had an issue with irregular shaped elements, particularly with high aspect ratios.

I’m first thresholding my image (which is already binary) and then using segment mesher. The image comprises a bulk material with a single pore at the centre.

With cleaver, I tend to find that elements ‘stick out’ of the original image (in other words, the volume is no longer a cuboid). For example:

With Tetgen I’m just having trouble optimising at the moment, which I’m hoping I can resolve.

I just wondered if it is possible to create a voxel based mesh using slicer?

Cleaver is designer for generating volumetric meshes from labelmap volumes. Its accuracy of reproducing a continuous spatial domain is limited by Shannon-Nyquist sampling theorem (i.e., edges will be always somewhat smoothed). You can increase the resolution to be high enough so that the smoothing become negligible, but then the computation time and memory usage (during computation) will increase dramatically.

Therefore, what you can get with Cleaver is something like this:

With these parameters:

If you want to create a volumetric mesh of a rectangular prism then probably the best is to generate the mesh programmatically (specify mesh point positions and cells). If you want to create arbitrary volumetric meshes from a surface mesh as input then instead of Cleaver you can use tetgen, tetwild, or hundreds of other mesh generators.

What is your overall goal?

Thanks again.

So the aim of my project is to create an FE model from a real material microstructure. I am then hoping to assign material properties to each element based on the nearest pore within the microstructure. At the moment, since I am in the testing phase, the microstructure that I am using to create an FE model consists of a single pore. This will enable to me verify that all my scripts are working correctly when assigning the properties to elements. This will be completed in abaqus.

With Tetgen, I found that the mesh quality was quite good but I ended up with far too many elements (it crashed abaqus when I tried to load). I am now running cleaver with the parameters you sent, though my PC seems to be struggling! Am I correct in thinking that my segmented volume, consisting of a global threshold to separate the bulk from the porosity is a labelmap volume?

Kind regards,

The paramaters you suggested have returned a much more suitable mesh. I’m not sure why my choice of parameters was producing such a bad quality but I think this will be great for what I’m intending to do for the time being.

Thanks for your time and help.

Kind regards,

1 Like

Correct, and Cleaver is designed to create meshes for FEA from such labelmaps. Tetgen and other mesh generators that require a surface mesh as input would struggle (and most likely fail) to create volumetric meshes from such complex geometry.