Public Types | Public Member Functions | Public Attributes | List of all members
ImageCodeMap< T > Class Template Reference

#include <ImageCodebook.h>

Inheritance diagram for ImageCodeMap< T >:
Inheritance graph
[legend]
Collaboration diagram for ImageCodeMap< T >:
Collaboration graph
[legend]

Public Types

typedef std::map< double, T > cont_t
 
typedef cont_t::key_type key_t
 
typedef cont_t::value_type entry_t
 
typedef std::list< entry_t > list_t
 
typedef drain::LookUp< typename cont_t::const_iterator > lookup_t
 LOOK-UP table.
 

Public Member Functions

 ImageCodeMap ()
 Default constructor.
 
 ImageCodeMap (std::initializer_list< entry_t > l)
 
 ImageCodeMap (const cont_t &map)
 Copy constructor //.
 
lookup_tcreateLookUp (const std::type_info &type, const ValueScaling &scaling) const
 Creates a vector of 256 or 65535 entries for fast retrieval. More...
 
cont_t::const_iterator retrieve (double d) const
 
cont_t::iterator retrieve (double d)
 

Public Attributes

lookup_t lookUp
 
char separator
 

Detailed Description

template<class T>
class drain::ImageCodeMap< T >

Template Parameters
double- type of lower bound of the value range associated with an entry
T- entry type (LegendEntry, PaletteEntry, HistogramEntry)

Member Function Documentation

◆ createLookUp()

lookup_t& createLookUp ( const std::type_info &  type,
const ValueScaling scaling 
) const
inline

Creates a vector of 256 or 65535 entries for fast retrieval.

A codebook is assumed to be a sparse list, only containing entries where the values (colors) change. The corresponding lookup table contains an entry for each encountered integer index.

TODO: count parameter (now automatic) TODO: interval fill up function (mixer)

Main loop: traverses entries, and fills up lookUp indices between entries.

Fill up interval [indexLower, index[


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