00001 #ifndef __ILocalThresholdOp__ 00002 #define __ILocalThresholdOp__ 00003 00004 00005 00026 #include <stdio.h> 00027 00028 #include "IMorphologicalOp.hpp" 00029 00030 #include "IErosionOp.hpp" 00031 #include "IDilatationOp.hpp" 00032 00033 class ILocalThresholdOp : public IMorphologicalOp 00034 { 00035 protected: 00036 00037 int up; 00038 int low; 00039 00040 IErosionOp erosion; // min 00041 IDilatationOp dilatation; // max 00042 00043 public: 00044 00045 ILocalThresholdOp(int lowLabel=0, int upLabel=255){low= lowLabel; up= upLabel;} 00046 ILocalThresholdOp(StructuredElement* aStructuredElement, int lowLabel=0, int upLabel=255); 00047 virtual ~ILocalThresholdOp(){} 00048 00049 virtual void setIterations(int iter){dilatation.setIterations(iter); erosion.setIterations(iter);} 00050 00051 virtual void setStructuredElement(StructuredElement* aStructuredElement); 00052 00053 virtual AnImage* filter(AnImage* src, AnImage* dest=0); 00054 00055 virtual void report(FILE* file){} 00056 }; 00057 00058 00059 #endif