Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XieAreaStats(3X) — OSF/1 X2.0-8 MIPS

Media Vault

Software Library

Restoration Projects

Artifacts Sought

XieAreaStats(3X)  —  Subroutines

Digital

NAME

XieAreaStats − This routine creates a new image by transforming an existing source image using an area statistics operator. 

C Format

dst_id = XieAreaStats(src_id, idc_id, op, edge)

C Argument Information

XiePhoto    src_id;
XieIdc     idc_id;
unsigned long  op;
unsigned long  edge;

RETURN VALUES

The routine returns the identifier of the newly created image in the dst_id argument. You can free the photomap using the XieFreeResource routine. 

PARAMETERS

src_idThe src_id argument specifies the unbound photomap identifier of the source image. 

idc_idThe idc_id argument specifies the identifier of the IDC of type ROI that defines the region of the source image over which the routine operates.  If you specify a value of 0, the routine operates over the entire source image. 

opThe op argument specifies the statistical operation performed by the routine. 

Symbol Operation Performed
XieK_Minimum Minimum pixel value in area
XieK_Maximum Maximum pixel value in area
XieK_Mean Mean pixel value in area
XieK_StdDev Standard deviation of the pixel distribution in area
XieK_Variance Variance of the pixel distribution in area

edgeThe edge argument specifies the size in pixels of the local area square region surrounding each pixel the routine uses in the statistical operation. 

DESCRIPTION

This routine creates a new image by transforming an existing source image using an area statistics operator.  The routine calculates the statistical information pixel by pixel based on the local area surrounding each pixel.  The edge argument determines the size of the square local area. 

The unbound source photomap must be bitonal or gray scale and can be either constrained or unconstrained and the destination image is the same. 

Specification of a nonexistent photomap generates a BadIdChoice error and specification of a nonexistent IDC or an IDC of type TMP generates a BadIdChoice error. If the server cannot allocate the destination photomap, the routine returns a BadAlloc error. Specification of a multispectral source image returns a BadMatch error. 

If you selected computation events using the XieSelectEvents routine, the routine adds an XieK_ComputationEvent to the X11 event queue when the routine is completed. 

XIE Events and Error Messages

Protocol Messages: X_ieArea

XIE event returned: XieK_ComputationEvent if immediate execution and computation events are selected

XieLib errors: None

XieServer errors: BadIDChoice -- Invalid identifier

BadAlloc -- Insufficient server resources

BadMatch -- The source image is multispectral

BadValue -- Invalid area operator or IDC does not intersect the image

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026