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 <huginapp/ImageCache.h>
00032 
00033 namespace HuginBase {
00034 
00040 class IMPEX SmallRemappedImageCache : public Nona::SingleImageRemapper<vigra::FRGBImage, vigra::BImage>
00041 {
00042     
00043     typedef Nona::RemappedPanoImage<vigra::FRGBImage, vigra::BImage> MRemappedImage;
00044     
00045     
00046 public:
00048     virtual ~SmallRemappedImageCache();
00049     
00050     
00051 public:
00053     virtual MRemappedImage* getRemapped(const PanoramaData & pano,
00054                                         const PanoramaOptions & opts,
00055                                         unsigned int imgNr,
00056                                         vigra::Rect2D outputROI,
00057                                         AppBase::ProgressDisplay* progress);
00058 
00059     
00060     virtual     void release(MRemappedImage* d)
00061         {
00062                 // NOP, will be done by invalidate..
00063         }
00064     
00066     void invalidate();
00067 
00069     void invalidate(unsigned int imgNr);
00070 
00071     
00072 protected:
00073     std::map<unsigned, MRemappedImage*> m_images;
00074     
00075     // descriptions of the remapped image. useful to determine
00076     // if it has to be updated or not
00077     std::map<unsigned, SrcPanoImage> m_imagesParam;
00078     std::map<unsigned, PanoramaOptions> m_panoOpts;
00079     
00080 };
00081 
00082 
00083 } //namespace
00084 #endif // _IMAGECACHE_H

Generated on 31 Aug 2015 for Hugintrunk by  doxygen 1.4.7