31 #include <osg/Drawable>
33 #include <osg/Geometry>
35 #include <osg/LineWidth>
37 #include <osg/PointSprite>
38 #include <osgDB/Export>
39 #include <osgDB/Registry>
40 #include <osgDB/WriteFile>
42 #include "WMFiberDisplay.h"
43 #include "core/common/WPropertyHelper.h"
44 #include "core/common/WPropertyObserver.h"
45 #include "core/dataHandler/WDataHandler.h"
46 #include "core/dataHandler/WDataSetFiberClustering.h"
47 #include "core/dataHandler/WDataSetFibers.h"
48 #include "core/graphicsEngine/WGEColormapping.h"
49 #include "core/graphicsEngine/WGEGeodeUtils.h"
50 #include "core/graphicsEngine/WGEUtils.h"
51 #include "core/graphicsEngine/callbacks/WGEFunctorCallback.h"
52 #include "core/graphicsEngine/callbacks/WGENodeMaskCallback.h"
53 #include "core/graphicsEngine/postprocessing/WGEPostprocessingNode.h"
54 #include "core/graphicsEngine/shaders/WGEShader.h"
55 #include "core/graphicsEngine/shaders/WGEShaderDefineOptions.h"
56 #include "core/graphicsEngine/shaders/WGEShaderPropertyDefineOptions.h"
57 #include "core/kernel/WKernel.h"
79 return "Fiber Display";
84 return "Display fibers. This module allows filtering by ROIs and provides full fletched graphical output.";
91 "Optional input to filter the fibers using a clustering." );
102 m_nbVertices->setMax( std::numeric_limits< int >::max() );
104 m_nbFibers->setMax( std::numeric_limits< int >::max() );
107 m_roiFiltering =
m_properties->addProperty(
"ROI Filtering",
"When active, you can use the ROI mechanism to filter fibers.",
true );
108 m_roiFilterColors =
m_properties->addProperty(
"ROI Coloring",
"When active, you will see the coloring specified by the ROI branches.",
true );
113 "When activated, the specified color is used for the lines instead of the dataset colors.",
false,
m_propCondition );
117 "massive FPS drop.",
false );
137 m_lineSmooth =
m_lineGroup->addProperty(
"Anti-Alias",
"Anti-aliased line rendering. This can be slow!",
false );
144 m_tubeZoomable =
m_tubeGroup->addProperty(
"Zoomable",
"If set, fake-tube get thicker when zoomed in. If not set, they always keep the same "
145 "size in screen-space. This emulates standard OpenGL lines.",
true );
159 void enableTransparency( osg::StateSet* state )
162 state->setRenderingHint( osg::StateSet::TRANSPARENT_BIN );
165 state->setMode( GL_DEPTH_TEST, osg::StateAttribute::ON );
176 state->setMode( GL_LIGHTING, osg::StateAttribute::OFF | osg::StateAttribute::PROTECTED );
184 void disableTransparency( osg::StateSet* state )
188 state->setMode( GL_DEPTH_TEST, osg::StateAttribute::ON );
191 state->setMode( GL_LIGHTING, osg::StateAttribute::OFF | osg::StateAttribute::PROTECTED );
201 m_endCapShader->setParameter( GL_GEOMETRY_INPUT_TYPE_EXT, GL_POINTS );
202 m_endCapShader->setParameter( GL_GEOMETRY_OUTPUT_TYPE_EXT, GL_TRIANGLE_STRIP );
207 m_shader->addPreprocessor( defineTmp );
219 m_shader->addPreprocessor( defineTmp );
225 m_shader->addPreprocessor( defineTmp );
230 m_shader->addPreprocessor( defineTmp );
235 m_shader->addPreprocessor( defineTmp );
245 clusterFilterOption->deactivateAllOptions();
246 m_shader->addPreprocessor( clusterFilterOption );
250 osg::ref_ptr< WGEPropertyUniform< WPropDouble > > colormapRationUniform =
259 m_shader->addPreprocessor( defineTmp );
265 m_shader->addPreprocessor( defineTmp );
268 m_shader->addBindAttribLocation(
"a_bitfield", 6 );
288 osg::StateSet* rootState = postNode->getOrCreateStateSet();
289 rootState->addUniform( clipPlanePointUniform );
290 rootState->addUniform( clipPlaneVectorUniform );
291 rootState->addUniform( clipPlaneDistanceUniform );
292 rootState->addUniform( tubeSizeUniform );
293 rootState->addUniform( colormapRationUniform );
329 std::shared_ptr< WDataSetFibers > fibers =
m_fiberInput->getData();
332 bool dataValid = ( fibers != NULL );
333 bool dataPropertiesUpdated = propObserver->updated();
349 if( !( dataValid && ( propertiesUpdated || dataPropertiesUpdated || fibersUpdated || clusteringUpdated ) ) )
357 debugLog() <<
"Clustering updated.";
362 clusterFilterOption->activateOption( 0 );
366 clusterFilterOption->deactivateOption( 0 );
371 if( fibersUpdated || dataPropertiesUpdated || propertiesUpdated )
376 std::unique_lock< boost::mutex > lock(
m_mutex );
391 propObserver->handled();
412 osg::ref_ptr< osg::Geode > geode =
new osg::Geode();
413 osg::ref_ptr< osg::Geode > endCapGeode =
new osg::Geode();
416 geode->setName(
"_Line Geode" );
417 endCapGeode->setName(
"_Tube Cap Geode" );
418 geode->setNodeMask( 0x0000000F );
419 endCapGeode->setNodeMask( 0x0000000F );
431 osg::ref_ptr< osg::StateSet > state = geode->getOrCreateStateSet();
437 state->setAttributeAndModes(
new osg::LineWidth(
m_lineWidth->get(
true ) ), osg::StateAttribute::ON );
439 osg::StateAttribute::GLModeValue onoff =
m_lineSmooth->get() ? osg::StateAttribute::ON : osg::StateAttribute::OFF;
440 state->setAttributeAndModes(
new osg::Hint( GL_LINE_SMOOTH_HINT, GL_NICEST ), onoff );
441 state->setMode( GL_LINE_SMOOTH, onoff );
442 state->setMode( GL_BLEND, osg::StateAttribute::ON );
448 postNode->insert( geode,
m_shader );
461 osg::MatrixTransform* transform =
static_cast< osg::MatrixTransform*
>( node );
467 osg::Matrix translation = osg::Matrix::translate( p.as< osg::Vec3d >() );
470 osg::Matrix rotation = osg::Matrix::rotate( osg::Vec3d( 1.0, 0.0, 0.0 ), v );
472 transform->setMatrix( rotation * translation );
478 osg::ref_ptr< osg::Geode > planeGeode =
new osg::Geode();
479 osg::ref_ptr< osg::MatrixTransform > planeTransform =
new osg::MatrixTransform();
480 osg::ref_ptr< osg::Vec3Array > planeVertices = osg::ref_ptr< osg::Vec3Array >(
new osg::Vec3Array );
481 osg::ref_ptr< osg::Vec4Array > planeColor = osg::ref_ptr< osg::Vec4Array >(
new osg::Vec4Array );
482 osg::ref_ptr< osg::Geometry > planeGeometry = osg::ref_ptr< osg::Geometry >(
new osg::Geometry );
485 planeColor->push_back( osg::Vec4( 1.0, 0.0, 0.0, 0.125 ) );
486 planeVertices->push_back( osg::Vec3( 0.0, -100.0, -100.0 ) );
487 planeVertices->push_back( osg::Vec3( 0.0, -100.0, 100.0 ) );
488 planeVertices->push_back( osg::Vec3( 0.0, 100.0, 100.0 ) );
489 planeVertices->push_back( osg::Vec3( 0.0, 100.0, -100.0 ) );
492 planeGeometry->setVertexArray( planeVertices );
493 planeGeometry->setColorArray( planeColor );
494 planeGeometry->setColorBinding( osg::Geometry::BIND_OVERALL );
495 planeGeometry->addPrimitiveSet(
new osg::DrawArrays( osg::PrimitiveSet::QUADS, 0, 4 ) );
496 planeGeode->addDrawable( planeGeometry );
498 enableTransparency( planeGeode->getOrCreateStateSet() );
499 planeGeode->getOrCreateStateSet()->setMode( GL_BLEND, osg::StateAttribute::ON );
509 planeTransform->addChild( planeGeode );
511 return planeTransform;
515 osg::ref_ptr< osg::Geode > endCapGeode )
518 osg::StateSet* state = fibGeode->getOrCreateStateSet();
519 osg::StateSet* endState = endCapGeode->getOrCreateStateSet();
522 state->setMode( GL_LIGHTING, osg::StateAttribute::OFF | osg::StateAttribute::PROTECTED );
525 osg::ref_ptr< osg::Vec3Array > vertices = osg::ref_ptr< osg::Vec3Array >(
new osg::Vec3Array );
526 osg::ref_ptr< osg::Vec4Array > colors = osg::ref_ptr< osg::Vec4Array >(
new osg::Vec4Array );
527 osg::ref_ptr< osg::Vec3Array > tangents = osg::ref_ptr< osg::Vec3Array >(
new osg::Vec3Array );
528 osg::ref_ptr< osg::FloatArray > texcoords = osg::ref_ptr< osg::FloatArray >(
new osg::FloatArray );
529 osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >(
new osg::Geometry );
536 osg::ref_ptr< osg::Vec3Array > endVertices = osg::ref_ptr< osg::Vec3Array >(
new osg::Vec3Array );
537 osg::ref_ptr< osg::Vec4Array > endColors = osg::ref_ptr< osg::Vec4Array >(
new osg::Vec4Array );
538 osg::ref_ptr< osg::Vec3Array > endTangents = osg::ref_ptr< osg::Vec3Array >(
new osg::Vec3Array );
539 osg::ref_ptr< osg::Geometry > endGeometry = osg::ref_ptr< osg::Geometry >(
new osg::Geometry );
543 osg::ref_ptr< osg::Vec3Array > startVertices = osg::ref_ptr< osg::Vec3Array >(
new osg::Vec3Array );
544 osg::ref_ptr< osg::Vec4Array > startColors = osg::ref_ptr< osg::Vec4Array >(
new osg::Vec4Array );
545 osg::ref_ptr< osg::Vec3Array > startTangents = osg::ref_ptr< osg::Vec3Array >(
new osg::Vec3Array );
546 osg::ref_ptr< osg::Geometry > startGeometry = osg::ref_ptr< osg::Geometry >(
new osg::Geometry );
557 debugLog() <<
"Color mode is " << fibColorMode <<
".";
565 ( usePlainColor && ( plainColor.a() != 1.0 ) ) )
567 enableTransparency( state );
568 enableTransparency( endState );
572 disableTransparency( state );
573 disableTransparency( endState );
576 state->setMode( GL_BLEND, osg::StateAttribute::ON );
578 endState->setMode( GL_BLEND, osg::StateAttribute::ON );
581 std::shared_ptr< WProgress > progress1(
new WProgress(
"Adding fibers to geode", fibStart->size() ) );
585 debugLog() <<
"Iterating over " << fibStart->size() <<
" fibers.";
586 debugLog() <<
"Number of vertices: " << fibVerts->size() / 3;
587 size_t currentStart = 0;
589 for(
size_t fidx = 0; fidx < fibStart->size() ; ++fidx )
594 size_t sidx = fibStart->at( fidx ) * 3;
595 size_t csidx = fibStart->at( fidx ) * fibColorMode;
598 size_t len = fibLen->at( fidx );
601 ( *m_bitfieldAttribs )[ fidx ] =
m_fiberSelector->getBitfield()->at( fidx );
604 ( *m_secondaryColor )[ fidx ] = osg::Vec3( c.r(), c.g(), c.b() );
617 osg::Vec3 firstVert = osg::Vec3( fibVerts->at( ( 3 * 0 ) + sidx ),
618 fibVerts->at( ( 3 * 0 ) + sidx + 1 ),
619 fibVerts->at( ( 3 * 0 ) + sidx + 2 ) );
620 osg::Vec3 secondVert = osg::Vec3( fibVerts->at( ( 3 * 1 ) + sidx ),
621 fibVerts->at( ( 3 * 1 ) + sidx + 1 ),
622 fibVerts->at( ( 3 * 1 ) + sidx + 2 ) );
623 osg::Vec3 lastVert = osg::Vec3( fibVerts->at( ( 3 * ( len - 1 ) ) + sidx ),
624 fibVerts->at( ( 3 * ( len - 1 ) ) + sidx + 1 ),
625 fibVerts->at( ( 3 * ( len - 1 ) ) + sidx + 2 ) );
626 osg::Vec3 secondLastVert = osg::Vec3( fibVerts->at( ( 3 * ( len - 2 ) ) + sidx ),
627 fibVerts->at( ( 3 * ( len - 2 ) ) + sidx + 1 ),
628 fibVerts->at( ( 3 * ( len - 2 ) ) + sidx + 2 ) );
629 osg::Vec3 startNormal = firstVert - secondVert;
630 osg::Vec3 endNormal = lastVert - secondLastVert;
631 startTangents->push_back( startNormal );
632 startVertices->push_back( firstVert );
633 endTangents->push_back( endNormal );
634 endVertices->push_back( lastVert );
638 for(
size_t k = 0; k < len; ++k )
640 osg::Vec3 vert = osg::Vec3( fibVerts->at( ( 3 * k ) + sidx ),
641 fibVerts->at( ( 3 * k ) + sidx + 1 ),
642 fibVerts->at( ( 3 * k ) + sidx + 2 ) );
644 osg::Vec3 tangent = osg::Vec3( fibTangents->at( ( 3 * k ) + sidx ),
645 fibTangents->at( ( 3 * k ) + sidx + 1 ),
646 fibTangents->at( ( 3 * k ) + sidx + 2 ) );
649 osg::Vec4 color = plainColor;
652 color = osg::Vec4( fibColors->at( ( fibColorMode * k ) + csidx + ( 0 % fibColorMode ) ),
653 fibColors->at( ( fibColorMode * k ) + csidx + ( 1 % fibColorMode ) ),
654 fibColors->at( ( fibColorMode * k ) + csidx + ( 2 % fibColorMode ) ),
656 fibColors->at( ( fibColorMode * k ) + csidx + ( 3 % fibColorMode ) ) : 1.0 );
659 vertices->push_back( vert );
660 colors->push_back( color );
661 tangents->push_back( tangent );
668 startColors->push_back( color );
672 endColors->push_back( color );
675 vertices->push_back( vert );
676 colors->push_back( color );
677 tangents->push_back( tangent );
682 texcoords->push_back( 1.0 );
683 texcoords->push_back( -1.0 );
690 geometry->addPrimitiveSet(
new osg::DrawArrays( osg::PrimitiveSet::QUAD_STRIP, 2 * currentStart, 2 * len ) );
694 geometry->addPrimitiveSet(
new osg::DrawArrays( osg::PrimitiveSet::LINE_STRIP, currentStart, len ) );
701 geometry->setVertexArray( vertices );
702 geometry->setColorArray( colors );
703 geometry->setColorBinding( osg::Geometry::BIND_PER_VERTEX );
704 geometry->setNormalArray( tangents );
705 geometry->setNormalBinding( osg::Geometry::BIND_PER_VERTEX );
708 geometry->setTexCoordArray( 0, texcoords );
711 endGeometry->addPrimitiveSet(
new osg::DrawArrays( osg::PrimitiveSet::POINTS, 0, endVertices->size() ) );
712 endGeometry->setVertexArray( endVertices );
713 endGeometry->setColorArray( endColors );
714 endGeometry->setColorBinding( osg::Geometry::BIND_PER_VERTEX );
715 endGeometry->setNormalArray( endTangents );
716 endGeometry->setNormalBinding( osg::Geometry::BIND_PER_VERTEX );
718 startGeometry->addPrimitiveSet(
new osg::DrawArrays( osg::PrimitiveSet::POINTS, 0, startVertices->size() ) );
719 startGeometry->setVertexArray( startVertices );
720 startGeometry->setColorArray( startColors );
721 startGeometry->setColorBinding( osg::Geometry::BIND_PER_VERTEX );
722 startGeometry->setNormalArray( startTangents );
723 startGeometry->setNormalBinding( osg::Geometry::BIND_PER_VERTEX );
725 endCapGeode->addDrawable( startGeometry );
726 endCapGeode->addDrawable( endGeometry );
728 endState->setAttribute(
new osg::Point( 1.0f ), osg::StateAttribute::ON );
731 geometry->setUseDisplayList(
false );
732 geometry->setUseVertexBufferObjects(
true );
733 startGeometry->setUseDisplayList(
false );
734 startGeometry->setUseVertexBufferObjects(
true );
735 endGeometry->setUseDisplayList(
false );
736 endGeometry->setUseVertexBufferObjects(
true );
742 geometry->setVertexAttribBinding( 6, osg::Geometry::BIND_PER_PRIMITIVE_SET );
743 geometry->setSecondaryColorBinding( osg::Geometry::BIND_PER_PRIMITIVE_SET );
749 startGeometry->setVertexAttribBinding( 6, osg::Geometry::BIND_PER_PRIMITIVE_SET );
751 endGeometry->setVertexAttribBinding( 6, osg::Geometry::BIND_PER_PRIMITIVE_SET );
754 startGeometry->setSecondaryColorBinding( osg::Geometry::BIND_PER_PRIMITIVE_SET );
756 endGeometry->setSecondaryColorBinding( osg::Geometry::BIND_PER_PRIMITIVE_SET );
762 boost::placeholders::_1 ) ) );
765 fibGeode->addDrawable( geometry );
767 debugLog() <<
"Iterating over all fibers: done!";
775 std::unique_lock< boost::mutex > lock(
m_mutex );
782 for(
size_t fidx = 0; fidx <
m_fibers->getLineStartIndexes()->size() ; ++fidx )
784 ( *m_bitfieldAttribs )[ fidx ] = overrideROIFiltering |
m_fiberSelector->getBitfield()->at( fidx );
786 ( *m_secondaryColor )[ fidx ] = osg::Vec3( c.r(), c.g(), c.b() );
795 size_t maxFibIdx =
m_fibers->getLineStartIndexes()->size() - 1;
796 osg::ref_ptr< osg::Vec3Array > attribs =
new osg::Vec3Array( maxFibIdx + 1 );
798 for(
size_t fidx = 0; fidx <
m_fibers->getLineStartIndexes()->size() ; ++fidx )
800 ( *attribs)[ fidx ] = osg::Vec3( 0.0, 0.0, 0.0 );
808 for( WFiberCluster::IndexList::const_iterator fibIter = ids.begin(); fibIter != ids.end(); ++fibIter )
811 if( *fibIter > maxFibIdx )
816 ( *attribs)[ *fibIter ] = osg::Vec3(
817 ( *iter ).second->getColor().r(),
818 ( *iter ).second->getColor().g(),
819 ( *iter ).second->getColor().b()
823 static_cast< osg::Geometry*
>( geometry )->setSecondaryColorArray( attribs );
824 static_cast< osg::Geometry*
>( geometry )->setSecondaryColorBinding( osg::Geometry::BIND_PER_PRIMITIVE_SET );
832 state->setAttributeAndModes(
new osg::LineWidth(
m_lineWidth->get(
true ) ), osg::StateAttribute::ON );
838 osg::StateAttribute::GLModeValue onoff =
m_lineSmooth->get() ? osg::StateAttribute::ON : osg::StateAttribute::OFF;
839 state->setAttributeAndModes(
new osg::Hint( GL_LINE_SMOOTH_HINT, GL_NICEST ), onoff );
840 state->setMode( GL_LINE_SMOOTH, onoff );
843 state->setMode( GL_BLEND, osg::StateAttribute::ON );
virtual void wait() const
Wait for the condition.
void setResetable(bool resetable=true, bool autoReset=true)
Sets the resetable flag.
virtual void add(std::shared_ptr< WCondition > condition)
Adds another condition to the set of conditions to wait for.
Class to encapsulate boost::condition_variable_any.
ColorMode
different kinds of color arrays can be used in this class.
std::shared_ptr< std::vector< size_t > > IndexArray
Index list indexing fibers in VertexArray in terms of vertex numbers.
std::shared_ptr< std::vector< float > > ColorArray
Colors for each vertex in VertexArray.
std::shared_ptr< std::vector< float > > TangentArray
Tangents at each vertex in VertexArray.
std::shared_ptr< std::vector< size_t > > LengthArray
Lengths of fibers in terms of vertices.
std::shared_ptr< std::vector< float > > VertexArray
List of vertex coordinates in term of components of vertices.
std::list< size_t > IndexList
This is the list of indices of fibers.
Adaptor class between the roi manager and the fiber display.
static void apply(osg::ref_ptr< osg::Node > node, WMatrix4d preTransform=WMatrix4d::identity(), osg::ref_ptr< WGEShader > shader=osg::ref_ptr< WGEShader >(), size_t startTexUnit=0)
Apply the colormapping to the specified node.
This callback allows you a simple usage of callbacks in your module.
This callback is useful to en-/disable nodes using the node mask based on properties.
This class enables you to add arbitrary nodes that get post-processed in screen space.
This GLSL preprocessor is able to set one define from a list of defines depending on the active optio...
std::shared_ptr< WGEShaderDefineOptions > SPtr
Shared pointer for this class.
std::shared_ptr< WGEShaderPreprocessor > SPtr
Shared pointer for this class.
This is a WGEShaderDefineOptions class which additionally uses a property to automatically control th...
Class encapsulating the OSG Program class for a more convenient way of adding and modifying shader.
static WKernel * getRunningKernel()
Returns pointer to the currently running kernel.
std::shared_ptr< WGraphicsEngine > getGraphicsEngine() const
Returns pointer to currently running instance of graphics engine.
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.
boost::filesystem::path m_localPath
The path where the module binary resides in.
virtual void properties()
Initialize properties in this function.
wlog::WStreamedLogger debugLog() const
Logger instance for comfortable debug logging.
std::shared_ptr< WProperties > m_properties
The property object for the module.
std::shared_ptr< WProperties > m_infoProperties
The property object for the module containing only module whose purpose is "PV_PURPOSE_INFORMNATION".
void ready()
Call this whenever your module is ready and can react on property changes.
WConditionSet m_moduleState
The internal state of the module.
WPropBool m_active
True whenever the module should be active.
std::shared_ptr< WProgressCombiner > m_progress
Progress indicator used as parent for all progress' of this module.
virtual void connectors()
Initialize connectors in this function.
This only is a 3d double vector.
Class managing progress inside of modules.
static std::shared_ptr< WPropertyObserver > create()
Creates a new instance of WPropertyObserver.
WBoolFlag m_shutdownFlag
Condition getting fired whenever the thread should quit.