[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

hugin_base/huginapp/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 
00066 //    virtual MRemappedImage* getRemapped(const std::string & filename,
00067 //                                        const vigra::Diff2D & origSrcSize,
00068 //                                        const vigra::Diff2D & srcSize,
00069 //                                        VariableMap srcVars,
00070 //                                        Lens::LensProjectionFormat srcProj,
00071 //                                        ImageOptions imgOpts,
00072 //                                        const vigra::Diff2D &destSize,
00073 //                                        PanoramaOptions::ProjectionFormat destProj,
00074 //                                        double destHFOV,
00075 //                                        utils::MultiProgressDisplay & progress);
00076     
00077     
00078     virtual     void release(MRemappedImage* d)
00079         {
00080                 // NOP, will be done by invalidate..
00081         }
00082     
00084     void invalidate();
00085 
00087     void invalidate(unsigned int imgNr);
00088 
00089     
00090 protected:
00091     std::map<unsigned, MRemappedImage*> m_images;
00092     
00093     // descriptions of the remapped image. useful to determine
00094     // if it has to be updated or not
00095     std::map<unsigned, SrcPanoImage> m_imagesParam;
00096     std::map<unsigned, PanoramaOptions> m_panoOpts;
00097     
00098 };
00099 
00100 
00101 } //namespace
00102 #endif // _IMAGECACHE_H

Generated on Mon Sep 20 01:01:27 2010 for Hugintrunk by doxygen 1.3.9.1