CImage:KwdSetSect


The KwdSetSect method formats a region section keyword and inserts it into the image header. The section keyword specifies rectangular image coordinates. An example of a region section keyword is BIASSEC, which has the format '[c1:c2,r1:r2]'.

Syntax

CImage:KwdSetSect( sKwd, c1,c2,r1,r2 )

where

    sKwd is the keyword name

    c1, c2, r1, and r2 are the coordinate values.

  

The region section is actually a string-value keyword with a special format. This method formats the 4 components into a region section string and then writes the string to the header. If the keyword name already exists, its value is overwritten by the new value.

Example

Suppose a CImage named I exists. The following script sets the BIASSEC keyword to the region string '[1024:1043,1038:1050]':

 

c1 = 1024 ; c2 = 1043

-- column bounds

r1 = 1038 ; r2 = 1050

-- row bounds

I:KwdSetSect("BIASSEC",c1,c2,r1,r2)

-- set the FILTER keyword

Related Topics

KwdSetStr

CImage class