25 #ifndef WMCOLORMAPPER_H
26 #define WMCOLORMAPPER_H
31 #include <osg/Projection>
33 #include "core/common/WItemSelection.h"
34 #include "core/common/WItemSelector.h"
35 #include "core/common/WPropertyVariable.h"
36 #include "core/common/math/WInterval.h"
37 #include "core/dataHandler/WDataSetSingle.h"
38 #include "core/kernel/WModule.h"
39 #include "core/kernel/WModuleInputData.h"
63 virtual const std::string
getName()
const;
77 virtual std::shared_ptr< WModule >
factory()
const;
111 std::shared_ptr< WModuleInputData< WDataSetSingle > >
m_input;
This module simply registers the given dataset to the texture handling mechanism.
virtual const std::string getDescription() const
Gives back a description of this module.
osg::ref_ptr< osg::Geode > m_colorBar
The colorbar.
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
WPropDouble m_colorBarNameSize
Character size of the name label.
std::shared_ptr< WModuleInputData< WDataSetSingle > > m_input
Input connector required by this module.
WIntervalDouble m_windowLevel
Window level.
WPropColor m_colorBarLabelsColor
Color bar color: labels text.
bool m_windowLevelEnabled
True if window leveling is active.
std::shared_ptr< WDataSetSingle > m_lastDataSet
This is a pointer to the dataset the module is currently working on.
virtual void moduleMain()
Entry point after loading the module.
osg::ref_ptr< osg::Projection > m_barProjection
The projection node for the colorbar and labels.
WPropDouble m_colorBarLabelsSize
Character size of the labels.
void updateColorbarScale(osg::Node *scaleLabels)
Callback which adds/removes scale labels to the colorbar.
std::shared_ptr< WItemSelection > m_possibleNamePositions
A list of colorbar name positions.
virtual void connectors()
Initialize the connectors this module is using.
virtual void activate()
Callback for m_active.
WPropInt m_colorBarLabels
The number of colorbar labels.
virtual const std::string getName() const
Gives back the name of this module.
WPropColor m_colorBarNameColor
Color bar color: name text.
virtual std::shared_ptr< WModule > factory() const
Due to the prototype design pattern used to build modules, this method returns a new instance of this...
WPropBool m_showColorbar
If true, a colorbar is shown.
WPropBool m_colorBarBorder
Show the border?
bool m_needScaleUpdate
If true, the labels get re-drawn.
virtual void properties()
Initialize the properties for this module.
WPropSelection m_colorbarNamePosition
Position of the colorbar name.
double m_valueMin
The min of the current dataset.
WPropColor m_colorBarBorderColor
Color bar color: border.
WPropString m_defaultName
This property holds the name of the texture to use if the texture itself is unnamed.
double m_valueScale
The scaling factor of the current dataset.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
WPropBool m_colorBarName
Show colorbar name?
osg::ref_ptr< osg::Geode > m_scaleLabels
The colorbar scale labels.
void updateColorbarBorder(osg::Drawable *border)
Callback for updating the border of the colorbar.
WPropColor m_colorBarLabelsOutlineColor
Color bar color: labels outline color.
~WMColormapper()
Destructor.
WMColormapper()
Standard constructor.
WPropColor m_colorBarLabelsBarColor
Color bar color: labels bar color.
void updateColorbarName(osg::Drawable *label)
Updates the label for the dataset name.
WPropColor m_colorBarNameOutlineColor
Color bar color: name outline color.
Class representing a single module of OpenWalnut.