cxPyrActiveList - list the active elements at a specified pyramid layer
#include <cx/Pyramid.h>

long *cxPyrActiveList(cxPyramid *pyr, long dstLayer, long *numActive)
integer function cxPyrActiveList( pyr, dstLayer, numActive )
integer pyr
integer dstLayer
integer numActive
Input pyramid structure for which computations are to be performed.
Input layer of next active elements (1-based value).
Output number of active elements in returned array at layer dstLayer.
Returns a pointer to a long array of indices of active elements in layer dstLayer, given that all elements at the top layer of the input pyramid are active. Returns a NULL if its input is malformed, if an allocation error occurs, or if the destination layer is in a compressed region. Returns a list of active vertices if dstLayer is zero, even in the presence of compression. cxPyrActiveList computes which subordinate elements are active at the layer dstLayer. This is an index vector of all elements that can be reached from the top of the input pyramid.

cxPyrActiveList is useful in circumstances where only the active elements at a given level are to be manipulated. This is the approved way of determining the pyramid elements which should be manipulated or displayed in any pyramid-based module (the alternative method of displaying all elements available at a given level is not correct).

The returned index array is considered to be owned by the caller of cxPyrActiveList and should be freed (with free(3C)) after use.

Other routines exist to flag elements at a specified layer as active/inactive and to return a variable-length array of the indices of active elements subordinate to the current layer.

cxPyramid(3E), cxPyrActiveNext(3E), cxPyrActive(3E).
Last modified: Mon Nov 6 16:33:41 GMT 2000
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1999