25 #ifndef WMARBITRARYROIS_H
26 #define WMARBITRARYROIS_H
34 #include "core/graphicsEngine/WGEGroupNode.h"
35 #include "core/graphicsEngine/WROI.h"
36 #include "core/graphicsEngine/WTriangleMesh.h"
37 #include "core/kernel/WModule.h"
38 #include "core/kernel/WModuleInputData.h"
39 #include "core/kernel/WModuleOutputData.h"
67 virtual const std::string
getName()
const;
81 virtual std::shared_ptr< WModule >
factory()
const;
144 template<
typename T > std::shared_ptr< std::vector< float > >
cutArea( std::shared_ptr< WGrid > inGrid,
152 std::shared_ptr< WModuleInputData< WDataSetScalar > >
m_input;
This data set type contains scalars as values.
Create non uniformly shaped ROIs for fiber selection.
virtual void activate()
Callback for m_active.
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
std::shared_ptr< WModuleInputData< WDataSetScalar > > m_input
Input connector required by this module.
void initSelectionROI()
create a selection box to mark the area in a dataset which will provide the data for a new ROI
void finalizeROI()
creates a ROI and adds it to the ROI manager
virtual void moduleMain()
Entry point after loading the module.
virtual const std::string getDescription() const
Gives back a description of this module.
osg::ref_ptr< WROIBox > m_selectionROI
stores a pointer to the cutting tool ROI
std::shared_ptr< WCondition > m_recompute
This condition denotes whether we need to recompute the surface.
WPosition m_lastMaxPos
the last know max position of the ROI if there was any
virtual const std::string getName() const
Gives back the name of this module.
osg::ref_ptr< osg::Geode > m_outputGeode
Pointer to geode containing the glpyhs.
void renderMesh()
renders the temporary ROI
virtual void connectors()
Initialize the connectors this module is using.
WPropColor m_surfaceColor
Property determining the color for the surface.
void cleanup()
Removes the ROI and cleans up the scene.
WPropDouble m_threshold
the threshold for the ROI
std::shared_ptr< const WDataSetScalar > m_dataSet
pointer to dataSet to be able to access it throughout the whole module.
WPropTrigger m_finalizeTrigger
A trigger which can be used to trigger some kind of operation.
osg::ref_ptr< WGEGroupNode > m_moduleNode
Pointer to the modules group node. We need it to be able to update it when callback is invoked.
std::shared_ptr< WValueSet< float > > m_newValueSet
pointer to the created cut valueSet
void createCutDataset()
creates a new dataset
WPosition m_lastMinPos
the last know min position of the ROI if there was any
std::shared_ptr< WTriangleMesh > m_triMesh
This triangle mesh is provided as output through the connector.
std::shared_ptr< std::vector< float > > cutArea(std::shared_ptr< WGrid > inGrid, std::shared_ptr< WValueSet< T > > vals)
copies the data from the input dataset which is marked by the selection box, otherwise data is zero
bool m_showSelector
flag indication if the temporary ROI should be shown;
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...
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
virtual void properties()
Initialize the properties for this module.
Class representing a single module of OpenWalnut.
This only is a 3d double vector.
A box containing information on an arbitrarily shaped a region of interest.
A box representing a region of interest.
Base Class for all value set types.