diplib/library/clamp_cast.h file

Defines dip::clamp_cast. This file is always included through diplib.h. See Pixel data types.

Contents

Functions

template<typename TargetType, typename SourceType, <SFINAE> = 0>
auto dip::clamp_cast(SourceType v) -> TargetType constexpr
Casts a value of any pixel type to any other pixel type, clamping it to the destination range.