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

# ImageSortIndices

Sort indices to image data

## SYNOPSIS

`#include "dip_sort.h"`

dip_Error dip_ImageSortIndices ( in, indices, algorithm, flags )

## FUNCTION

Sorts a list of indices rather than the data itself using the algorithm specified by `algorithm`. Unless the `DIP_ISI_USE_INDICES`, the `indices` image will be initialised with one index for each pixel in the image.

## ARGUMENTS

Data type | Name | Description
`dip_Image` | `in` | Input
`dip_Image` | `indices` | Indices
`dip_Sort` | `algorithm` | Sort algorithm
`dipf_ImageSortIndices` | `flags` | Flags

The `sortType` parameter is one of:

Name | Description
`DIP_SORT_DEFAULT` | Default sort algorithm
`DIP_SORT_QUICK_SORT` | Quick sort
`DIP_SORT_DISTRIBUTION_SORT` | Distribution sort
`DIP_SORT_INSERTION_SORT` | Insertion sort

The `dipf_ImageSortIndices` enumeration consists of the following flags:

Name | Description
`DIP_ISI_USE_INDICES` | Use the indices as given in the indices image

## SEE ALSO

General information about sorting

`DistributionSort`, `InsertionSort`, `QuickSort`, `Sort`, `ImageSort`, `SortIndices`, `SortIndices16`

DIPlib on-line documentation | Function reference | Global function index