Name
dev_set_shapedev_set_shapeDevSetShapedev_set_shapeDevSetShapeDevSetShape — Define the region output shape.
dev_set_shape( : : Shape : )
Herror dev_set_shape(const char* Shape)
Herror T_dev_set_shape(const Htuple Shape)
Herror dev_set_shape(const HTuple& Shape)
void HWindow::DevSetShape(const HTuple& Shape) const
dev_set_shapedev_set_shapeDevSetShapedev_set_shapeDevSetShapeDevSetShape defines the shape that is used for displaying regions.
The available shapes can be queried with query_shapequery_shapeQueryShapequery_shapeQueryShapeQueryShape.
These shapes are supported:
- 'original'"original""original""original""original""original":
-
The shape is displayed unchanged. Nevertheless
modifications via parameters like
dev_set_line_widthdev_set_line_widthDevSetLineWidthdev_set_line_widthDevSetLineWidthDevSetLineWidth can take place.
This is also true for all other modes.
- 'outer_circle'"outer_circle""outer_circle""outer_circle""outer_circle""outer_circle":
-
Each region is displayed by the smallest surrounding
circle. (See smallest_circlesmallest_circleSmallestCirclesmallest_circleSmallestCircleSmallestCircle.)
- 'inner_circle'"inner_circle""inner_circle""inner_circle""inner_circle""inner_circle":
-
Each region is displayed by the largest included
circle. (See inner_circleinner_circleInnerCircleinner_circleInnerCircleInnerCircle.)
- 'ellipse'"ellipse""ellipse""ellipse""ellipse""ellipse":
-
Each region is displayed by an ellipse with the same
moments and orientation (See elliptic_axiselliptic_axisEllipticAxiselliptic_axisEllipticAxisEllipticAxis.)
- 'rectangle1'"rectangle1""rectangle1""rectangle1""rectangle1""rectangle1":
-
Each region is displayed by the smallest surrounding
rectangle parallel to the coordinate axes. (See
smallest_rectangle1smallest_rectangle1SmallestRectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1.)
- 'rectangle2'"rectangle2""rectangle2""rectangle2""rectangle2""rectangle2":
-
Each region is displayed by the smallest surrounding
rectangle. (See smallest_rectangle2smallest_rectangle2SmallestRectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2.)
- 'convex'"convex""convex""convex""convex""convex":
-
Each region is displayed by its convex hull (See
shape_transshape_transShapeTransshape_transShapeTransShapeTrans.)
- 'icon'"icon""icon""icon""icon""icon":
-
Each region is displayed by the icon set with
set_iconset_iconSetIconset_iconSetIconSetIcon in the center of gravity.
For more information see the description of the operator
set_shapeset_shapeSetShapeset_shapeSetShapeSetShape.
However, in contrast to that operator the selected shape is also used for
all new graphics windows that are opened afterwards.
Using the code export feature of HDevelop, the code that is generated
for this operator may have a different behavior than the related
HALCON operator.
For a detailed description of the code export of HDevelop graphics
operators into the different programming languages see in the
“HDevelop User's Guide” the chapter Code Export
-> General Aspects of Code Generation
-> Graphics Windows.
Region output mode.
Default value:
'original'
"original"
"original"
"original"
"original"
"original"
List of values: 'convex'"convex""convex""convex""convex""convex", 'ellipse'"ellipse""ellipse""ellipse""ellipse""ellipse", 'icon'"icon""icon""icon""icon""icon", 'inner_circle'"inner_circle""inner_circle""inner_circle""inner_circle""inner_circle", 'original'"original""original""original""original""original", 'outer_circle'"outer_circle""outer_circle""outer_circle""outer_circle""outer_circle", 'rectangle1'"rectangle1""rectangle1""rectangle1""rectangle1""rectangle1", 'rectangle2'"rectangle2""rectangle2""rectangle2""rectangle2""rectangle2"
read_image(Image,'monkey')
threshold(Image,Region,128,255)
connection(Region,Regions)
dev_set_shape('rectangle1')
dev_set_draw('margin')
dev_set_line_width(5)
dev_clear_window()
dev_display(Regions)
If the values of the specified parameters are correct,
dev_set_shapedev_set_shapeDevSetShapedev_set_shapeDevSetShapeDevSetShape returns 2 (H_MSG_TRUE). Otherwise an
exception is raised and an error code returned.
dev_displaydev_displayDevDisplaydev_displayDevDisplayDevDisplay,
dev_set_colordev_set_colorDevSetColordev_set_colorDevSetColorDevSetColor
set_shapeset_shapeSetShapeset_shapeSetShapeSetShape,
dev_set_line_widthdev_set_line_widthDevSetLineWidthdev_set_line_widthDevSetLineWidthDevSetLineWidth
Foundation