eLynx SDK
v3.0.1 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 typedef Pixel Pixel_t; 00035 00036 virtual bool Apply(AbstractImage& ioImage, 00037 EMorphologicalFilterType iType, 00038 const ImageLub& iKernelMask, 00039 bool ibLuminance, uint32 iIteration, 00040 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00041 00042 virtual bool Apply(AbstractImage& ioImage, 00043 EMorphologicalFilterType iType, 00044 uint32 iWidth, bool ibCircular, 00045 bool ibLuminance, uint32 iIteration, 00046 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00047 00048 virtual bool ApplyMedian(AbstractImage& ioImage, 00049 uint32 iWidth, uint32 iHeight, 00050 uint32 iIteration, 00051 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00052 00053 virtual bool ApplyAdaptiveMedian(AbstractImage& ioImage, 00054 uint32 iWMax, 00055 uint32 iIteration, 00056 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00057 00060 static bool Apply(ImageImpl<Pixel>& ioImage, 00061 EMorphologicalFilterType iType, 00062 const ImageLub& iKernelMask, 00063 bool ibLuminance=true, 00064 uint32 iIteration=1, 00065 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00066 00067 static bool ApplyByChannel(ImageImpl<Pixel>& ioImage, 00068 EMorphologicalFilterType iType, 00069 const ImageLub& iKernelMask, 00070 uint32 iIteration=1, 00071 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00072 00073 static bool ApplyByLuminance(ImageImpl<Pixel>& ioImage, 00074 EMorphologicalFilterType iType, 00075 const ImageLub& iKernelMask, 00076 uint32 iIteration=1, 00077 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00078 00079 // ----------------------------------------------------------- 00080 static bool ApplyMedian3x3(ImageImpl<Pixel>& ioImage, 00081 uint32 iIteration=1, 00082 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00083 00084 static bool ApplyMedian3x3(ImageImpl<Pixel>& ioImage, 00085 const ImageLub& iImageMask, 00086 uint32 iIteration=1, 00087 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00088 00089 static bool ApplyMedianWxH(ImageImpl<Pixel>& ioImage, 00090 uint32 iWidth, uint32 iHeight, 00091 uint32 iIteration=1, 00092 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00093 00094 static bool ApplyAdaptiveMedian(ImageImpl<Pixel>& ioImage, 00095 uint32 iWidthMax, 00096 uint32 iIteration=1, 00097 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00099 }; 00100 00101 } // namespace Image 00102 } // namespace eLynx 00103 00104 #endif // __ImageMorphologicalProcessingImpl_h__