|
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.
Syntax
|
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.
Remarks
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.
Example
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.
|
E2 = new_imextract()
|
|
|
bSuccess =
E2:Copy(E1)
|
|
|
|
|
|
Params =
|
|
|
{
|
|
|
bProcFilter = true,
|
|
|
bFilterUseSepMin = true,
|
|
|
nFilterSepMin = 10,
|
|
|
bFilterUseAreaMax = true,
|
|
|
nFilterAreaMax=
100,
|
|
|
nBgMethod = 1,
|
|
|
nDetectTreshold = 45,
|
|
|
nDetectTest = 0,
|
|
|
}
|
|
|
E2:Copy(Params)
|
|
|
|
|
Related Topics
CImExtract class
new_imextract
ImExtractParams
Mira Pro x64 Script User's Guide, v.8.76 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.
|