Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

XieHistogram(3X)  —  Subroutines

Digital

NAME

XieHistogram − This routine calculates the frequency histogram for a photomap. 

C Format

data = XieHistogram(photo,idc,by_component)

C Argument Information

XiePhoto   photo;
XieIdc    idc;
BOOL     by_component;

RETURN VALUES

The routine returns the histogram data to an array of longwords pointed to by the data argument. Each entry in the array consists of a pixel value index and the number of pixels found to have that value. 

If the image is multispectral and the value of the by_component argument is True requesting 3 separate distributions, the index is a single value. Otherwise, the index is a list of 3 values. 

You can free the returned array using the XieFree routine. 

PARAMETERS

photoThe photo argument specifies the identifier of the source photomap, which must be constrained. 

idcThe idc argument specifies the identifier of the CPP or ROI that defines the region over which you want to calculate the histogram. If you specify a value of 0, the routine calculates the histogram over the entire source image. 

by_componentThe by_component argument specifies whether the routine calculates the frequency distribution for each component separately or for the 3 components combined. To obtain a frequency distribution for each component, specify a value of True. For a combined distribution, specify a value of False. 

When calculating a distribution for each component, the routine totals identical pixel values separately for each component. For a combined distribution, the routine totals identical red, green, blue (RGB) triplet values for all components combined. 

DESCRIPTION

This routine calculates the frequency histogram for a photomap.  The distribution reflects the population of all possible pixel values for a given photomap based on the actual data content. 

The routine can calculate the frequency distribution for a bitonal image, gray scale image, or a multispectral image. 

For multispectral images, only the per-component is currently supported.  Setting the by_component argument False results in a BadMatch error. 

XIE Events and Error Messages

Protocol Messages: X_ieCalcHist

XIE event returned: None

XieLib errors: Reply error, BadLength

XieServer errors: BadIDChoice -- Invalid identifier

BadAlloc -- Insufficient server resources

BadMatch -- The by_component argument is False and the source image is multispectral

BadValue -- IDC does not intersect source image

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