00001 #ifndef __ILargeMContrastStretchingOp__ 00002 #define __ILargeMContrastStretchingOp__ 00003 00004 00026 #include <stdio.h> 00027 00028 #include "ILargeMorphologicalOp.hpp" 00029 00030 #include "ILargeErosionOp.hpp" 00031 #include "ILargeDilatationOp.hpp" 00032 00033 class ILargeMContrastStretchingOp : public ILargeMorphologicalOp 00034 { 00035 protected: 00036 00037 int scale; // scale = image range 00038 00039 ILargeErosionOp erosion; 00040 ILargeDilatationOp dilatation; 00041 00042 protected: 00043 00044 virtual int operation(AnImage* src, int channel, int i, int j){return 0;} 00045 00046 public: 00047 00048 ILargeMContrastStretchingOp(int iter=1){dilatation.setIterations(iter); erosion.setIterations(iter); scale= 255;} 00049 ILargeMContrastStretchingOp(StructuredElement* aStructuredElement, int iter=5); 00050 virtual ~ILargeMContrastStretchingOp(){} 00051 00052 virtual void setImageScale(int ascale){scale=ascale;} 00053 virtual void setIterations(int iter){dilatation.setIterations(iter); erosion.setIterations(iter);} 00054 00055 virtual void setStructuredElement(StructuredElement* aStructuredElement); 00056 00057 virtual AnImage* filter(AnImage* src, AnImage* dest=0); 00058 00059 virtual void report(FILE* file){} 00060 }; 00061 00062 00063 #endif