That is where voxel-to-mesh conversion comes into play. Meshes represent surfaces with vertices, edges, and faces. Such a property makes them compatible with standard 3D modeling, measurements, and printing workflows. Being able to convert voxel to mesh accurately is essential for:
- Medical applications, where patient-specific implants must be precisely 3D printed;
- Industrial scanning, where complex internal geometries demand rigorous analysis and measurements;
- Research and development, where high-fidelity models are needed for visualizations.
In this article, our team delves into how MeshInspector handles voxel to mesh conversion, offering both a swift, approximate method and an advanced, gradient-based approach.
What MeshInspector Holds in Stock For Voxel to Mesh Conversion
In this respect, MeshInspector simplifies voxel data handling by providing two main conversion modes: Simple Conversion and Smart Conversion.
Simple option
MeshInspector’s Simple Conversion mode prioritizes voxel to mesh conversion speed. If you need a mesh ASAP or are not overly concerned about preserving every subtle detail, this is a dependable choice. Your workflow in this case looks like the following:
- In the CT section, upload your voxel data through ‘Open DICOMs’, ‘Open RAW Voxels’, or ‘Open Voxels from TIFF’;
- For noise reduction, employ the ‘Change ISO’ function to isolate the region of interest and remove extraneous portions of the voxel data;
- Navigate to the ‘Voxels to Mesh’ tab, then select ‘Simple Conversion’ and click on ‘Convert’ to turn your voxel data into a mesh. Optionally, one might opt for preserving the voxel object in the scene. In this case, you will see the simple mesh overlaying the original voxel object in there.
Smart alternative
Whenever accuracy is paramount—say, in medical or high-precision industrial contexts—MeshInspector’s ’Smart Conversion’ algorithm is extremely helpful. It goes beyond basic iso-value thresholds used by common methods like marching cubes. Instead, it:
- Finds the maximum gradient. A local approximation near each vertex locates the point of steepest gradient along the normal. The vertex is then shifted there, creating a crisper, more precise mesh boundary.
- Iteratively minimizes noise. Each vertex shift is computed based on local voxel gradients. A ‘shift field’ gets smoothed to avoid overly sharp or inconsistent changes. The smoothed shift is applied to the mesh vertices.
That iterative approach corrects for errors arising from noise, multiple materials, or inaccurate iso-values. Even if the initial mesh or voxel data had flaws, the algorithm ‘pulls’ the mesh back to align with the true boundary of the scan.
Your workflow would differ, as you will have to dive deeper into settings for voxel to mesh conversion:
- ‘Sampling Points’ define how large a neighborhood around each vertex is considered when computing gradients. Higher values yield better accuracy but inevitably increase processing time.
- ‘Intermediate Smoothing’ controls how much smoothing is applied to the shift field at each iteration.
- Lower values stay closer to the raw voxel data (less noise filtering);
- Higher values reduce noise but risk losing fine details.
- ‘Polynomial Degree’ determines the degree of the polynomial fitting the sampled points around each vertex. Higher degrees capture more complex local variations but may introduce artifacts if set too high.
- ‘Iterations’ specify how many refinement cycles to perform. More iterations lead to a more precise mesh but increase computation time.
- ‘Outlier Threshold’ dictates how outliers in the voxel data are handled. Higher values tolerate more deviation, while lower values aggressively discard extreme points.
- ‘Preparation Smooth’ sets the amount of smoothing before the main iterative process. If your scan data is already relatively clean, you can leave this at zero.
Want to See the Difference for YourSelf?
To visualize how different the two meshes might be, MeshInspector provides a ‘Distance Compare’ feature under the ‘Inspect’ tab. In MeshInspector, meshes are automatically generated in the same zero point. They overlay perfectly, unless you move them. So, having run a round of voxel to mesh conversion, you can examine the result.
- Select both resulting meshes;
- Click on ‘Distance Compare’;
- Explore the colorized Distance Map.
In our map, as long as you keep the default settings, greener zones will indicate areas with minimal differences. This is a sign of proper alignment between the two meshes. Redder zones are those with significant deviations (inflation or erosion) in the ’simpler’ meshes, relative to the ’smart’ ones.
Test our capabilities in action!