CachedImageRemapper.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00024 #ifndef _HUGINAPP_CACHEDIMAGEREMAPPER_H
00025 #define _HUGINAPP_CACHEDIMAGEREMAPPER_H
00026 
00027 #include <hugin_shared.h>
00028 #include <nona/ImageRemapper.h>
00029 
00030 #include <map>
00031 #include <boost/shared_ptr.hpp>
00032 #include <huginapp/ImageCache.h>
00033 
00034 //#include <common/utils.h>
00035 
00036 
00037 
00038 namespace HuginBase {
00039     
00040 
00046 class IMPEX SmallRemappedImageCache : public Nona::SingleImageRemapper<vigra::FRGBImage, vigra::BImage>
00047 {
00048     
00049     typedef Nona::RemappedPanoImage<vigra::FRGBImage, vigra::BImage> MRemappedImage;
00050     
00051     
00052 public:
00054     virtual ~SmallRemappedImageCache();
00055     
00056     
00057 public:
00059     virtual MRemappedImage* getRemapped(const PanoramaData & pano,
00060                                         const PanoramaOptions & opts,
00061                                         unsigned int imgNr,
00062                                         vigra::Rect2D outputROI,
00063                                         AppBase::MultiProgressDisplay & progress);
00064 
00065     
00066     virtual     void release(MRemappedImage* d)
00067         {
00068                 // NOP, will be done by invalidate..
00069         }
00070     
00072     void invalidate();
00073 
00075     void invalidate(unsigned int imgNr);
00076 
00077     
00078 protected:
00079     std::map<unsigned, MRemappedImage*> m_images;
00080     
00081     // descriptions of the remapped image. useful to determine
00082     // if it has to be updated or not
00083     std::map<unsigned, SrcPanoImage> m_imagesParam;
00084     std::map<unsigned, PanoramaOptions> m_panoOpts;
00085     
00086 };
00087 
00088 
00089 } //namespace
00090 #endif // _IMAGECACHE_H

Generated on 31 Oct 2014 for Hugintrunk by  doxygen 1.4.7