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.
Edit rectangular CSO
Now, open the module View2D
. Use your left mouse key
, to draw a rectangle, which is your first CSO.
The involved modules have the following tasks:
SoCSORectangleEditor
: Enables the creation of the CSO and defines the shape of the CSOsSoView2DCSOExtensibleEditor
: Manages attached CSO editors and the appearance of CSOsCSOManager
: 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.
Change properties of CSO
Now, add the module SoCSOVisualizationSettings
to your workspace and connect it as shown below.
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 box at the bottom or press Apply.
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 on the image viewer to add new points
to form the CSO. Double–click to finish the CSO.
Draw filled CSOs
If you want to fill the shapes, you can simply add a SoCSOFillingRenderer
module to your SoView2DCSOExtensibleEditor
.
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