eLynx SDK
v3.0.1 C++ image processing API reference |
00001 //============================================================================ 00002 // ResampleFilterImpls.h Math.Component package 00003 //============================================================================ 00004 // Usage : define common resample filter implementations 00005 //---------------------------------------------------------------------------- 00006 // Copyright (C) 2006 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 __ResampleFilterImpls_h__ 00019 #define __ResampleFilterImpls_h__ 00020 00021 #include "IResampleFilter.h" 00022 00023 namespace eLynx { 00024 namespace Math { 00025 00027 #define DEFINE_RESAMPLE_FILTER( classname ) \ 00028 class ExportedByMath classname##Filter : public IResampleFilter \ 00029 { \ 00030 public: \ 00031 virtual double GetRadius() const; \ 00032 virtual double GetValue(double iX) const; \ 00033 }; 00034 00035 DEFINE_RESAMPLE_FILTER( Box ); 00036 DEFINE_RESAMPLE_FILTER( Triangle ); 00037 DEFINE_RESAMPLE_FILTER( Hermite ); 00038 DEFINE_RESAMPLE_FILTER( Bell ); 00039 DEFINE_RESAMPLE_FILTER( CubicBSpline ); 00040 DEFINE_RESAMPLE_FILTER( Lanczos3 ); 00041 DEFINE_RESAMPLE_FILTER( Mitchell ); 00042 DEFINE_RESAMPLE_FILTER( Cosine ); 00043 DEFINE_RESAMPLE_FILTER( CatmullRom ); 00044 DEFINE_RESAMPLE_FILTER( Quadratic ); 00045 DEFINE_RESAMPLE_FILTER( CubicConvolution ); 00046 DEFINE_RESAMPLE_FILTER( Lanczos5 ); 00047 DEFINE_RESAMPLE_FILTER( Lanczos8 ); 00048 DEFINE_RESAMPLE_FILTER( BlackmanHarris ); 00049 00051 enum EResampleFilter 00052 { 00053 RF_Box, 00054 RF_Triangle, 00055 RF_Hermite, 00056 RF_Bell, 00057 RF_CubicBSpline, 00058 RF_Lanczos3, 00059 RF_Mitchell, 00060 RF_Cosine, 00061 RF_CatmullRom, 00062 RF_Quadratic, 00063 RF_CubicConvolution, 00064 RF_Lanczos5, 00065 RF_Lanczos8, 00066 RF_BlackmanHarris, 00067 RF_Undefined 00068 }; 00069 00073 ExportedByMath const char * elxToString(EResampleFilter iFilter); 00074 00078 ExportedByMath const IResampleFilter& elxGetResampleFilter(EResampleFilter iFilter); 00079 00080 } // namespace Image 00081 } // namespace eLynx 00082 00083 #endif // __ResampleFilterImpls_h__