DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

PixelHeapPush

Push item onto heap

SYNOPSIS

#include "dip_pixelqueue.h"

dip_Error dip_PixelHeapPush ( heap, coords, pointer, value )

FUNCTION

Pushes a pixel onto the heap. See PixelHeapNew for information on the heap data structure. All 3 values coords, pointer and value are stored, except if the heap was created with ndims set to 0, in which case the coords pointer is ignored.

coords is a pointer to an array of dip_ints, such as that obtained with dip_IntegerArray->array. It should have as many elements as the image dimensionality. pointer is a pointer to any memory location, and value is the value to be used when sorting.

ARGUMENTS

Data typeNameDescription
dip_PixelHeapheapThe heap structure
dip_int *coordsCoordinates to be pushed
void *pointerPointer to be pushed
dip_sfloatvalueValue to be pushed

SEE ALSO

PixelHeapNew, StablePixelHeapNew, PixelQueueNew, PixelHeapFree, PixelHeapPop, PixelHeapIsEmpty