eLynx SDK
v3.0.1 C++ image processing API reference |
00001 //============================================================================ 00002 // IImageGeometry.h Image.Component package 00003 //============================================================================ 00004 // Usage : image geometry Interface 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 __IImageGeometry_h__ 00019 #define __IImageGeometry_h__ 00020 00021 #include <elx/core/ProgressNotifier.h> 00022 #include <elx/math/ResampleFilterImpls.h> 00023 #include <elx/image/AbstractImage.h> 00024 #include <elx/image/ImageLib.h> 00025 #include <boost/shared_ptr.hpp> 00026 00027 namespace eLynx { 00028 namespace Image { 00029 00031 enum EBinningMethod 00032 { 00033 BM_Mean, 00034 BM_Median, 00035 BM_Sum, 00036 BM_Min, 00037 BM_Max 00038 }; 00039 00040 enum EFlipPlane 00041 { 00042 FP_Horizontal, 00043 FP_Vertical, 00044 FP_Both, 00045 FP_None 00046 }; 00047 00048 enum ERightRotation 00049 { 00050 RR_0, 00051 RR_90Left, 00052 RR_180, 00053 RR_90Right 00054 }; 00055 00056 enum 00057 { 00058 RF_Expand = 0x01, 00059 RF_Interpolation = 0x02, 00060 RF_Antialiasing = 0x04, 00061 RF_Default = RF_Expand | RF_Interpolation | RF_Antialiasing 00062 }; 00063 00064 00070 class ExportedByImage IImageGeometry 00071 { 00072 public: 00075 virtual ~IImageGeometry(); 00076 00079 00090 virtual bool Flip( 00091 AbstractImage& ioImage, 00092 EFlipPlane iFlipPlane, 00093 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00094 00100 virtual boost::shared_ptr<AbstractImage> 00101 CreateFlipped( 00102 const AbstractImage& iImage, 00103 EFlipPlane iFlipPlane, 00104 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00106 00107 00110 00122 virtual bool Rotate( 00123 AbstractImage& ioImage, 00124 ERightRotation iRotation, 00125 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00126 00133 virtual bool Rotate( 00134 AbstractImage& ioImage, 00135 double iDegrees, 00136 int32 iFlags = RF_Default, 00137 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00138 00144 virtual boost::shared_ptr<AbstractImage> CreateRotated(const AbstractImage& iImage, 00145 ERightRotation iRotation, 00146 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00147 00154 virtual boost::shared_ptr<AbstractImage> 00155 CreateRotated( 00156 const AbstractImage& iImage, 00157 double iDegrees, 00158 int32 iFlags = RF_Default, 00159 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00161 00162 00165 00178 virtual bool Crop( 00179 AbstractImage& ioImage, 00180 uint32 iX, 00181 uint32 iY, 00182 uint32 iWidth, 00183 uint32 iHeight, 00184 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00185 00200 virtual bool AddBorder( 00201 AbstractImage& ioImage, 00202 uint32 iLeft, 00203 uint32 iRight, 00204 uint32 iTop, 00205 uint32 iBottom, 00206 bool ibBlack, 00207 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00208 00219 virtual bool Resize( 00220 AbstractImage& ioImage, 00221 uint32 iWidth, 00222 uint32 iHeight, 00223 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00224 00234 virtual bool Zoom( 00235 AbstractImage& ioImage, 00236 uint32 iZoom, 00237 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00238 00252 virtual bool Bin( 00253 AbstractImage& ioImage, 00254 uint32 iDim, 00255 EBinningMethod iMethod, 00256 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00257 00266 virtual boost::shared_ptr<AbstractImage> 00267 CreateSubImage( 00268 const AbstractImage& iImage, 00269 uint32 iX, 00270 uint32 iY, 00271 uint32 iWidth, 00272 uint32 iHeight, 00273 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00274 00284 virtual boost::shared_ptr<AbstractImage> 00285 CreateEnlarged( 00286 const AbstractImage& iImage, 00287 uint32 iLeft, 00288 uint32 iRight, 00289 uint32 iTop, 00290 uint32 iBottom, 00291 bool ibBlack, 00292 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00293 00300 virtual boost::shared_ptr<AbstractImage> 00301 CreateResized( 00302 const AbstractImage& iImage, 00303 uint32 iWidth, 00304 uint32 iHeight, 00305 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00306 00312 virtual boost::shared_ptr<AbstractImage> 00313 CreateZoomed( 00314 const AbstractImage& iImage, 00315 uint32 iZoom, 00316 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00317 00324 virtual boost::shared_ptr<AbstractImage> 00325 CreateBinned( 00326 const AbstractImage& iImage, 00327 uint32 iDim, 00328 EBinningMethod iMethod, 00329 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00330 00331 virtual boost::shared_ptr<AbstractImage> 00332 CreateResampled( 00333 const AbstractImage& iImage, 00334 uint32 iWidth, 00335 uint32 iHeight, 00336 Math::EResampleFilter iFilter, 00337 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00338 00339 00351 virtual bool Resample( 00352 AbstractImage& ioImage, 00353 uint32 iWidth, 00354 uint32 iHeight, 00355 Math::EResampleFilter iFilter, 00356 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00357 00358 virtual bool Insert( 00359 AbstractImage& ioImage, 00360 const AbstractImage& iInserted, 00361 int32 iX, 00362 int32 iY, 00363 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00365 00368 00380 virtual bool Shift( 00381 AbstractImage& ioImage, 00382 int32 iHorizontal, 00383 int32 iVertical, 00384 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00385 00392 virtual bool Shift( 00393 AbstractImage& ioImage, 00394 double iHorizontal, 00395 double iVertical, 00396 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00397 00398 virtual boost::shared_ptr<AbstractImage> 00399 CreateShifted( 00400 const AbstractImage& iImage, 00401 int32 iHorizontal, 00402 int32 iVertical, 00403 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00404 00405 virtual boost::shared_ptr<AbstractImage> 00406 CreateShifted( 00407 const AbstractImage& iImage, 00408 double iHorizontal, 00409 double iVertical, 00410 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00411 00412 virtual boost::shared_ptr<AbstractImage> 00413 CreateExpanded( 00414 const AbstractImage& iImage, 00415 uint32 iBorder, 00416 ProgressNotifier& iNotifier=ProgressNotifier_NULL) const = 0; 00417 }; 00418 00419 } // namespace Image 00420 } // namespace eLynx 00421 00422 #endif // __IImageGeometry_h__