CMeasurePoints:Add
The Add method adds a point marker to the image and reports measurements of its coordinates and pixel value. The Point Measurement toolbar is opened if not already open. See the toolbar description in the Mira User's Guide.
bSuccess = CMeasurePoints:Add( Image_obj, x, y ) where Image_obj is a CImage object. x and y are the coordinates of the point. On success, bSuccess is returned as true. |
Suppose a CImage object I exists. The following script creates a new CMeasurePoints object and measures its coordinates and pixel value. The passed coordinates are updated to the local centroid position by setting properties in the PointParams table.
|
-- create a new CMeasurePoints object |
|
|
|
-- PointParams properties to change |
|
|
|
|
|
|
|
|
|
|
|
-- centroid the point |
|
-- centroid the point |
|
|
|
|
|
|
|
-- 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 point |
|
-- Add the measurement to the image |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.