ClipMinMax
Description
Set values below and above two given thresholds to the corresponding threshold level.
Full scope is iplt::alg::ClipMinMax in C++, resp iplt.alg.ClipMinMax in Python.
Public Interface
Constructor
- ClipMinMax(double low, double high)
- ClipMinMax(Complex low, Complex high)
Generates a ClipMinMax instance and sets the lower threshold to low and the higher threshold to high.
SetThresholds
- SetThresholds(double low, double high)
- SetThresholds(Complex low, Complex high)
Sets the lower threshold to low and the higher threshold to high.
Examples
C++
#include <iplt/image.hh> #include <iplt/alg/clip_min_max.hh> using namespace iplt; int main() { //all pixels with value lower than 0.7 will be set to 0.7 //all pixels with value higher than 114.2 will be set to 114.2 alg::ClipMinMax clip(0.7,114.2); ImageHandle img = LoadImage(<imagename>); img.ApplyIP(clip); return 0; }
Python
from iplt import * #all pixels with value lower than 0.7 will be set to 0.7 #all pixels with value higher than 114.2 will be set to 114.2 img = LoadImage(<imagename>) clip=alg.ClipMinMax() img.ApplyIP(clip)
Back to Algorithm List
