new_imextract
The new_imextract function is a non-class version of the CImExtract:new method which creates and returns a new CImExtract object. You must call new before using any class methods or properties.
C = new_imextract() Creates a default CImExtract object with properties initialized to default values. C = new_imextract( Params ) Creates a CImExtract object with default properties updated to values in the ImExtractParams Table, Params. C = new_imextract( CImExtract_old ) |
This is a copy constructor. It creates a new CImExtract object initialized to the members of theCImExtract_old argument.
The following script creates a new CImExtract object, attaches an image window and an image, then extracts sources from that image. An ImExtractParams table is used to set several specific properties. Note that each table entries must include a comma.
|
-- create a new CImExtract |
|
|
|
-- ImExtractParams properties to change |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- threshold value = 45 |
|
-- use pixels greater than or equal to threshold |
|
|
|
|
|
|
|
-- 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 |
|
|
|
|
|
-- run the image extraction procedure |
CImExtract class, new, delete, ImExtractParams Table
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.