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

Clip

Point operation

SYNOPSIS

#include "dip_point.h"

dip_Error dip_Clip ( in, out, clipLow, clipHigh, clipFlag )

DATA TYPES

integer, float

FUNCTION

Clips in at either the minimum value clipLow of the maximum value clipHigh or both. If the flag DIP_CLIP_THRESHOLD_AND_RANGE is specified, the clip bound are defined by clipLow +/- clipHigh/2.

ARGUMENTS

Data typeNameDescription
dip_ImageinInput image
dip_ImageoutOutput image
dip_floatclipLowLower clip bound value
dip_floatclipHighHigher clip bound value
dipf_ClipclipFlagClip flag

The following dipf_Clip flags are defined:

NameDescription
DIP_CLIP_BOTHclip both the lower and upper bound
DIP_CLIP_LOWclip lower bound only
DIP_CLIP_HIGHclip upper bound only
DIP_CLIP_THRESHOLD_AND_RANGEuse clipLow and clipHigh as threshold and range value
DIP_CLIP_LOW_AND_HIGH_BOUNDSsame as DIP_CLIP_BOTH

SEE ALSO

Threshold, RangeThreshold, ErfClip, ContrastStretch