eLynx SDK
v3.3.0 C++ image processing API reference |
00001 //============================================================================ 00002 // ImageMorphologicalProcessingImpl.h Image.Component package 00003 //============================================================================ 00004 // Usage : image morphological processing interface implementation 00005 //---------------------------------------------------------------------------- 00006 // Copyright (C) 2007 by eLynx project 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU Library General Public 00010 // License as published by the Free Software Foundation; either 00011 // version 2 of the License, or (at your option) any later version. 00012 // 00013 // This library is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 // See the GNU Library General Public License for more details. 00017 //---------------------------------------------------------------------------- 00018 #ifndef __ImageMorphologicalProcessingImpl_h__ 00019 #define __ImageMorphologicalProcessingImpl_h__ 00020 00021 #include <elx/image/IImageMorphologicalProcessing.h> 00022 00023 namespace eLynx { 00024 namespace Image { 00025 00029 00030 template <class Pixel> 00031 class ExportedByImage ImageMorphologicalProcessingImpl : public IImageMorphologicalProcessing 00032 { 00033 public: 00034 virtual bool Apply(AbstractImage& ioImage, 00035 EMorphologicalFilterType iType, 00036 const ImageLub& iKernelMask, 00037 bool ibLuminance, uint32 iIteration, 00038 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00039 00040 virtual bool Apply(AbstractImage& ioImage, 00041 EMorphologicalFilterType iType, 00042 uint32 iWidth, bool ibCircular, 00043 bool ibLuminance, uint32 iIteration, 00044 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00045 00046 virtual bool ApplyMedian(AbstractImage& ioImage, 00047 uint32 iWidth, uint32 iHeight, 00048 uint32 iIteration, 00049 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00050 00051 virtual bool ApplyAdaptiveMedian(AbstractImage& ioImage, 00052 uint32 iWMax, 00053 uint32 iIteration, 00054 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00055 00058 static bool Apply(ImageImpl<Pixel>& ioImage, 00059 EMorphologicalFilterType iType, 00060 const ImageLub& iKernelMask, 00061 bool ibLuminance=true, 00062 uint32 iIteration=1, 00063 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00064 00065 static bool ApplyByChannel(ImageImpl<Pixel>& ioImage, 00066 EMorphologicalFilterType iType, 00067 const ImageLub& iKernelMask, 00068 uint32 iIteration=1, 00069 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00070 00071 static bool ApplyByLuminance(ImageImpl<Pixel>& ioImage, 00072 EMorphologicalFilterType iType, 00073 const ImageLub& iKernelMask, 00074 uint32 iIteration=1, 00075 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00076 00077 // ----------------------------------------------------------- 00078 static bool ApplyMedian3x3(ImageImpl<Pixel>& ioImage, 00079 uint32 iIteration=1, 00080 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00081 00082 static bool ApplyMedian3x3(ImageImpl<Pixel>& ioImage, 00083 const ImageLub& iImageMask, 00084 uint32 iIteration=1, 00085 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00086 00087 static bool ApplyMedianWxH(ImageImpl<Pixel>& ioImage, 00088 uint32 iWidth, uint32 iHeight, 00089 uint32 iIteration=1, 00090 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00091 00092 static bool ApplyAdaptiveMedian(ImageImpl<Pixel>& ioImage, 00093 uint32 iWidthMax, 00094 uint32 iIteration=1, 00095 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00097 }; 00098 00099 } // namespace Image 00100 } // namespace eLynx 00101 00102 #endif // __ImageMorphologicalProcessingImpl_h__