cxPyrLayerClean - removes selected items from one layer of a pyramid
#include <cx/Pyramid.h>

void cxPyrLayerClean(cxPyramid *pyr, long layer, int *mark)
subroutine cxPyrLayerClean(pyr, layer, mark)
integer pyr
integer layer
integer mark(*)
Input pyramid data structure.
Input integer specifying which layer to modify (1-based value).
Input Boolean array specifying which elements to keep at the given layer.
cxPyrLayerClean takes a pyramid and an array of markers for the specified layer of the pyramid's elements. If the marker for an element is non-zero, cxPyrLayerClean keeps that element and its connections to the rest of the pyramid. All elements not marked are stripped out of the cxConnection structure at that layer, as well as their connections to the next layer.

The layer index is 1-based, so that a layer of 1 indicates the cxConnection structure at pyr->layer[0].relation. Note that a layer of 0 indicates the baseLattice. mark must be an array of length at least

  pyr->layer[layer - 1].relation->numElements
for layer greater than 0, or
for layer equal to 0. As a convenience, if NULL is passed in for mark, all elements are kept.

cxPyrLayerClean does not restructure the indices of the next higher cxConnection structure; cxConnRemap performs this function. Therefore using cxPyrLayerClean at internals layers of the pyramid without also using cxConnRemap may produce erroneous output.

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