00001 #ifndef __ILargeRampThresholdOp__
00002 #define __ILargeRampThresholdOp__
00003
00004
00005
00039 #include <stdio.h>
00040
00041 #include "ILargeMorphologicalOp.hpp"
00042
00043 #include "ILargeLocalThresholdOp.hpp"
00044 #include "ILargeTextureThresholdOp.hpp"
00045
00046 class ILargeRampThresholdOp : public ILargeMorphologicalOp
00047 {
00048 protected:
00049
00050 bool applied;
00051
00052 int up;
00053 int low;
00054
00055 ILargeLocalThresholdOp dyt;
00056 ILargeTextureThresholdOp tet;
00057
00058 protected:
00059
00060 virtual int operation(AnImage* src, int channel, int i, int j){return 0;}
00061
00062 public:
00063
00064 ILargeRampThresholdOp(bool used=false){low= 0; up= 255; applied= used;}
00065 ILargeRampThresholdOp(int lowLabel, int upLabel, bool used=true)
00066 {low= lowLabel; up= upLabel; applied= used;}
00067 ILargeRampThresholdOp(StructuredElement* aStructuredElement, int lowLabel=0, int upLabel=255, bool used=true);
00068 virtual ~ILargeRampThresholdOp(){}
00069
00070 virtual void setUsage(bool use){ applied= use; }
00071
00072 virtual void setIterations(int iter){dyt.setIterations(iter); tet.setIterations(iter);}
00073
00074 virtual void setStructuredElement(StructuredElement* aStructuredElement);
00075
00076 virtual AnImage* filter(AnImage* src, AnImage* dest=0);
00077
00078 virtual void report(FILE* file){}
00079 };
00080
00081
00082 #endif