Data Objects

Chapter V: Data Objects

Data Objects in MeVisLab MeVisLab provides pre-defined data objects, e. g. Contour Segmented Objects (CSOs) which are three-dimensional objects encapsulating formerly defined contours within images. Surface Objects (Winged Edge Meshes or WEMs) represent the surface of geometrical figures and allow the user to manipulate them. Markers are used to mark specific locations or aspects of an image and allow to process those later on. Curves can print the results of a function as two-dimensional mathematical graphs into a diagram.

Contour Objects (CSO)

Contour Segmented Objects (CSOs) in MeVisLab Introduction Structure of CSOs MeVisLab provides modules to create contours in images. 3D objects which encapsulate these contours are called Contour Segmented Objects (CSOs). In the next image, you can see a rectangular shaped CSO. The pink circles you can see are called Seed Points. Seed Points define the shape of the CSO. In case of a rectangle, you need four Seed Points forming the corners, to define the whole rectangle.

Contour Example 1: Creation of Contours

Contour Example 1: Creation of Contours      This example is also available on YouTube. Introduction We like to start with the creation of CSOs. To create CSOs, you need a SoCSO*-Editor. There are several different editors, which can be used to create CSOs (see here). Some of them are introduced in this example. Steps to do Develop your network For this example, we need the following modules. Add the modules to your workspace, connect them as shown below and load the example image $(DemoDataPath)/BrainMultiModal/ProbandT1.

Contour Example 2: Contour Interpolation

Contour Example 2: Creating Contours using Live Wire and Interpolation      This example is also available on YouTube. Introduction In this example, we like to create CSOs using the Live Wire Algorithm, which allows semi-automatic CSO creation. The algorithm uses edge detection to support the user creating CSOs. We also like to interpolate CSOs over slices. That means additional CSOs are generated between manual segmentations based on a linear interpolation. As a last step, we will group together CSOs of the same anatomical unit.

Contour Example 3: 2D and 3D Visualization of Contours

Contour Example 3: Overlay Creation and 3D Visualization of Contours      This example is also available on YouTube. Introduction In this example, we’d like to use the created CSOs to display an overlay. This allows us to mark one of two lungs. In addition to that, we will display the whole segmented lobe of the lung in a 3D image. Steps to do Develop your network Use the network from the contour example 2 and add the modules VoxelizeCSO, SoView2DOverlay and View2D to your workspace.

Contour Example 4: Annotation of Images

Contour Example 4: Annotation of Images      This example is also available on YouTube. Introduction In this example we like to calculate the volume of our object, in this case the part of the lung we have segmented. Steps to do Develop your network and calculate the lung volume Add the module CalculateVolume and SoView2DAnnotation to your workspace and connect both modules as shown. Update the module CalculateVolume, which directly shows the volume of our object.

Contour Example 5: Contours and Ghosting

Contour Example 5: Visualizing Contours and Images      This example is also available on YouTube. Introduction In this example, we like to automatically create CSOs based on a predefined iso value. Steps to do Develop your network Add the following modules to your workspace and connect them as shown. Load the example image Bone.tiff. Automatic creation of CSOs based on the iso value Now, open the panel of CSOIsoGenerator to set the Iso Value to 1200.

Contour Example 6: Adding Labels to Contours

Contour Example 6: Adding Labels to Contours      This example is also available on YouTube. Introduction In this example, we are adding a label to a contour. The label provides information about measurements and about the contour itself. The label remains connected to the contour and can be moved via mouse interactions. Steps to do Develop your network Add a LocalImage and a View2D module to your workspace and connect them as shown below.

Contour Example 7: Using the CSOListContainer

Contour Example 7: Using the CSOListContainer Introduction In this example, we are using the module CSOListContainer instead of the CSOManager. The CSOManager is a heavy weight, UI driven module. You can use it to see all of your CSOs, CSOLists and CSOGroups in the module panel. The CSOListContainer is a light weight module with focus on Python scripting. We recommend to use this module for final application development, because Python provides much more flexibility in handling CSO objects.

Surface Objects (WEM)

Surface Objects (WEMs) Introduction In MeVisLab it is possible to create, visualize, process and manipulate surface objects, also known as polygon meshes. Here, we call surface objects Winged Edge Mesh, in short WEM. In this chapter you will get an introduction into WEMs. In addition, you will find examples on how to work with WEMs. For more information on WEMs take a look at the MeVislab Toolbox Reference . If you like to know which WEM formats can be imported into MeVisLab, take a look at the assimp documentation here.

Surface Example 1: Creation of WEMs

Surface Example 1: Create Winged Edge Mesh out of voxel images and CSOs      This example is also available on YouTube. 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.

Surface Example 2: Processing and Modification of WEM

Surface Example 2: Processing and Modification of WEM      This example is also available on YouTube. Introduction In this example, you will learn how to modify and process WEMs. Steps to do Develop your network Modification of WEMs Use the module WEMLoad to load the file venus.off. Then add and connect the shown modules. We like to display the WEM venus two times, one time this WEM is modified. You can use the module WEMModify to apply modifications.

Surface Example 3: Interactions with WEM

Surface Example 3: Interactions with WEM      This example is also available on YouTube. Introduction In these examples, we are showing 2 different possibilities to interact with a WEM: Scale, rotate and move a WEM in a scene Modify a WEM in a scene Scale, rotate and move a WEM in a scene We are using a SoTransformerDragger module to apply transformations on a 3D WEM object via mouse interactions. Add a SoCube and a SoBackground module and connect both to a SoExaminerViewer.

Surface Example 4: Interactively moving WEM

Surface Example 4: Interactively moving WEM      This example is also available on YouTube. Introduction In this example, we like to interactively move WEMs using SoDragger modules insight a viewer. Develop your network Interactively translating objects in 3D using SoDragger modules Add and connect the following modules as shown. In the panel of the module WEMInitialize select the Model Octasphere. After that, open the viewer SoExaminerViewer and make sure to select the Interaction Mode.

Surface Example 5: WEM - Primitive Value Lists

Surface Example 5: WEM - Primitive Value Lists      This example is also available on YouTube. Introduction WEMs do not only contain the coordinates of nodes and surfaces, they can also contain additional information. These information are stored in so called Primitive Value Lists (PVLs). Every node, every surface and every edge can contains such a list. In these lists, you can for example store the color of the node or specific patient information.

Marker Objects

Markers in MeVisLab In MeVisLab you can equip images and other data objects with markers. In this example you will see how to create, process and use markers. Creation and Rendering To create markers, you can use a marker editor, for example the SoView2DMarkerEditor. Connect this editor to a viewer as shown below. Now you can interactively create new markers. Connect the module XMarkerListContainer to your marker editor to store markers in a list.

Example 1: Distance between Markers

Example 1: Calculating the distance between markers      This example is also available on YouTube. Introduction In this example, we will measure the distance between one position in an image to a list of markers. Steps to do Develop your network Add the following modules and connect them as shown. We changed the names of the modules SoView2DMarkerEditor and XMarkerLIstContainer, to distinguish these modules from two similar modules we will add later on.

Curves

Curves in MeVisLab Introduction Curves can be used in MeVisLab to print the results of a function as two-dimensional mathematical curves into a diagram. Curves in MeVisLab In the given example, only modules available in commercial MeVisLab Professional SDK have been used. The non-commercial MeVisLab Standard SDK provides more modules for curves.

Example 1: Drawing curves

Example 1: Drawing curves      This example is also available on YouTube. Introduction In this example, you will draw one or more curves into a diagram and define different styles for the curves. Steps to do Develop your network A curve requires x- and y-coordinates to be printed. You can use the CurveCreator module as input for these coordinates. The SoDiagram2D draws the curves into a SoRenderArea. You can also define the style of the curves by using the StylePalette module.