CImExtract:Copy
The Copy method copies the properties of another CImExtract object or ImExtractParams table into an existing CImExtract object. Both CImExtract objects must already exist before calling Copy. To copy another CImExtract object or an ImExtractParams table at creation time, use the copy-constructor form of the CImExtract:new method or the new_imextract function.
bSuccess = CImExtract:Copy( CImExtract_old ) bSuccess = CImExtract:Copy( ImExtractParams_old ) |
where CImExtract_old is another CImExtract object.
ImExtractParams is a table of type ImExtractParams containing selected properties to be copied.
On failure, bSuccess is returned as true.
Use this method to copy CImExtract properties from one CImExtract object to another that already exists (i.e., not as part of its creation). For two objects B and A, do not use the trivial statement B = A, as this simply makes B an alias for to the object A. Instead, use B:Copy(A) for the new object B and old object A.
Suppose a CImExtract object E1 exists. The following script shows two ways to copy the properties of E1 or an ImExtractParams table into another CImExtract object E2. Note that the properties of E1 or the ImExtractParams table could also be copied into E2 at creation time using the new constructor or the new_imextract function.
|
-- create an CImExtract E2 |
|
-- copy the properties of object E1 |
|
|
|
-- ImExtractParams properties to change |
|
|
|
-- each name=value pair must end with a comma |
|
|
|
|
|
|
|
|
|
|
|
-- threshold value = 45 |
|
-- use pixels greater than or equal to threshold |
|
|
|
-- copy selected properties from Params |
|
|
CImExtract class, new_imextract, ImExtractParams
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.