set_shape🔗
Short description🔗
set_shape — Define the region output shape.
Signature🔗
set_shape( window WindowHandle, string Shape )
Description🔗
set_shape defines the shape for region output. It is
only valid for the window with the logical window number
WindowHandle. The output shape is used by
disp_region. The available shapes can be queried with
query_shape.
Available modes:
-
'original': The shape is displayed unchanged. Nevertheless modifications via parameters like
set_line_widthcan take place. This is also true for all other modes. -
'outer_circle': Each region is displayed by the smallest surrounding circle. (See
smallest_circle.) -
'inner_circle': Each region is displayed by the largest included circle. (See
inner_circle.) -
'ellipse': Each region is displayed by an ellipse with the same moments and orientation (See
elliptic_axis.) -
'rectangle1': Each region is displayed by the smallest surrounding rectangle parallel to the coordinate axes. (See
smallest_rectangle1.) -
'rectangle2': Each region is displayed by the smallest surrounding rectangle. (See
smallest_rectangle2.) -
'convex': Each region is displayed by its convex hull (See
convexity.) -
'icon': Each region is displayed by the icon set with
set_iconin the center of gravity.
Attention🔗
Caution is advised for gray value output operators with output parameter settings that use region output.
Execution information🔗
Execution information
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Processed without parallelization.
Parameters🔗
WindowHandle (input_control) window → (handle)
Window handle.
Shape (input_control) string → (string)
Region output mode.
Default: 'original'
List of values: 'convex', 'ellipse', 'icon', 'inner_circle', 'original', 'outer_circle', 'rectangle1', 'rectangle2'
Example🔗
(HDevelop)
read_image(Image,'fabrik')
regiongrowing(Image,Seg,5,5,6,100)
set_colored(WindowHandle,12)
set_shape(WindowHandle,'rectangle2')
disp_region(Seg,WindowHandle)
Result🔗
set_shape returns 2 (H_MSG_TRUE) if the parameter is correct and
the window is valid. Otherwise an exception is raised.
Combinations with other operators🔗
Module🔗
Foundation