Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
ColormapHelperBase Class Referenceabstract

#include <colormappable.hh>

Inheritance diagram for ColormapHelperBase:
Inheritance graph
Collaboration diagram for ColormapHelperBase:
Collaboration graph

Public Types

using Ptr = std::shared_ptr< ColormapHelperBase >
 
- Public Types inherited from ColormapProvider
using Ptr = std::shared_ptr< ColormapProvider >
 
- Public Types inherited from Colormappable
using Ptr = std::shared_ptr< Colormappable >
 
using WeakPtr = std::weak_ptr< Colormappable >
 

Public Member Functions

 ColormapHelperBase (Colormap::Ptr const &colormap)
 
virtual std::map< std::string, std::string > getProperties ()=0
 
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

Public Attributes

Colormap::Ptr colormap
 
Colormap::Ptr originalColormap
 

Static Private Member Functions

static void OperationNotSupported ()
 

Member Typedef Documentation

◆ Ptr

using ColormapHelperBase::Ptr = std::shared_ptr<ColormapHelperBase>

Constructor & Destructor Documentation

◆ ColormapHelperBase()

ColormapHelperBase::ColormapHelperBase ( Colormap::Ptr const &  colormap)
explicit
19 : colormap(colormap_)
20 , originalColormap(colormap_)
21{
22}
Colormap::Ptr originalColormap
Definition colormappable.hh:162
Colormap::Ptr colormap
Definition colormappable.hh:161

Member Function Documentation

◆ disableTransparentBackground()

void ColormapHelperBase::disableTransparentBackground ( )
overridevirtual

Implements Colormappable.

Reimplemented in MonochromeColormapHelper.

static void OperationNotSupported()
Definition colormap-helpers.cc:44
Here is the call graph for this function:

◆ getColormap()

Colormap::Ptr ColormapHelperBase::getColormap ( )
overridevirtual

Implements ColormapProvider.

42{ return colormap; }

◆ getMonochromeColor()

Color ColormapHelperBase::getMonochromeColor ( )
overridevirtual

Implements Colormappable.

Reimplemented in MonochromeColormapHelper.

Here is the call graph for this function:

◆ getNumberOfColors()

int ColormapHelperBase::getNumberOfColors ( )
overridevirtual

Retrieve the number of colors in use by the presentation

Implements Colormappable.

30{ return originalColormap->colors.size(); }

◆ getOriginalColormap()

Colormap::Ptr ColormapHelperBase::getOriginalColormap ( )
overridevirtual

Retrieve the images colormap (if any)

Implements Colormappable.

28{ return originalColormap; }

◆ getProperties()

virtual std::map< std::string, std::string > ColormapHelperBase::getProperties ( )
pure virtual

◆ getTransparentBackground()

bool ColormapHelperBase::getTransparentBackground ( )
overridevirtual

Implements Colormappable.

Reimplemented in MonochromeColormapHelper.

Here is the call graph for this function:

◆ OperationNotSupported()

void ColormapHelperBase::OperationNotSupported ( )
staticprivate
44{ throw std::runtime_error("Operation not supported"); }

Referenced by disableTransparentBackground(), getMonochromeColor(), getTransparentBackground(), setMonochromeColor(), and setTransparentBackground().

Here is the caller graph for this function:

◆ setColormap()

void ColormapHelperBase::setColormap ( Colormap::Ptr  colormap)
overridevirtual

Request that the presentation use the given colormap

Implements Colormappable.

24{ colormap = colormap_; }

◆ setMonochromeColor()

void ColormapHelperBase::setMonochromeColor ( const Color c)
overridevirtual

Implements Colormappable.

Reimplemented in MonochromeColormapHelper.

Here is the call graph for this function:

◆ setOriginalColormap()

void ColormapHelperBase::setOriginalColormap ( Colormap::Ptr  colormap)
virtual
26{ originalColormap = std::move(colormap_); }

◆ setTransparentBackground()

void ColormapHelperBase::setTransparentBackground ( )
overridevirtual

Implements Colormappable.

Reimplemented in MonochromeColormapHelper.

Here is the call graph for this function:

Member Data Documentation

◆ colormap

◆ originalColormap

Colormap::Ptr ColormapHelperBase::originalColormap

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