MIRA
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ContinuousColormap Class Referenceabstract

Base class for continuous color colormaps. More...

#include <image/Colormap.h>

Inheritance diagram for ContinuousColormap:
Inheritance graph
[legend]

Public Types

typedef iterator const_iterator
 

Public Member Functions

 ContinuousColormap (std::size_t size=256)
 
void resize (std::size_t pSize)
 Sets a certain size of this colormap. More...
 
virtual std::size_t size () const
 Returns the set size. More...
 
virtual Color::RGB get (std::size_t idx) const
 Returns the color at the specified index (must be >= 0 and < size) More...
 
virtual Color::RGB getf (float f) const =0
 Accesses the continuous colors. More...
 
Color::RGB operator() (std::size_t idx)
 Returns the color in the colormap at the given index. More...
 
Color::RGB operator[] (std::size_t idx)
 Returns the color in the colormap at the given index. More...
 
iterator begin ()
 Gives an iterator to the beginning of the colormap. More...
 
const_iterator begin () const
 Gives a const iterator to the beginning of the colormap. More...
 
iterator end ()
 Gives an iterator to the end of the colormap. More...
 
const_iterator end () const
 Gives an const iterator to the end of the colormap. More...
 
Class const & getClass () const
 call the virtual internalGetClass(). More...
 

Static Public Member Functions

static PseudoClass const & CLASS ()
 

Protected Member Functions

virtual Class const & internalGetClass () const =0
 

Detailed Description

Base class for continuous color colormaps.

In contrast to discrete color colormaps, where the number of colors is limited, continuous color colormaps are able to generate colors for an arbitrary value between 0 and 1 using its getf() method. Hence they are able to generate very fine grained color gradients.

To be compatible with other discrete color colormaps, a continuous colormap can also be set to a certain size with a fixed number of colors using the constructor or the resize() method. The colors can then be accessed by an integer index using the get() method. However, the access to the continuous colors is always possible via the getf() method.

Member Typedef Documentation

◆ const_iterator

typedef iterator const_iterator
inherited

Constructor & Destructor Documentation

◆ ContinuousColormap()

ContinuousColormap ( std::size_t  size = 256)
inline

Member Function Documentation

◆ resize()

void resize ( std::size_t  pSize)
inline

Sets a certain size of this colormap.

◆ size()

virtual std::size_t size ( ) const
inlinevirtual

Returns the set size.

Implements Colormap.

◆ get()

virtual Color::RGB get ( std::size_t  idx) const
inlinevirtual

Returns the color at the specified index (must be >= 0 and < size)

Implements Colormap.

◆ getf()

virtual Color::RGB getf ( float  f) const
pure virtual

Accesses the continuous colors.

The specified floating point value must be within the interval [0,1].

Implemented in RedBlueColormap, JetColormap, HSVColormap, GrayscaleColormap, FormulaeColormapBase, and GradientColormapBase.

◆ operator()()

Color::RGB operator() ( std::size_t  idx)
inlineinherited

Returns the color in the colormap at the given index.

◆ operator[]()

Color::RGB operator[] ( std::size_t  idx)
inlineinherited

Returns the color in the colormap at the given index.

◆ begin() [1/2]

iterator begin ( )
inlineinherited

Gives an iterator to the beginning of the colormap.

◆ begin() [2/2]

const_iterator begin ( ) const
inlineinherited

Gives a const iterator to the beginning of the colormap.

◆ end() [1/2]

iterator end ( )
inlineinherited

Gives an iterator to the end of the colormap.

◆ end() [2/2]

const_iterator end ( ) const
inlineinherited

Gives an const iterator to the end of the colormap.

◆ getClass()

Class const& getClass ( ) const
inlineinherited

call the virtual internalGetClass().

◆ CLASS()

static PseudoClass const& CLASS ( )
inlinestaticinherited

◆ internalGetClass()

virtual Class const& internalGetClass ( ) const
protectedpure virtualinherited

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