ImageDatabase Class Reference

#include <image_database.h>

List of all members.


Detailed Description

Definition at line 30 of file image_database.h.


Public Types

typedef vcl_multimap< const
char *, vil1_memory_image *,
ltstr >::iterator 
iterator
typedef vcl_multimap< const
char *, vil1_memory_image *,
ltstr >::const_iterator 
const_iterator
typedef vcl_pair< const char *,
vil1_memory_image * > 
value_type

Public Member Functions

 ImageDatabase ()
 ~ImageDatabase ()
 destructor
iterator insert (const char *label, vil1_memory_image *image)
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
vcl_pair< iterator, iteratorequal_range (const char *&label)
vcl_pair< const_iterator,
const_iterator
equal_range (const char *&label) const
bool label_exists (const char *label)
void clear ()
 clear
bool save (const char *name, const char *imagetype)
 save
bool load (const char *name)
 load

Private Attributes

vcl_multimap< const char *,
vil1_memory_image *, ltstr
image_db

Classes

struct  ltstr

Member Typedef Documentation

typedef vcl_multimap<const char*, vil1_memory_image *, ltstr>::iterator ImageDatabase::iterator

Definition at line 45 of file image_database.h.

typedef vcl_multimap<const char*, vil1_memory_image *, ltstr>::const_iterator ImageDatabase::const_iterator

Definition at line 46 of file image_database.h.

typedef vcl_pair<const char *, vil1_memory_image *> ImageDatabase::value_type

Definition at line 47 of file image_database.h.


Constructor & Destructor Documentation

ImageDatabase::ImageDatabase (  )  [inline]

Definition at line 49 of file image_database.h.

ImageDatabase::~ImageDatabase (  ) 

destructor

Iterate through all images in the database and delete them.

Memory is actually deallocated

Author:
Brendan McCane

Definition at line 44 of file image_database.cxx.


Member Function Documentation

iterator ImageDatabase::insert ( const char *  label,
vil1_memory_image image 
) [inline]

Definition at line 51 of file image_database.h.

iterator ImageDatabase::begin (  )  [inline]

Definition at line 54 of file image_database.h.

iterator ImageDatabase::end (  )  [inline]

Definition at line 55 of file image_database.h.

const_iterator ImageDatabase::begin (  )  const [inline]

Definition at line 56 of file image_database.h.

const_iterator ImageDatabase::end (  )  const [inline]

Definition at line 57 of file image_database.h.

vcl_pair<iterator, iterator> ImageDatabase::equal_range ( const char *&  label  )  [inline]

Definition at line 58 of file image_database.h.

vcl_pair<const_iterator, const_iterator> ImageDatabase::equal_range ( const char *&  label  )  const [inline]

Definition at line 60 of file image_database.h.

bool ImageDatabase::label_exists ( const char *  label  )  [inline]

Definition at line 62 of file image_database.h.

void ImageDatabase::clear (  ) 

clear

clear all the images from the database (deletion is performed)

Author:
Brendan McCane

Definition at line 57 of file image_database.cxx.

bool ImageDatabase::save ( const char *  name,
const char *  imagetype 
)

save

Save all images in the database. To do this, I create a single database file that has a list of label/filename pairs. I also create a subdirectory in which all the images are stored. The images are stored based on the imagetype parameter, which should be the extension of a valid image file type (eg "ppm", "pgm", "png", etc).

Parameters:
name the name of the database file (a directory called name.d is also created).
imagetype a valid file extension type (eg "ppm");
Author:
Brendan McCane

Definition at line 84 of file image_database.cxx.

bool ImageDatabase::load ( const char *  name  ) 

load

Load a database from file.

Parameters:
name the name of the database file (a directory called name.d should also exist).
Author:
Brendan McCane

Definition at line 132 of file image_database.cxx.


Member Data Documentation

vcl_multimap<const char*, vil1_memory_image *, ltstr> ImageDatabase::image_db [private]

Definition at line 41 of file image_database.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 20 05:26:19 2008 for contrib/oul/ouml by  doxygen 1.5.1