Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

ILargeMorphologicalOp.hpp

00001 #ifndef __ILargeMorphologicalOp__
00002 #define __ILargeMorphologicalOp__
00003 
00004 
00005 
00024 #include <stdio.h>
00025 
00026 #include "IMorphologicalOp.hpp"
00027 
00028 #include "StructuredElement.hpp"
00029 
00030 
00031 class ILargeMorphologicalOp : public IMorphologicalOp
00032 {
00033 protected:
00034 
00035 int                             iterations;
00036 
00037 StructuredElement*      structuredElement;                      // byte image
00038 
00039 int                             histo[65536];                           // support 8 and 16 bit
00040 int                             minHisto, maxHisto;
00041                                          
00042 protected:
00043 
00044 
00045 virtual void    init(AnImage* src, int channel, int i, int j);          // populate first histo
00046 virtual int             operation(AnImage* src, int channel, int i, int j)=0;
00047 virtual void    update(AnImage* src, int channel, int i, int j, int idir);
00048 
00049 virtual AnImage* singleFilter(AnImage* src, AnImage* dest=0);
00050 
00051 public:
00052         
00053 ILargeMorphologicalOp(int iter=1)
00054                 {structuredElement=0; iterations=iter; }
00055 ILargeMorphologicalOp(StructuredElement*        aStructuredElement, int iter=1)
00056                 {structuredElement= aStructuredElement; iterations=iter; }
00057 
00058 virtual ~ILargeMorphologicalOp(){}
00059 
00060 virtual void setIterations(int iter){iterations=iter;}
00061 
00062 virtual void setStructuredElement(StructuredElement*    aStructuredElement)
00063                 {structuredElement= aStructuredElement;}
00064 
00065 virtual int     getMinimum(){ return minHisto; }
00066 virtual int     getMaximum(){ return maxHisto; }
00067 
00068 virtual AnImage* filter(AnImage* src, AnImage* dest=0);
00069 
00070 virtual void report(FILE* file){}
00071 };
00072 
00073 
00074 #endif
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com