CImage:KwdGetSect


The KwdGetSect method returns the 4 values from a section type keyword. An example of such a keyword is BIASSEC, which has a value with the format '[c1:c2,r1:r2]', as in '[1030:1044,1:1024]'.

Syntax

c1, c2, r1, r2 = CImage:KwdGetSect( sKwd )

bullet.gif    sKwd is the keyword name.

bullet.gif    c1, c2 are the first and second column values of the keyword.

bullet.gif    r1, r2 are the first and second row values of the keyword.

Remarks

This method parses the section keyword into its 4 components. If the keyword is not in the image header, then the default values 0, 0, 0, 0 are returned. No test is performed to determine if the keyword actually exists. To test whether the keyword exists, call KwdExists before this method. Alternatively, KwdGetSectEx returns 5 parameters: the 4 numeric components and a boolean status value.

Example

Suppose a CImage named I exists and contains keyword "BIASSEC". The following script returns the region components stored in the BIASSEC keyword:

c1,c2,r1,r2 = I:KwdGetSect("BIASSEC")

-- read the keyword value

Printf( "R= %d,%d, %d,%d", c1,c2,r1,r2)

-- print the values

Related Topics

CImage class

KwdGetSectEx

KwdSetSect

KwdGetNum

KwdGetStr

KwdGetVal


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.