25 #ifndef WMFIBERDISPLAY_H
26 #define WMFIBERDISPLAY_H
31 #include <boost/thread.hpp>
33 #include "core/dataHandler/WDataSetFiberClustering.h"
34 #include "core/dataHandler/WDataSetFibers.h"
35 #include "core/kernel/WFiberSelector.h"
36 #include "core/kernel/WModule.h"
37 #include "core/kernel/WModuleInputData.h"
38 #include "core/kernel/WModuleOutputData.h"
65 virtual const std::string
getName()
const;
79 virtual std::shared_ptr< WModule >
factory()
const;
296 void createFiberGeode( std::shared_ptr< WDataSetFibers > fibers, osg::ref_ptr< osg::Geode > fibGeode,
297 osg::ref_ptr< osg::Geode > endCapGeode );
std::shared_ptr< WDataSetFiberClustering > SPtr
Convenience typedef for a std::shared_ptr< WDataSetFiberClustering >.
std::shared_ptr< WDataSetFibers > SPtr
Pointer to dataset.
Class encapsulating the OSG Program class for a more convenient way of adding and modifying shader.
This modules takes a dataset and equalizes its histogram.
std::shared_ptr< WModuleInputData< WDataSetFiberClustering > > m_fiberClusteringInput
An optional fiber clustering can be specified to filter in m_fiberInput.
WPropBool m_lineSmooth
Line smoothing.
osg::ref_ptr< WGEShader > m_endCapShader
The shader used for drawing end cap sprites if in tube mode.
WPropBool m_clipPlaneShowPlane
Property for en-/disabling of the clip plane plane.
bool m_fiberClusteringUpdate
If true, the geometryUpdate() callback will upload a new filter attribute array.
WPropBool m_tubeEndCapsEnable
Property denoting whether to use end-caps on tubes.
WDataSetFibers::SPtr m_fibers
The current fiber data.
bool m_fiberSelectorChanged
Is true when received a change signal from m_fiberSelector.
void geometryUpdate(osg::Drawable *geometry)
Geometry update callback.
boost::mutex m_mutex
A mutex used to atomically update the fibers and their selector.
void lineGeodeStateCallback(osg::StateSet *state)
Callback for the line geode to allow interactive modification of line smooth and width states.
osg::ref_ptr< osg::Vec3Array > m_secondaryColor
Contains the ROI color map for live branch coloring.
virtual ~WMFiberDisplay()
Destructor.
WPropDouble m_colormapRatio
The ratio between colormap and fiber color.
boost::signals2::connection m_roiUpdateConnection
Connection to the roi dirty signal.
osg::ref_ptr< osg::Node > createClipPlane() const
Creates the clip plane with corresponding callbacks.
osg::ref_ptr< osg::FloatArray > m_bitfieldAttribs
Contains the ROI bitfield.
WPropGroup m_clipPlaneGroup
A property group for all the clipping related props.
WPropInt m_nbVertices
Info-property showing the number of vertices in the fiber data set.
virtual const std::string getDescription() const
Gives back a description of this module.
osg::ref_ptr< osg::Uniform > m_roiFilterColorsOverride
Ratio between dataset color and ROI color.
WPropBool m_tubeZoomable
Prop denoting whether tubes can be zoomed or not.
WPropBool m_clipPlaneEnabled
Property for en-/disable clipping.
WPropBool m_colormapEnabled
True if colormapping should be used.
osg::ref_ptr< WGEShader > m_shader
The shader used for actually drawing the fake tubes or lines.
WPropBool m_roiFiltering
Allow disabling ROI filter mode.
WPropDouble m_clipPlaneDistance
Distance from plane.
WPropBool m_illuminationEnable
Illumination.
WPropBool m_tubeEnable
Prop denoting whether to use tubes or line strips.
std::shared_ptr< WFiberSelector > m_fiberSelector
Point to a fiber selector, which is an adapter between the ROI manager and the this module.
virtual void properties()
Initialize the properties for this module.
virtual void connectors()
Initialize the connectors this module is using.
virtual void moduleMain()
Entry point after loading the module.
void clipPlaneCallback(osg::Node *node) const
Update the transform node to provide an cue were the plane actually is.
WPropDouble m_lineWidth
Line width.
WMFiberDisplay()
Default constructor.
WProperties::SPtr m_fibProps
The properties of the fiber dataset.
WPropInt m_nbFibers
Info-property showing the number of fibers in the fiber data set.
WPropBool m_plainColorMode
Define whether to use a single color or the dataset color.
WPropPosition m_clipPlanePoint
Point on the plane.
WPropPosition m_clipPlaneVector
Vector of the plane.
void createFiberGeode(std::shared_ptr< WDataSetFibers > fibers, osg::ref_ptr< osg::Geode > fibGeode, osg::ref_ptr< osg::Geode > endCapGeode)
Creates a geode containing the fiber geometry.
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
WPropBool m_tubeRibbon
Creates a ribbon-like appearance.
WDataSetFiberClustering::SPtr m_fiberClustering
The current fiber clustering.
void roiUpdate()
Called when updating the selection.
WPropBool m_roiFilterColors
Use coloring defined by the roi branches.
WPropColor m_plainColor
Define a color to use if in plain color mode.
WPropDouble m_tubeSize
The size.
std::shared_ptr< WModuleInputData< WDataSetFibers > > m_fiberInput
The fiber dataset which is going to be filtered.
WPropGroup m_tubeGroup
Group containing tube specific properties.
virtual const std::string getName() const
Gives back the name of this module.
WPropGroup m_lineGroup
Group containing line specific properties.
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...
WPropGroup m_coloringGroup
Group containing several coloring options.
osg::ref_ptr< osg::Node > m_plane
The plane node.
Class representing a single module of OpenWalnut.
std::shared_ptr< WPropertyGroup > SPtr
shared pointer to object of this type