Commit 14b64c8e authored by reichenbach's avatar reichenbach

[ADD] added output for complete clustering

parent 1aebbc45
......@@ -168,6 +168,15 @@ void WMDetTractClustering::updateOutput()
m_clusterOutputID->set( 0, true );
}
m_cluserOC->updateData( boost::shared_ptr< WFiberCluster >( new WFiberCluster( m_clusters[ m_clusterOutputID->get() ] ) ) );
boost::shared_ptr< WDataSetFiberClustering > clustering( new WDataSetFiberClustering() );
for( std::size_t k = 0; k < m_clusters.size(); ++k )
{
clustering->getOrCreateCluster( k )->merge( m_clusters[ k ] );
}
m_clustersOutput->updateData( clustering );
}
void WMDetTractClustering::update()
......@@ -420,6 +429,8 @@ void WMDetTractClustering::connectors()
m_tractIC = WModuleInputData< WDataSetFibers >::createAndAdd( shared_from_this(), "tractInput", "A deterministic tract dataset." );
m_cluserOC = WModuleOutputData< WFiberCluster >::createAndAdd( shared_from_this(), "clusterOutput", "A set of tract indices aka cluster" );
m_clustersOutput = WModuleOutputData< WDataSetFiberClustering >::createAndAdd( shared_from_this(), "allClustersOutput", "The clustering." );
WModule::connectors(); // call WModules initialization
}
......
......@@ -36,6 +36,7 @@
#include "core/common/math/WMatrixSym.h"
#include "core/dataHandler/datastructures/WFiberCluster.h"
#include "core/dataHandler/WDataSetFiberVector.h"
#include "core/dataHandler/WDataSetFiberClustering.h"
#include "core/graphicsEngine/WGEManagedGroupNode.h"
#include "core/kernel/WModule.h"
#include "core/kernel/WModuleInputData.h"
......@@ -258,6 +259,11 @@ private:
*/
boost::shared_ptr< WModuleOutputData< WFiberCluster > > m_cluserOC;
/**
* Output connector for all clusters.
*/
boost::shared_ptr< WModuleOutputData< WDataSetFiberClustering > > m_clustersOutput;
/**
* Distance matrix lookUpTable
*/
......
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