Commit 28d95bf3 authored by Mathias Goldau's avatar Mathias Goldau
Browse files

[CHANGE #153] Now loading other dataset then fibers is ok with fiber displaying module

parent c2296a86
...@@ -134,7 +134,7 @@ void WKernel::threadMain() ...@@ -134,7 +134,7 @@ void WKernel::threadMain()
// default modules // default modules
m_moduleContainer->add( m_moduleFactory->create( m_moduleFactory->getPrototypeByName( "Navigation Slice Module" ) ) , true ); m_moduleContainer->add( m_moduleFactory->create( m_moduleFactory->getPrototypeByName( "Navigation Slice Module" ) ) , true );
m_moduleContainer->add( m_moduleFactory->create( m_moduleFactory->getPrototypeByName( "Coordinate System Module" ) ) , true ); m_moduleContainer->add( m_moduleFactory->create( m_moduleFactory->getPrototypeByName( "Coordinate System Module" ) ) , true );
//m_moduleContainer->add( m_moduleFactory->create( m_moduleFactory->getPrototypeByName( "Fiber Display Module" ) ) , true ); m_moduleContainer->add( m_moduleFactory->create( m_moduleFactory->getPrototypeByName( "Fiber Display Module" ) ) , true );
// actually there is nothing more to do here // actually there is nothing more to do here
waitForStop(); waitForStop();
......
...@@ -139,12 +139,14 @@ void WMFiberDisplay::moduleMain() ...@@ -139,12 +139,14 @@ void WMFiberDisplay::moduleMain()
} }
boost::shared_ptr< const WDataSetFibers > fiberDS; boost::shared_ptr< const WDataSetFibers > fiberDS;
assert( fiberDS = boost::shared_dynamic_cast< const WDataSetFibers >( dataHandler->getSubject( 0 )->getDataSet( 0 ) ) ); if( fiberDS = boost::shared_dynamic_cast< const WDataSetFibers >( dataHandler->getSubject( 0 )->getDataSet( 0 ) ) )
osg::ref_ptr< osg::Group > group = osg::ref_ptr< osg::Group >( new osg::Group ); {
group->addChild( genFiberGeode( fiberDS, false ).get() ); osg::ref_ptr< osg::Group > group = osg::ref_ptr< osg::Group >( new osg::Group );
group->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF ); group->addChild( genFiberGeode( fiberDS, false ).get() );
group->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF );
WKernel::getRunningKernel()->getGraphicsEngine()->getScene()->addChild( group.get() ); WKernel::getRunningKernel()->getGraphicsEngine()->getScene()->addChild( group.get() );
}
// Since the modules run in a separate thread: such loops are possible // Since the modules run in a separate thread: such loops are possible
while ( !m_FinishRequested ) while ( !m_FinishRequested )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment