Contours

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.

Usage, advantages and disadvantages of each above mentioned data object type will be covered in the following specified chapters, where you will be building example networks for some of the most common use cases.

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

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.tif.

Contour Example 2: Contour Interpolation

Contour Example 2: Creating Contours using Live Wire and Interpolation

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.

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

Contour Example 3: Overlay Creation and 3D Visualization of Contours

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. Connect the module as shown. The module VoxelizeCSO allows to convert CSOs into voxel images.

Contour Example 4: Annotation of Images

Contour Example 4: Annotation of Images

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

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. If you press Update in the panel, you can see the creation of CSOs on every slide, when opening the module View2D. In addition to that the number of CSOs is displayed in the CSOManager. The module CSOIsoGenerator generates iso-contours for each slice at a fixed iso value. This means that closed CSOs are formed based on the detection of the voxel value of 1200 on every slice.

Contour Example 6: Adding Labels to Contours

Contour Example 6: Adding Labels to Contours

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. Load the file ProbandT1.dcm from MeVisLab demo data. In order to create contours (CSOs), we need a SoView2DCSOExtensibleEditor module. It manages attached CSO editors, renderers and offers an optional default renderer for all types of CSOs.

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.