[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

HuginBase::ImageCache Class Reference

This is a cache for all the images we use. More...

#include <ImageCache.h>

List of all members.

Public Types

typedef boost::shared_ptr<
vigra::BRGBImage > 
ImageCacheRGB8Ptr
 use reference counted pointers
typedef boost::shared_ptr<
vigra::UInt16RGBImage > 
ImageCacheRGB16Ptr
typedef boost::shared_ptr<
vigra::FRGBImage > 
ImageCacheRGBFloatPtr
typedef boost::shared_ptr<
vigra::BImage > 
ImageCache8Ptr
typedef boost::shared_ptr<
Entry
EntryPtr
 a shared pointer to the entry

Public Member Functions

virtual ~ImageCache ()
 dtor.
EntryPtr getImage (const std::string &filename)
 get a image.
EntryPtr getSmallImage (const std::string &filename)
 get an small image.
void removeImage (const std::string &filename)
 remove a specific image (and dependant images) from the cache
void flush ()
 release all images in the cache.
void softFlush ()
 a soft version of flush.
void SetUpperLimit (long newUpperLimit)
 sets the upper limit, which is used by softFlush()
void setProgressDisplay (AppBase::MultiProgressDisplay *disp)
void clearProgressDisplay (AppBase::MultiProgressDisplay *disp)

Static Public Member Functions

ImageCachegetInstance ()
 get the global ImageCache object


Detailed Description

This is a cache for all the images we use.

is a singleton for easy access from everywhere. The cache is used as an image source, that needs to know how to reproduce the requested images, in case that they have been deleted.


Member Typedef Documentation

typedef boost::shared_ptr<Entry> HuginBase::ImageCache::EntryPtr
 

a shared pointer to the entry

typedef boost::shared_ptr<vigra::BImage> HuginBase::ImageCache::ImageCache8Ptr
 

typedef boost::shared_ptr<vigra::UInt16RGBImage> HuginBase::ImageCache::ImageCacheRGB16Ptr
 

typedef boost::shared_ptr<vigra::BRGBImage> HuginBase::ImageCache::ImageCacheRGB8Ptr
 

use reference counted pointers

typedef boost::shared_ptr<vigra::FRGBImage> HuginBase::ImageCache::ImageCacheRGBFloatPtr
 


Constructor & Destructor Documentation

virtual HuginBase::ImageCache::~ImageCache  )  [inline, virtual]
 

dtor.


Member Function Documentation

void HuginBase::ImageCache::clearProgressDisplay AppBase::MultiProgressDisplay disp  )  [inline]
 

void HuginBase::ImageCache::flush  ) 
 

release all images in the cache.

useful on project load, or maybe before stitching really big pictures

ImageCache::EntryPtr HuginBase::ImageCache::getImage const std::string &  filename  ) 
 

get a image.

it will be loaded if its not already in the cache

Hold the EntryPtr as long as the image data is needed!

ImageCache & HuginBase::ImageCache::getInstance  )  [static]
 

get the global ImageCache object

ImageCache::EntryPtr HuginBase::ImageCache::getSmallImage const std::string &  filename  ) 
 

get an small image.

This image is 512x512 pixel maximum and can be used for icons and different previews. It is directly derived from the original.

void HuginBase::ImageCache::removeImage const std::string &  filename  ) 
 

remove a specific image (and dependant images) from the cache

void HuginBase::ImageCache::setProgressDisplay AppBase::MultiProgressDisplay disp  )  [inline]
 

void HuginBase::ImageCache::SetUpperLimit long  newUpperLimit  )  [inline]
 

sets the upper limit, which is used by softFlush()

void HuginBase::ImageCache::softFlush  ) 
 

a soft version of flush.

Releases some images if they go over a certain threshold


The documentation for this class was generated from the following files:

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