|
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.
Syntax
|
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.
Example
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.
|
E = CImExtract:new()
|
|
|
|
|
|
Params =
|
|
|
{
|
|
|
bProcFilter = true,
|
|
|
bFilterUseSepMin = true,
|
|
|
nFilterSepMin = 10,
|
|
|
bFilterUseAreaMax = true,
|
|
|
nFilterAreaMax = 100,
|
|
|
nBgMethod = 1,
|
|
|
nDetectTreshold = 45,
|
|
|
nDetectTest = 0,
|
|
|
}
|
|
|
E:SetParams(Params)
|
|
|
|
|
|
V = attachlist_imageview()
|
|
|
Assert( V, "No image window")
|
|
|
|
|
|
if V:Count() > 1 then
|
|
|
I = CImage:AttachFromList( V )
|
|
|
Assert( I, "No Images available")
|
|
|
else
|
|
|
I = V:GetImage()
|
|
|
end
|
|
|
|
|
|
bSuccess = E:Extract(I)
|
|
Related Topics
CImExtract class
delete
new_imextract
ImExtractParams Table
Mira Pro x64 Script User's Guide, v.8.76 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.
|