DIPlib Documentation - ©1995-2013 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_int`s, 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 type | Name | Description
`dip_PixelHeap` | `heap` | The heap structure
`dip_int *` | `coords` | Coordinates to be pushed
`void *` | `pointer` | Pointer to be pushed
`dip_sfloat` | `value` | Value to be pushed

## SEE ALSO

`PixelHeapNew`, `StablePixelHeapNew`, `PixelQueueNew`, `PixelHeapFree`, `PixelHeapPop`, `PixelHeapIsEmpty`