Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

XieMath(3X)  —  Subroutines

Digital

NAME

XieMath − This routine creates a copy of an image by applying a specified mathematical function to each pixel of an existing source image. 

C Format

dst_photo_id = XieMath(src_id, idc_id, operator, constrain)

C Argument Information

XiePhoto    dst_photo_id;
XiePhoto    src_id;
XieIdc     idc_id;
unsigned long  operator;
unsigned long  constrain;

RETURN VALUES

If the source image is an unbound photomap, the routine returns the identifier of the new photomap in the dst_photo_id argument.  Otherwise, the routine returns the identifier of the photoflo to which the processing element is appended. You can free the photomap using the XieFreeResource routine. 

PARAMETERS

src_idThe src_id argument specifies the identifier of the source image. If the source image is an unbound photomap, the operation is performed immediately. Otherwise, a processing element is appended to the specified photoflo with execution pending a call to the XieExecuteFlo routine. The photoflo is specified explicitly if the source image is a photoflo, or implicitly if the source image is a photomap or phototap. 

idc_idThe idc_id argument specifies the optional CPP or 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 the entire source image. 

operatorThe operator argument specifies the mathematical function the routine applies to each pixel in the source image. 

Symbol Function
XieK_Exp Exponential
XieK_Ln Natural logarithm
XieK_Log2 Logarithm base 2
XieK_Log10 Logarithm base 10
XieK_Square Square
XieK_Sqrt Square Root

constrainThe constrain argument is a Boolean flag that specifies whether or not the routine constrains the output data before writing it to the output photomap.  If you specify a value of True, the routine constrains the output data using the current constraint model. Otherwise if you specify a value of False, the data remains unconstrained. 

DESCRIPTION

This routine creates a copy of an image by applying a specified mathematical function to each pixel of an existing source image. 

The source image can be either bitonal, gray scale, or multispectral and can be either constrained or unconstrained. The resulting photomap data is unconstrained unless you specify a value of True for the constrain argument.  The output photomap has the same spatial dimensions as the source image.  The area over which the routine operates is defined by an IDC, if you specify 1. Otherwise, the routine operates over the entire area of the source image. 

If the operation is performed immediately and 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_ieMath

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

BadValue -- The generated result for a pixel value is undefined or out of range or the IDC does not intersect the source image

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