Beginner Tutorial Data Objects 3D Surfaces Meshes WEM

Surface Example 1: Create Winged Edge Mesh out of voxel images and CSOs

Introduction

In this example you will learn how to create a Winged Edge Mesh (WEM). There are several approaches on creating WEMs, a few of them are shown in this example. Instead of creating WEMs, they can also be imported, see chapter Surface Objects (WEM).

Steps to do

From image to surface: Generating WEMs out of voxel images

At first, we will create a WEM out of a voxel image using the module WEMIsoSurface. Add and connect the shown modules. Load the image $(DemoDataPath)/Bone.tiff and set the Iso Min. Value in the panel of WEMIsoSurface to 1200. Tick the box Use image max. value. The module WEMIsoSurface creates surface objects out of all voxels with an Iso value equal or above 1200 (and smaller than the image max value). The module SoWEMRenderer can now be used to generate an Open Inventor scene, which can be displayed by the module SoExaminerViewer.

WEM

WEM

From surface to image: Generating voxel images out of WEM

It is not only possible to create WEMs out of voxel images. You can also transform WEMs into voxel images: Add and connect the modules VoxelizeWEM and View2D as shown and press the Update button of the module VoxelizeWEM.

WEM

WEM

From Contour to Surface: Generating WEMs out of CSOs

Now we like to create WEMs out of CSOs. To create CSOs load the network from Contour Example 2 and create some CSOs.

Next, add and connect the module CSOToSurface to convert CSOs into a surface object. To visualize the created WEM, add and connect the modules SoWEMRenderer and SoExaminerViewer.

WEM

WEM

It is also possible to display the WEM in 2D in addition to the original image. In order to do that, add and connect the modules SoRenderSurfaceIntersection and SoView2DScene. The module SoRenderSurfaceIntersection allows to display the voxel image and the created WEM in one viewer using the same coordinates. In its panel, you can choose the color used for visualizing the WEM. The module SoView2DScene renders an Open Inventor scene graph into 2D slices.

WEM

WEM

If you like to transform WEMs back into CSOs, take a look at the module WEMClipPlaneToCSO.

Summary

  • Voxel images can be transformed into WEMs using WEMIsoSurface
  • WEMs can be transformed into voxel images using VoxelizeWEM
  • CSOs can be transformed into WEMS using CSOToSurface
  • WEMs can be transformed into voxel images using WEMClipPlaneToCSO