Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CachedImageRemapper.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
24 #ifndef _HUGINAPP_CACHEDIMAGEREMAPPER_H
25 #define _HUGINAPP_CACHEDIMAGEREMAPPER_H
26 
27 #include <hugin_shared.h>
28 #include <nona/ImageRemapper.h>
29 
30 #include <map>
31 #include <huginapp/ImageCache.h>
32 
33 namespace HuginBase {
34 
40 class IMPEX SmallRemappedImageCache : public Nona::SingleImageRemapper<vigra::FRGBImage, vigra::BImage>
41 {
42 
44 
45 
46 public:
48  virtual ~SmallRemappedImageCache();
49 
50 
51 public:
53  virtual MRemappedImage* getRemapped(const PanoramaData & pano,
54  const PanoramaOptions & opts,
55  unsigned int imgNr,
56  vigra::Rect2D outputROI,
57  AppBase::ProgressDisplay* progress);
58 
59 
60  virtual void release(MRemappedImage* d)
61  {
62  // NOP, will be done by invalidate..
63  }
64 
66  void invalidate();
67 
69  void invalidate(unsigned int imgNr);
70 
71 
72 protected:
73  std::map<unsigned, MRemappedImage*> m_images;
74 
75  // descriptions of the remapped image. useful to determine
76  // if it has to be updated or not
77  std::map<unsigned, SrcPanoImage> m_imagesParam;
78  std::map<unsigned, PanoramaOptions> m_panoOpts;
79 
80 };
81 
82 
83 } //namespace
84 #endif // _IMAGECACHE_H
std::map< unsigned, MRemappedImage * > m_images
class to cache remapped images, loaded from the hugin small image cache.
std::map< unsigned, SrcPanoImage > m_imagesParam
Model for a panorama.
Definition: PanoramaData.h:81
functor to create a remapped image
Definition: ImageRemapper.h:41
#define IMPEX
Definition: hugin_shared.h:39
Nona::RemappedPanoImage< vigra::FRGBImage, vigra::BImage > MRemappedImage
virtual void release(MRemappedImage *d)
std::map< unsigned, PanoramaOptions > m_panoOpts
Panorama image options.
struct to hold a image state for stitching