DIPlib Documentation - ©1995-2005 Pattern Recognition Group, Delft University of Technology.

Select

configurable selection function

SYNOPSIS

#include "dip_math.h"

dip_Error dip_Select ( in1, in2, in3, in4, out, selector )

DATATYPES

binary, integer, float

FUNCTION

This function can perform various pixel-by-pixel comparisons (smaller, smaller- equal, equal, not equal, greater-equal, greater) between in1 ans in2. If the result of the comparison is true, the corresponding pixel value of in3 is copied to out, otherwise it is copied from in4. In short the following operation is performed for each pixel in the five images:

out = in1 selector in2 ? in3 : in4

The images in2, in3 and in4 can be 0-D images acting as constants.

ARGUMENTS

Data typeNameDescription
dip_Imagein1First input
dip_Imagein2Second input
dip_Imagein2Third input
dip_Imagein2Fourth input
dip_ImageoutOutput
dipf_SelectselectorSelect flag
NameDescription
DIP_SELECT_LESSERLesser than
DIP_SELECT_LESSER_EQUALLesser or equal
DIP_SELECT_NOT_EQUALunequal
DIP_SELECT_EQUALequal
DIP_SELECT_GREATER_EQUALgreater or equal
DIP_SELECT_GREATERgreater

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