25 #ifndef WMPAINTTEXTURE_H
26 #define WMPAINTTEXTURE_H
35 #include "core/dataHandler/WDataSetScalar.h"
36 #include "core/dataHandler/WValueSet.h"
37 #include "core/graphicsEngine/WGETexture.h"
38 #include "core/graphicsEngine/WPickInfo.h"
39 #include "core/kernel/WModule.h"
40 #include "core/kernel/WModuleInputData.h"
41 #include "core/kernel/WModuleOutputData.h"
72 virtual const std::string
getName()
const;
86 virtual std::shared_ptr< WModule >
factory()
const;
200 std::shared_ptr< WModuleInputData< WDataSetSingle > >
m_input;
205 std::shared_ptr< WModuleOutputData< WDataSetScalar > >
m_output;
230 std::shared_ptr< WGridRegular3D >
m_grid;
Forward declaration of WPickInfo.
virtual void moduleMain()
Entry point after loading the module.
WPropSelection m_colorMapSelection
Selection property for color map.
WPropTrigger m_buttonCreateRoi
updates the output connector on demand, as we don't want to do this every paint command
void copyFromInput()
copies data from the input dataset into the paint texture
void doPaint()
this function listens to the pick handler, if the paint flag is true it will write into the out textu...
WPropBool m_painting
Interpolation?
std::shared_ptr< WDataSetSingle > m_dataSet
This is a pointer to the dataset the module is currently working on.
void setColorFromPick(WPickInfo pickInfo)
get the paint index at the picked voexel fromt he out texture and sets m_paintIndex accordingly
WPropSelection m_pencilSelection
Selection property for pencil size and shape.
WPropTrigger m_buttonCopyFromInput
copies the input dataset into the paint texture, this allows one to continue work
std::shared_ptr< WDataSetScalar > m_outData
This is a pointer to the current output.
std::shared_ptr< WGridRegular3D > m_grid
stores a pointer to the grid we use;
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
virtual void connectors()
Initialize the connectors this module is using.
WPropTrigger m_buttonUpdateOutput
updates the output connector on demand, as we don't want to do this every paint command
WPropInt m_paintIndex
specifies the value we paint into the output texture
void createROI()
creates a ROI from the currently selected paint value
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
void updateOutDataset()
updates the output connector
std::shared_ptr< WDataSetScalar > m_outDataOld
Point to the out dataset once it is invalid.
virtual const std::string getDescription() const
Gives back a description of this module.
std::shared_ptr< WModuleOutputData< WDataSetScalar > > m_output
An output connector for the output scalar dsataset.
osg::ref_ptr< WGETexture3D > m_texture
stores a pointer to the texture we paint in
std::shared_ptr< WItemSelection > m_pencilSelectionsList
A list of pencil sizes and shapes.
std::queue< WPickInfo > m_paintQueue
new paint coordinates get added here
virtual void properties()
Initialize the properties for this module.
std::shared_ptr< WItemSelection > m_colorMapSelectionsList
A list of color map selection types.
virtual void activate()
Callback for m_active.
std::shared_ptr< WModuleInputData< WDataSetSingle > > m_input
An input connector that accepts order 1 datasets.
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...
void createTexture()
creates a new texture
WPropBool m_queueAdded
true when a new paint coordinate is added to the queue
void queuePaint(WPickInfo pickInfo)
this function listens to the pick handler, if the paint flag is true it will add the paint position t...
virtual const std::string getName() const
Gives back the name of this module.
Class representing a single module of OpenWalnut.
Encapsulates info for pick action.