CMeasureAngles:Add
The Add method adds an angle marker to the image and reports measurements of the angle in the sense of the second side minus the first side. The Angle Measurement toolbar is opened if not already open. See the toolbar description in the Mira User's Guide.
bSuccess = CMeasureAngles:Add( Image_obj, xv, yv, x1, y1, x2, y2 ) where Image_obj is a CImage object. xy and yv are the coordinates of the angle vertex. x1 and y1 are the coordinates of the endpoint of the first side. x2 and y2 are the coordinates of the endpoint of the second side. On success, bSuccess is returned as true. |
Suppose a CImage object I exists. The following script creates a new CMeasureAngles object and measures an angle on the image. The passed coordinates are updated to the local centroid position by setting properties in the AngleParams table.
|
-- create a new CMeasureAngles object |
|
|
|
-- AngleParams properties to change |
|
|
|
|
|
|
|
|
|
|
|
-- centroid the vertex |
|
-- centroid the vertex |
|
-- centroid the endpoints of both sides |
|
-- centroid the endpoints of both sides |
|
|
|
|
|
|
|
-- connect to an image window |
|
-- exit if no image window |
-- grab an image from the window, V |
|
|
|
|
-- pick the image from CImageView V |
|
-- exit if no image |
|
|
|
-- pick the only image in the window |
|
|
|
-- initial coordinates of the vertex |
|
-- initial coordinates of endpoint 1 |
|
-- initial coordinates of endpoint 2 |
|
-- Add the measurement to the image |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.