The iconic variables are represented by icons, which contain an image, a region
or an XLD, depending on the current value. The icons are created depending on
the type of data according to the following rules:
For images the icon contains a zoomed version of them,
filling the icon completely. Due to the zooming onto the square shape of
the icon, the aspect ratio of the small image might be wrong. If there is
more than one image in the variable, only the first image is used for
the icon. Similarly, for multi-channel images only the first channel
is displayed. An exception is made for images with three channels: These are
displayed as color icons (RGB).
The domain of the image is not reflected in the displayed icon. Information
about the domain can be obtained from the tool tip which appears when the
mouse cursor points to the icon.
See figure 6.82 for an illustration.
Figure 6.82: Displaying information about an iconic variable with a reduced domain.
Regions are displayed by first calculating the smallest surrounding
rectangle and then zooming it so that it fills the icon using a border of
one pixel. In contrast to images, the aspect ratio is always correct. This
can lead to black bars at the borders. The color used to draw the region is
always white without further modifications (except zooming).
XLD data is displayed using the coordinate system of the largest image used
so far. The color used for XLD objects is white on black background.
Because of the different ways of displaying objects, you have to be aware that
the coordinates cannot be compared. The variable name is positioned below each
icon. They are displayed in the variable window in the order of occurrence or
name from left to right. If there is not enough space, a scrollbar is created,
which you can use to scroll the icons.
If you use images of different sizes in a program, the
system uses the following output strategy for an automatic part reset,
depending on the chosen resize mode:
Every window keeps track of the size of the most recently displayed
image. If you display an image with a different size, the system modifies the
graphics window coordinate system in a way that the image is visible completely
in the graphics window.
In Full Stretch mode, the part is set to the full image size.
In No Stretch mode or Keep Aspect Ratio mode, the part is
extended to fit the full image in a 1:1 aspect ratio with black bars on one side.
You can get information about an instantiated variable by placing the mouse
pointer over the corresponding icon in the variable window.
See also figure 6.82 for an illustration.
The information depends on the contents of the corresponding variable:
Images: The image type and size and the number of channels is displayed. If
the iconic variable contains multiple images, the properties of the first
image are reported.
Regions: The area and the center of the region is displayed. If the iconic
variable contains multiple regions, the properties of the first region are
reported.
XLDs: The number of contour points and the length is displayed. If the
iconic variable contains multiple XLDs, the properties of the first XLD are
reported.
Clicking an icon with the right mouse button opens a context menu with
several options:
Display:
Display the selected iconic variable in the active graphics window.
Regions and XLDs are displayed on top of the previous contents of the
active graphics window.
Display Channel:
Display a single channel of the selected iconic variable in the active
graphics window.
This menu lists up to 15 channels.
If the iconic variable contains more than 15 channels, you can access the
remaining channels by clicking “Select...”, which opens an auxiliary
window listing all channels.
This entry is only available if the selected iconic variable contains a
mult-channel image.
Display Content:
Display a single object of the selected iconic variable in the active
graphics window.
This menu lists up to 15 objects.
If the iconic variable contains more than 15 objects, you can access the
remaining objects by clicking “Select...”, which opens an auxiliary
window listing all objects.
This entry is only available if the selected iconic variable contains
multiple objects, for example, multiple images, regions, or XLDs.
Clear / Display:
Clear the active graphics window before displaying the selected
iconic variable.
Clear Variable:
Clear the selected iconic variable.
The contents of the variable become undefined.
Toggle activation of breakpoint on the variable under the mouse cursor.
Add to User Tab:
The selected variable is added to the tab User.
Find Variable:
Open the Find/Replace... dialog with the name of the
selected variable preselected.
Insert dev_display() into program:
Insert the operator dev_display into the program window at the IC.
The parameter of the inserted instruction is the name of the selected
iconic variable.
Shortcut: Ctrl + double-click variable icon.
Declared in (global variables only)
List the names and line numbers of the procedures that declare (and thus
use) the selected global variable.
Click an entry to jump to the corresponding location in the program
window.
Sort by Name:
Sort all variables in alphabetical order.
Sort by Occurrence:
Sort the variables in the same order as they are defined in the program.
This submenu contains a list of all variables that are
currently not displayed in the tab User.
Click a variable name to add the corresponding variable to the tab.
Remove from User Tab (tab User only):
The selected variables are removed from the tab User.
You can display the corresponding iconic variable in the
active graphics window (with or without clearing the window first), and you can
clear the iconic variable. If an iconic variable contains multiple items, you
can also select a specific item from a submenu.
Up to 15 items are listed in this menu.
If an iconic variable contains more than 15 items, the remaining items can be
accessed by clicking Select....
If you click Select... in
this submenu, you can quickly browse the items of the iconic variable from a
dialog. This also works for multi-channel images.
See figure 6.83 for an example.
Figure 6.83: Interactive channel selection from an RGB image.
Usually, regions, images, and XLDs are represented in variable icons.
Besides this, there are three exceptions, which are shown by special
icons:
Undefined variables are displayed as a question mark icon
. You can write to
but not read them, because they do not have any value.
Brackets are used if a variable is
instantiated but does not contain
an iconic object (empty tuple). This can be the case using operators like
select_shape with “wrong” specified thresholds or using the operator
gen_empty_obj. Such a value might be reasonable if you want to collect
iconic objects in a variable gradually in a loop using concat_obj. Here,
an empty tuple is used as starting value for the loop.
A last exception is an empty region. This is one region that
does not contain any pixels (points), that is the area (number of points) is
0. You must not confuse this case with the empty tuple, because there the
area is not defined. The empty region is symbolized by an empty set icon
.