new_measurepoints
The new_measurepoints function is a non-class version of the CMeasurePoints:new method which creates and returns a new CMeasurePoints object. You must create the object before using any class methods or properties.
C = new_measurepoints() Creates a default CMeasurePoints object with properties initialized to default values. C = new_measurepoints( Params ) Creates a CMeasurePoints object with default properties updated to values in the PointParams Table, Params. C = new_measurepoints( CMeasurePoints_old ) |
This is a copy constructor. It creates a new CMeasurePoints object initialized to the members of theCMeasurePoints_old argument.
The following script creates a new CMeasurePoints object, attaches an image window and an image, then draws an angle on the image after moving adjusting the passed coordinates to the nearby centroid position.
|
-- create a new CMeasurePoints |
|
|
|
-- PointParams properties to change |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- connect to an image window |
|
-- exit if no image window |
-- grab an image from the window, V |
|
--DO NOT declare I as "local" inside the block |
|
|
|
|
-- pick the image from the CImageView V |
|
-- exit if no image |
|
|
|
-- pick the only image in the window |
|
|
|
-- coordinates of point 1 |
|
-- Add the point and draw it on the image |
CMeasurePoints class, new, delete, PointParams Table
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.