Commit e0358de4 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - connectore view skeleton added to factory

parent 15eb58d0
......@@ -33,6 +33,7 @@
#include "../modules/data/WMData.h"
#include "../modules/distanceMap/WMDistanceMapIsosurface.h"
#include "../modules/distanceMap/WMDistanceMap.h"
#include "../modules/connectomeView/WMConnectomeView.h"
#include "../modules/eegView/WMEEGView.h"
#include "../modules/fiberClustering/WMFiberClustering.h"
#include "../modules/fiberCulling/WMFiberCulling.h"
......@@ -90,6 +91,7 @@ void WModuleFactory::load()
m_prototypes.insert( boost::shared_ptr< WModule >( new WMVoxelizer() ) );
m_prototypes.insert( boost::shared_ptr< WModule >( new WMDirectVolumeRendering() ) );
m_prototypes.insert( boost::shared_ptr< WModule >( new WMWriteNIfTI() ) );
m_prototypes.insert( boost::shared_ptr< WModule >( new WMConnectomeView() ) );
lock.unlock();
......
......@@ -56,7 +56,9 @@ WMConnectomeView::WMConnectomeView():
m_dataSet()
{
// WARNING: initializing connectors inside the constructor will lead to an exception.
// Implement WModule::initializeConnectors instead.
// NOTE: Do not use the module factory inside this constructor. This will cause a dead lock as the module factory is locked
// during construction of this instance and can then not be used to create another instance (Isosurface in this case). If you
// want to initialize some modules using the module factory BEFORE the moduleMain() call, overwrite WModule::initialize().
}
WMConnectomeView::~WMConnectomeView()
......@@ -90,14 +92,24 @@ void WMConnectomeView::moduleMain()
void WMConnectomeView::connectors()
{
// initialize connectors
m_input = boost::shared_ptr< WModuleInputData < WDataSetSingle > >(
new WModuleInputData< WDataSetSingle >( WModule::shared_from_this(),
"in", "Volume Dataset to render directly." )
// this is the scalar field input
m_mrtInput = boost::shared_ptr< WModuleInputForwardData< WDataSetSingle > >(
new WModuleInputForwardData< WDataSetSingle >( shared_from_this(),
"context", "The context dataset used to visualize the context in\
the brain." )
);
// add it to the list of connectors. Please note, that a connector NOT added via addConnector will not work as expected.
addConnector( m_input );
addConnector( m_mrtInput );
// this is the scalar field input
m_fiberInput = boost::shared_ptr< WModuleInputForwardData< WDataSetFibers2 > >(
new WModuleInputForwardData< WDataSetFibers2 >( shared_from_this(),
"fibers", "The fiber dataset used to find connection path." )
);
// add it to the list of connectors. Please note, that a connector NOT added via addConnector will not work as expected.
addConnector( m_fiberInput );
// call WModules initialization
WModule::connectors();
......
......@@ -33,10 +33,12 @@
#include <osg/Geode>
#include <osg/Uniform>
#include "../../dataHandler/WDataSetFibers2.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleContainer.h"
#include "../../kernel/WModuleInputData.h"
#include "../../dataHandler/WGridRegular3D.h"
#include "../../kernel/WModuleInputForwardData.h"
#include "../../kernel/WModuleOutputForwardData.h"
/**
* This module is able to visualize connectome data in the context of MRI data. It uses the module container class to allow the
......@@ -102,9 +104,14 @@ protected:
private:
/**
* Input connector.
* The T1 image used as context
*/
boost::shared_ptr< WModuleInputForwardData< WDataSetSingle > > m_mrtInput;
/**
* The fiber dataset used.
*/
boost::shared_ptr< WModuleInputData< WDataSetSingle > > m_input;
boost::shared_ptr< WModuleInputForwardData< WDataSetFibers2 > > m_fiberInput;
/**
* the current dataset
......
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