Beginner Tutorial Data Objects 2D Contours CSO

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

Simple network to create rectangle CSOs on a 2D image

Simple network to create rectangle CSOs on a 2D image

Edit Rectangular CSO

Now, open the module View2D. Use your left mouse button Left Mouse Button , to draw a rectangle as your first CSO.

Rectangle contour

Rectangle contour

The involved modules have the following tasks:

  1. SoCSORectangleEditor: Enables the creation of the CSO and defines the shape of the CSOs

  2. SoView2DCSOExtensibleEditor: Manages attached CSO editors and the appearance of CSOs

  3. CSOManager: Creates a list of all drawn CSOs and offers the possibility to group CSOs

If you now open the panel of the CSOManager, you will find one CSO, the one we created before. If you like, you can name the CSO.

Panel of CSOManager

Panel of CSOManager

Change Properties of CSO

Now, add the module SoCSOVisualizationSettings to your workspace and connect it as shown below.

Added a SoCSOVisualizationSettings

Added a SoCSOVisualizationSettings

Open the module to change the visualization settings of your CSOs. In this case, we change the line style (to dashed lines) and the color (to be red). Tick the Auto apply checkbox at the bottom or press Apply.

Panel of SoCSOVisualizationSettings

Panel of SoCSOVisualizationSettings

CSOs of Different Shapes

Exchange the module SoCSORectangleEditor with another editor, for example, the SoSCOPolygonEditor or SoCSOSplineEditor. Other editors allow to draw CSOs of other shapes. For polygon-shaped CSOs or CSOs consisting of splines, left-click Left Mouse Button on the image viewer to add new points to form the CSO. Double-click Left Mouse Button to finish the CSO.

SoSCOPolygonEditor

SoSCOPolygonEditor

SoCSOSplineEditor

SoCSOSplineEditor

Draw Filled CSOs

If you want to fill the shapes, you can simply add a SoCSOFillingRenderer module to your SoView2DCSOExtensibleEditor.

SoCSOFillingRenderer

SoCSOFillingRenderer

Exercises

Create CSOs with green color and ellipsoid shapes.

Summary

  • CSOs can be created using a SoCSO*Editor.
  • CSOs of different shapes can be created.
  • A list of CSOs can be stored in the CSOManager.
  • Properties of CSOs can be changed using SoCSOVisualizationSettings.