Operators |
gen_random_regions — Create random regions like circles, rectangles and ellipses.
gen_random_regions( : Regions : Type, WidthMin, WidthMax, HeightMin, HeightMax, PhiMin, PhiMax, NumRegions, Width, Height : )
The operator gen_random_regions generates circles, rectangles and ellipses whose parameters are determined at random. In each case only one lower, upper limit respectively, is given. The position is always random and cannot be determined by parameters. The parameter NumRegions indicates how many regions shall be created.
Created regions.
Type of regions to be created.
Default value: 'circle'
List of values: 'circle' , 'ellipse' , 'rectangle1' , 'rectangle2' , 'ring'
Minimum width of the region.
Default value: 10.0
Suggested values: 1.0, 3.0, 5.0, 10.0, 20.0, 40.0, 80.0
Typical range of values: 1.0 ≤ WidthMin ≤ 511.0 (lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: WidthMin > 0
Maximum width of the region.
Default value: 20.0
Suggested values: 1.0, 3.0, 5.0, 10.0, 20.0, 40.0, 80.0
Typical range of values: 1.0 ≤ WidthMax ≤ 511.0 (lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: WidthMax > 0
Minimum height of the region.
Default value: 10.0
Suggested values: 1.0, 3.0, 5.0, 10.0, 20.0, 40.0, 80.0
Typical range of values: 1.0 ≤ HeightMin ≤ 511.0 (lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: HeightMin > 0
Maximum height of the region.
Default value: 30.0
Suggested values: 1.0, 3.0, 5.0, 10.0, 20.0, 40.0, 80.0
Typical range of values: 1.0 ≤ HeightMax ≤ 511.0 (lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: HeightMax > 0
Minimum rotation angle of the region.
Default value: -0.7854
Suggested values: 0.0, 0.1, 0.3, 0.6, 0.9, 1.2, 1.5
Typical range of values: 0.0 ≤ PhiMin ≤ 6.28 (lin)
Restriction: PhiMin > 0
Maximum rotation angle of the region.
Default value: 0.7854
Suggested values: 0.0, 0.1, 0.3, 0.6, 0.9, 1.2, 1.5
Typical range of values: 0.0 ≤ PhiMax ≤ 6.28 (lin)
Restriction: PhiMax > 0
Number of regions.
Default value: 100
Suggested values: 1, 5, 20, 100, 200, 500, 1000, 2000
Typical range of values: 1 ≤ NumRegions ≤ 2000 (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: NumRegions > 0
Maximum horizontal expansion.
Default value: 512
Suggested values: 128, 256, 512, 1024
Typical range of values: 1 ≤ Width ≤ 1024 (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: Width > 0
Maximum vertical expansion.
Default value: 512
Suggested values: 128, 256, 512, 1024
Typical range of values: 1 ≤ Height ≤ 1024 (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: Height > 0
If the parameter values are correct gen_random_regions returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised. The clipping according to the current image format is determined by the operator set_system('clip_region',<'true'/'false'>).
Foundation
Operators |