00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef FILTER_CLIP_H
00019 #define FILTER_CLIP_H
00020
00021 #include <odindata/filter.h>
00022
00023 class FilterMin : public FilterStep {
00024
00025 JDXfloat thresh;
00026
00027 STD_string label() const {return "min";}
00028 STD_string description() const {return "Clip all values below mininum value";}
00029 bool process(Data<float,4>& data, Protocol& prot) const;
00030 FilterStep* allocate() const {return new FilterMin();}
00031 void init();
00032 };
00033
00035
00036 class FilterMax : public FilterStep {
00037
00038 JDXfloat thresh;
00039
00040 STD_string label() const {return "max";}
00041 STD_string description() const {return "Clip all values above maximum value";}
00042 bool process(Data<float,4>& data, Protocol& prot) const;
00043 FilterStep* allocate() const {return new FilterMax();}
00044 void init();
00045 };
00046
00048
00049 class FilterType : public FilterStep {
00050 protected:
00051 JDXstring type;
00052 float getThresh(bool upper)const;
00053 void init();
00054 };
00055
00056 class FilterTypeMin : public FilterType {
00057 STD_string label() const {return "typemin";}
00058 STD_string description() const {return "Clip all values below mininum of a specific datatype";}
00059 bool process(Data<float,4>& data, Protocol& prot) const;
00060 FilterStep* allocate() const {return new FilterTypeMin();}
00061 };
00062
00063 class FilterTypeMax : public FilterType {
00064 STD_string label() const {return "typemax";}
00065 STD_string description() const {return "Clip all values above maximum of a specific datatype";}
00066 bool process(Data<float,4>& data, Protocol& prot) const;
00067 FilterStep* allocate() const {return new FilterTypeMax();}
00068 };
00069
00070 #endif