CImExtract:new
The new method creates an instance of the CImExtract class. You must call new before using any class methods or properties. Note that this object can also be created using the new_imextract function.
C = CImExtract:new() Creates a default CImExtract object with properties initialized to default values. C = CImExtract:new( Params ) Creates a CImExtract object with default properties updated to values in the ImExtractParams table Params. C = CImExtract:new( 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 of these 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 |
|
|
|
|
-- 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, delete, new_imextract, ImExtractParams Table
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.