eLynx SDK
v3.3.0 C++ image processing API reference |
00001 //============================================================================ 00002 // ImageGeometryImpl.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 __ImageGeometryImpl_h__ 00019 #define __ImageGeometryImpl_h__ 00020 00021 #include <elx/image/IImageGeometry.h> 00022 #include <elx/image/ImageImpl.h> 00023 00024 namespace eLynx { 00025 namespace Image { 00026 00027 // Forward declaration 00028 class AbstractImage; 00029 00033 template <class Pixel> 00034 class ExportedByImage ImageGeometryImpl : public IImageGeometry 00035 { 00036 public: 00039 virtual bool Flip(AbstractImage& ioImage, EFlipPlane iFlipPlane, ProgressNotifier& iNotifier) const; 00040 virtual bool Rotate(AbstractImage& ioImage, ERightRotation iRotation, ProgressNotifier& iNotifier) const; 00041 virtual bool Rotate(AbstractImage& ioImage, double iDegrees, int32 iFlags, ProgressNotifier& iNotifier) const; 00042 virtual bool Crop(AbstractImage& ioImage, uint32 iX, uint32 iY, uint32 iWidth, uint32 iHeight, ProgressNotifier& iNotifier) const; 00043 virtual bool AutoCrop(AbstractImage& ioImage,ProgressNotifier& iNotifier) const; 00044 virtual bool Resize(AbstractImage& ioImage, uint32 iWidth, uint32 iHeight, ProgressNotifier& iNotifier) const; 00045 virtual bool Zoom(AbstractImage& ioImage, uint32 iZoom, ProgressNotifier& iNotifier) const; 00046 virtual bool Bin(AbstractImage& ioImage, uint32 iDim, EBinningMethod iMethod, ProgressNotifier& iNotifier) const; 00047 virtual bool AddBorder(AbstractImage& ioImage, uint32 iLeft, uint32 iRight, uint32 iTop, uint32 iBottom, bool ibBlack, ProgressNotifier& iNotifier) const; 00048 virtual bool Shift(AbstractImage& ioImage, int32 iHorizontal, int32 iVertical, ProgressNotifier& iNotifier) const; 00049 virtual bool Shift(AbstractImage& ioImage, double iHorizontal, double iVertical, ProgressNotifier& iNotifier) const; 00050 virtual bool Insert(AbstractImage& ioImage, const AbstractImage& iInserted, int32 iX, int32 iY, ProgressNotifier& iNotifier) const; 00051 virtual bool Resample(AbstractImage& ioImage, uint32 iWidth, uint32 iHeight, Math::EResampleFilter iFilter, ProgressNotifier& iNotifier) const; 00052 00053 virtual boost::shared_ptr<AbstractImage> CreateFlipped(const AbstractImage& iImage, EFlipPlane iFlipPlane, ProgressNotifier& iNotifier) const; 00054 virtual boost::shared_ptr<AbstractImage> CreateRotated(const AbstractImage& iImage, ERightRotation iRotation, ProgressNotifier& iNotifier) const; 00055 virtual boost::shared_ptr<AbstractImage> CreateRotated(const AbstractImage& iImage, double iDegrees, int32 iFlags, ProgressNotifier& iNotifier) const; 00056 virtual boost::shared_ptr<AbstractImage> CreateSubImage(const AbstractImage& iImage, uint32 iX, uint32 iY, uint32 iWidth, uint32 iHeight, ProgressNotifier& iNotifier) const; 00057 virtual boost::shared_ptr<AbstractImage> CreateResized(const AbstractImage& iImage, uint32 iWidth, uint32 iHeight, ProgressNotifier& iNotifier) const; 00058 virtual boost::shared_ptr<AbstractImage> CreateZoomed(const AbstractImage& iImage, uint32 iZoom, ProgressNotifier& iNotifier) const; 00059 virtual boost::shared_ptr<AbstractImage> CreateBinned(const AbstractImage& iImage, uint32 iDim, EBinningMethod iMethod, ProgressNotifier& iNotifier) const; 00060 virtual boost::shared_ptr<AbstractImage> CreateEnlarged(const AbstractImage& iImage, uint32 iLeft, uint32 iRight, uint32 iTop, uint32 iBottom, bool ibBlack, ProgressNotifier& iNotifier) const; 00061 virtual boost::shared_ptr<AbstractImage> CreateShifted(const AbstractImage& iImage, int32 iHorizontal, int32 iVertical, ProgressNotifier& iNotifier) const; 00062 virtual boost::shared_ptr<AbstractImage> CreateShifted(const AbstractImage& iImage, double iHorizontal, double iVertical, ProgressNotifier& iNotifier) const; 00063 virtual boost::shared_ptr<AbstractImage> CreateInserted(const AbstractImage& iImage, const AbstractImage& iInserted, int32 iX, int32 iY, ProgressNotifier& iNotifier) const; 00064 virtual boost::shared_ptr<AbstractImage> CreateResampled(const AbstractImage& iImage, uint32 iWidth, uint32 iHeight, Math::EResampleFilter iFilter, ProgressNotifier& iNotifier) const; 00065 virtual boost::shared_ptr<AbstractImage> CreateExpanded(const AbstractImage& iImage, uint32 iBorder, ProgressNotifier& iNotifier) const; 00067 00070 static bool FlipVertical(ImageImpl<Pixel>&, ProgressNotifier& =ProgressNotifier_NULL); 00071 static bool FlipHorizontal(ImageImpl<Pixel>&, ProgressNotifier& =ProgressNotifier_NULL); 00072 static bool Flip(ImageImpl<Pixel>&, EFlipPlane, ProgressNotifier& =ProgressNotifier_NULL); 00073 static bool Rotate180(ImageImpl<Pixel>&, ProgressNotifier& =ProgressNotifier_NULL); 00074 static bool Rotate90(ImageImpl<Pixel>&, bool ibClockwise, ProgressNotifier& =ProgressNotifier_NULL); 00075 static bool Rotate(ImageImpl<Pixel>&, double iDegrees, int32 iFlags=RF_Default, ProgressNotifier& =ProgressNotifier_NULL); 00076 static bool Crop(ImageImpl<Pixel>&, uint32 iX, uint32 iY, uint32 iWidth, uint32 iHeight, ProgressNotifier& =ProgressNotifier_NULL); 00077 static bool AutoCrop(ImageImpl<Pixel>&,ProgressNotifier& =ProgressNotifier_NULL); 00078 static bool Resize(ImageImpl<Pixel>&, uint32 iWidth, uint32 iHeight, ProgressNotifier& =ProgressNotifier_NULL); 00079 static bool Zoom(ImageImpl<Pixel>&, uint32 iZoom, ProgressNotifier& =ProgressNotifier_NULL); 00080 static bool AddBorder(ImageImpl<Pixel>&, uint32 iLeft, uint32 iRight, uint32 iTop, uint32 iBottom, bool ibBlack=true, ProgressNotifier& =ProgressNotifier_NULL); 00081 static bool Bin(ImageImpl<Pixel>&, uint32 iDim, EBinningMethod, ProgressNotifier& =ProgressNotifier_NULL); 00082 static bool Shift(ImageImpl<Pixel>&, int32 iHorizontal, int32 iVertical, ProgressNotifier& =ProgressNotifier_NULL); 00083 static bool Shift(ImageImpl<Pixel>&, double iHorizontal, double iVertical, ProgressNotifier& =ProgressNotifier_NULL); 00084 static bool Insert(ImageImpl<Pixel>&, const ImageImpl<Pixel>& iInserted, int32 iX, int32 iY, ProgressNotifier& =ProgressNotifier_NULL); 00085 static bool Resample(ImageImpl<Pixel>&, uint32 iWidth, uint32 iHeight, Math::EResampleFilter iFilter, ProgressNotifier& =ProgressNotifier_NULL); 00086 00087 static boost::shared_ptr< ImageImpl<Pixel> > CreateFlipped(const ImageImpl<Pixel>&, EFlipPlane, ProgressNotifier& =ProgressNotifier_NULL); 00088 static boost::shared_ptr< ImageImpl<Pixel> > CreateRotated90(const ImageImpl<Pixel>&, bool ibClockwise, ProgressNotifier& =ProgressNotifier_NULL); 00089 static boost::shared_ptr< ImageImpl<Pixel> > CreateRotated(const ImageImpl<Pixel>&, double iDegrees, int32 iFlags=RF_Default, ProgressNotifier& =ProgressNotifier_NULL); 00090 static boost::shared_ptr< ImageImpl<Pixel> > CreateSubImage(const ImageImpl<Pixel>&, uint32 iX, uint32 iY, uint32 iWidth, uint32 iHeight, ProgressNotifier& =ProgressNotifier_NULL); 00091 static boost::shared_ptr< ImageImpl<Pixel> > CreateResized(const ImageImpl<Pixel>&, uint32 iWidth, uint32 iHeight, ProgressNotifier& =ProgressNotifier_NULL); 00092 static boost::shared_ptr< ImageImpl<Pixel> > CreateZoomed(const ImageImpl<Pixel>&, uint32 iZoom, ProgressNotifier& =ProgressNotifier_NULL); 00093 static boost::shared_ptr< ImageImpl<Pixel> > CreateEnlarged(const ImageImpl<Pixel>&, uint32 iLeft, uint32 iRight, uint32 iTop, uint32 iBottom, bool ibBlack=true, ProgressNotifier& =ProgressNotifier_NULL); 00094 static boost::shared_ptr< ImageImpl<Pixel> > CreateBinned(const ImageImpl<Pixel>& iImage, uint32 iDim, EBinningMethod iMethod, ProgressNotifier& =ProgressNotifier_NULL); 00095 static boost::shared_ptr< ImageImpl<Pixel> > CreateShifted(const ImageImpl<Pixel>& iImage, int32 iHorizontal, int32 iVertical, ProgressNotifier& =ProgressNotifier_NULL); 00096 static boost::shared_ptr< ImageImpl<Pixel> > CreateShifted(const ImageImpl<Pixel>& iImage, double iHorizontal, double iVertical, ProgressNotifier& =ProgressNotifier_NULL); 00097 static boost::shared_ptr< ImageImpl<Pixel> > CreateInserted(const ImageImpl<Pixel>& iImage, const ImageImpl<Pixel>& iInserted, int32 iX, int32 iY, ProgressNotifier& =ProgressNotifier_NULL); 00098 static boost::shared_ptr< ImageImpl<Pixel> > CreateResampled(const ImageImpl<Pixel>&, uint32 iWidth, uint32 iHeight, Math::EResampleFilter iFilter, ProgressNotifier& =ProgressNotifier_NULL); 00099 static boost::shared_ptr< ImageImpl<Pixel> > CreateExpanded(const ImageImpl<Pixel>& iImage, uint32 iBorder, ProgressNotifier& =ProgressNotifier_NULL); 00101 }; 00102 00103 } // namespace Image 00104 } // namespace eLynx 00105 00106 #endif // __ImageGeometryImpl_h__