- flag as active/inactive the elements at the next lower pyramid layer
char *cxPyrActiveNext(cxPyramid *pyr, long curLayer, long dstLayer, char *flg)
integer function cxPyrActiveNext( pyr, curLayer, dstLayer, flg )
Input pyramid structure for which computations are to be performed.
Input layer of currently active elements (1-based value).
Input layer of next active elements (1-based value).
Input byte array indicating which elements are currently active in layer
FUNCTION RETURN VALUE
Returns a pointer to a byte array indicating (with non-zero value) which elements
are active in layer dstLayer, given that the flg elements are active
in layer curLayer.
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.
cxPyrActiveNext accepts a byte vector of indicators showing
which elements are active in the pyramid pyr at a given layer,
and from this information computes which subordinate elements are
active at the lower layer dstLayer. If dstLayer is greater
than curLayer, the routine returns an indicator vector of all
elements that can be reached from the top of the input pyramid.
Position i of the returned byte array holds
a 0 if element i of the layer is inactive, a 1 if the element is active
and contained within only one parent element, or a 2 if the element is active
and contained within more than one parent element.
cxPyrActiveNext is useful in circumstances where a subset of the
elements at a given level are to be manipulated, and the caller wishes
to identify the subordinate elements to manipulate at a lower level.
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 indicator array is considered to be owned by the caller
of cxPyrActiveNext and should be freed (with free(3C)) after use.
Other routines exist to determine the active elements at a specified layer and
to return a variable-length array of only the active elements.
Last modified: Mon Nov 6 16:33:42 GMT 2000
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1999