It’s common to characterize the pore network in a cement sample or something similar. The following steps show you a basic and easy workflow of pore segmentation and mesh creation.


Load your dataset (in this demo the data credit goes to Mr. Xie Weining, CUMT, China):




Turn on the “Range” (thresholding) tool, where the red color indicates which voxels have a grayscale in this specific range (by default is from minimum 0 to maximum intensity):


Adjust the upper limit of the “range” to a proper level that only the pores and the surrounding background are included in the red preview.


Click “Add to New” to create a new ROI (or click Add if you have already created an empty ROI with same geometry of your thresholded dataset. Remember you have to let the ROI selected in the top-right list to which you want to Add the red-marked voxels):


Now we need to remove the surrounding background (air space) from the ROI we just created. (If your dataset doesn’t have any empty/air background, or you choose to crop your dataset so it doesn’t have any empty/air background any more, you can skip this step).


Adjust again the range so the lower level is just large enough to exclude the background and the upper level is the maximum:



Click Add to New to create a new ROI, then rename it to “background”:


If the Background has unfilled space inside, you need to fill those space now by using Fill inner space or Morphological Close operation.


Now we have two ROIs, the “New ROI” (change the name, too, if you want) and filled “Background”. The real pores are the common region of these two ROIs, so we need to do a boolean operation of intersection. 


Multi-select them by pressing Shift key and click them, you will see a new panel for Boolean Operation:


Click “Intersect”, and input “Pores” as the resulting new ROI:

If you click the “3D” icon of the Pores ROI, you could view this ROI in 3D:
This ROI rendering doesn’t have lighting and shadow effects, so we often convert the ROI to a surface mesh model to have a better rendering. Also it’s very common to export a mesh model for further simulation and analysis later on.


While the Pores ROI selected in the top-right list, find the “Export” panel in the left sidebar:


 Choose “To a Mesh -> Normal” for creating a normal sized triangle mesh model (you need a good graphics card to support this, as the complex pore network structure will usually produce a huge number of triangles). If your graphics card doesn’t have enough memory for the complex mesh, you will see the following warning, as it happens on my Nvidia Geforce 1060 laptop:


Even with the decimated mesh, I still can’t see it in 3D:


Right click the mesh and choose “Export Mesh to File” menu to export your pore mesh model to, for instance, a STL file: