DIPlib Documentation - ©1995-2013 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 type | Name | Description
`dip_Image` | `in` | Input image
`dip_Image` | `out` | Output image
`dip_float` | `clipLow` | Lower clip bound value
`dip_float` | `clipHigh` | Higher clip bound value
`dipf_Clip` | `clipFlag` | Clip flag

The following `dipf_Clip` flags are defined:

Name | Description
`DIP_CLIP_BOTH` | clip both the lower and upper bound
`DIP_CLIP_LOW` | clip lower bound only
`DIP_CLIP_HIGH` | clip upper bound only
`DIP_CLIP_THRESHOLD_AND_RANGE` | use `clipLow` and `clipHigh` as threshold and range value
`DIP_CLIP_LOW_AND_HIGH_BOUNDS` | same as `DIP_CLIP_BOTH`

## SEE ALSO

`Threshold`, `RangeThreshold`, `ErfClip`, `ContrastStretch`