Scroom  0.14
ColormapHelper Class Reference

#include <colormappable.hh>

Inheritance diagram for ColormapHelper:
Inheritance graph
Collaboration diagram for ColormapHelper:
Collaboration graph

Public Member Functions

std::map< std::string, std::string > getProperties () override
 
- Public Member Functions inherited from ColormapHelperBase
 ColormapHelperBase (Colormap::Ptr const &colormap)
 
void setColormap (Colormap::Ptr colormap) override
 
Colormap::Ptr getOriginalColormap () override
 
int getNumberOfColors () override
 
Color getMonochromeColor () override
 
void setMonochromeColor (const Color &c) override
 
void setTransparentBackground () override
 
void disableTransparentBackground () override
 
bool getTransparentBackground () override
 
Colormap::Ptr getColormap () override
 
virtual void setOriginalColormap (Colormap::Ptr colormap)
 
For monochrome presentations: Set/Get the current color
Manipulate the "Transparent Background" setting of the presentation

Static Public Member Functions

static Ptr create (int numberOfColors)
 
static Ptr createInverted (int numberOfColors)
 
static Ptr create (Colormap::Ptr const &colormap)
 

Private Member Functions

 ColormapHelper (Colormap::Ptr const &colormap)
 

Additional Inherited Members

- Public Types inherited from ColormapHelperBase
using Ptr = boost::shared_ptr< ColormapHelperBase >
 
- Public Types inherited from ColormapProvider
using Ptr = boost::shared_ptr< ColormapProvider >
 
- Public Types inherited from Colormappable
using Ptr = boost::shared_ptr< Colormappable >
 
using WeakPtr = boost::weak_ptr< Colormappable >
 
- Public Attributes inherited from ColormapHelperBase
Colormap::Ptr colormap
 
Colormap::Ptr originalColormap
 

Constructor & Destructor Documentation

◆ ColormapHelper()

ColormapHelper::ColormapHelper ( Colormap::Ptr const &  colormap)
explicitprivate
63  : ColormapHelperBase(colormap_)
64 {
65 }

Referenced by create().

Here is the caller graph for this function:

Member Function Documentation

◆ create() [1/2]

ColormapHelper::Ptr ColormapHelper::create ( Colormap::Ptr const &  colormap)
static
53 { return Ptr(new ColormapHelper(colormap)); }
Here is the call graph for this function:

◆ create() [2/2]

ColormapHelper::Ptr ColormapHelper::create ( int  numberOfColors)
static
55 { return create(Colormap::createDefault(numberOfColors)); }

Referenced by BOOST_AUTO_TEST_CASE(), createInverted(), Scroom::Tiff::getColormapHelper(), and Scroom::Tiff::open().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createInverted()

ColormapHelper::Ptr ColormapHelper::createInverted ( int  numberOfColors)
static
58 {
59  return create(Colormap::createDefaultInverted(numberOfColors));
60 }
Here is the call graph for this function:

◆ getProperties()

std::map< std::string, std::string > ColormapHelper::getProperties ( )
overridevirtual

Implements ColormapHelperBase.

67 { return {{COLORMAPPABLE_PROPERTY_NAME, ""}}; }

The documentation for this class was generated from the following files:
ColormapHelperBase::ColormapHelperBase
ColormapHelperBase(Colormap::Ptr const &colormap)
Definition: colormap-helpers.cc:18
Colormap::createDefault
static Colormap::Ptr createDefault(int n)
Definition: colormappable.hh:51
ColormapHelper::ColormapHelper
ColormapHelper(Colormap::Ptr const &colormap)
Definition: colormap-helpers.cc:62
ColormapHelperBase::colormap
Colormap::Ptr colormap
Definition: colormappable.hh:163
COLORMAPPABLE_PROPERTY_NAME
const std::string COLORMAPPABLE_PROPERTY_NAME
Definition: colormappable.hh:21
Colormap::createDefaultInverted
static Colormap::Ptr createDefaultInverted(int n)
Definition: colormappable.hh:67
ColormapHelperBase::Ptr
boost::shared_ptr< ColormapHelperBase > Ptr
Definition: colormappable.hh:160
ColormapHelper::create
static Ptr create(int numberOfColors)
Definition: colormap-helpers.cc:55