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

[MERGE]

parents e0b903b9 f07a9013
......@@ -82,7 +82,7 @@ MARK_AS_ADVANCED( EXECUTABLE_OUTPUT_PATH )
#-----------------------
# -Wno-long-long since on Ubuntu 8.10 it won't compile without it
# -ansi force ISO-C++98 compliance (not GNU++98)
SET( CMAKE_CXX_FLAGS "-pedantic -ansi -Wall -Wextra -Wno-long-long" CACHE STRING "" FORCE )
SET( CMAKE_CXX_FLAGS "-frtti -pedantic -ansi -Wall -Wextra -Wno-long-long" CACHE STRING "" FORCE )
SET( CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG -O0" CACHE STRING "" FORCE )
SET( CMAKE_CXX_FLAGS_RELEASE "-O3" CACHE STRING "" FORCE )
SET( CMAKE_CXX_FLAGS_STATIC "-O3" CACHE STRING "" FORCE )
......
......@@ -229,7 +229,16 @@ void WKernel::doLoadDataSets( std::vector< std::string > fileNames )
shared_ptr< WModule > mod = m_moduleFactory->create( m_moduleFactory->getPrototypeByName( "Data Module" ) );
mod->getProperties()->setValue( "filename" , ( *iter ) );
m_moduleContainer->add( mod );
std::set< boost::shared_ptr< WModule > > comps = m_moduleFactory->getCompatiblePrototypes( mod );
WLogger::getLogger()->addLogMessage( "Compatible Modules? -> ", "Kernel", LL_ERROR );
for ( std::set< boost::shared_ptr< WModule > >::iterator iter=comps.begin(); iter != comps.end(); ++iter )
{
WLogger::getLogger()->addLogMessage( "Compatible Modules: " + ( *iter )->getName() , "Kernel", LL_ERROR );
}
}
exit(0);
}
boost::shared_ptr< WDataHandler > WKernel::getDataHandler() const
......
......@@ -32,7 +32,7 @@
#include <boost/thread/locks.hpp>
// this is necessary since we have some kind of cyclic includes
template < typename T > class WModuleInputData;
template < typename T > class WModuleOutputData;
#include "WModuleOutputData.hpp"
#include "exceptions/WModuleConnectorUnconnected.h"
......@@ -54,7 +54,7 @@ public:
* \param name The name of this connector.
* \param description Short description of this connector.
*/
WModuleInputData( boost::shared_ptr<WModule> module, std::string name="", std::string description="" )
WModuleInputData<T>( boost::shared_ptr<WModule> module, std::string name="", std::string description="" )
:WModuleInputConnector( module, name, description )
{
};
......@@ -62,7 +62,7 @@ public:
/**
* Destructor.
*/
virtual ~WModuleInputData()
virtual ~WModuleInputData<T>()
{
};
......
......@@ -30,7 +30,7 @@
#include <boost/shared_ptr.hpp>
// this is necessary since we have some kind of cyclic includes
template < typename T > class WModuleOutputData;
template < typename T > class WModuleInputData;
#include "WModuleInputData.hpp"
#include "WModuleOutputConnector.h"
......@@ -51,7 +51,7 @@ public:
* \param name The name of this connector.
* \param description Short description of this connector.
*/
WModuleOutputData( boost::shared_ptr<WModule> module, std::string name="", std::string description="" )
WModuleOutputData< T >( boost::shared_ptr<WModule> module, std::string name="", std::string description="" )
:WModuleOutputConnector( module, name, description )
{
m_data = boost::shared_ptr<T>();
......@@ -60,14 +60,14 @@ public:
/**
* Destructor.
*/
virtual ~WModuleOutputData()
virtual ~WModuleOutputData< T >()
{
};
/**
* Update the data associated
*
* \param data
* \param data the data do send
*/
virtual void updateData( boost::shared_ptr<T> data )
{
......
......@@ -25,6 +25,8 @@
#include <string>
#include <vector>
#include "../../dataHandler/WDataSet.h"
#include "../../dataHandler/WDataSetSingle.h"
#include "../../dataHandler/exceptions/WDHException.h"
#include "../../dataHandler/io/WLoaderNIfTI.h"
......@@ -69,8 +71,8 @@ boost::shared_ptr< WDataSet > WMData::getDataSet()
void WMData::connectors()
{
// initialize connectors
m_output= boost::shared_ptr< WModuleOutputData< WDataSet > >( new WModuleOutputData< WDataSet >( shared_from_this(),
"out1", "A loaded dataset." )
m_output= boost::shared_ptr< WModuleOutputData< WDataSet > >( new WModuleOutputData< WDataSet >(
shared_from_this(), "out", "A loaded dataset." )
);
// add it to the list of connectors. Please note, that a connector NOT added via addConnector will not work as expected.
......@@ -170,7 +172,7 @@ void WMData::moduleMain()
}
// notify
m_output->updateData( m_dataSet );
//m_output->updateData( m_dataSet );
ready();
// go to idle mode
......
......@@ -36,6 +36,7 @@
#include "../../kernel/WModuleOutputData.hpp"
#include "../../dataHandler/WDataSet.h"
#include "../../dataHandler/WDataSetSingle.h"
/**
* Module for encapsulating WDataSets. It can encapsulate almost everything, but is intended to be used with WDataSets and its
......
......@@ -168,8 +168,8 @@ void WMMarchingCubes::connectors()
{
// initialize connectors
m_input = boost::shared_ptr<WModuleInputData< boost::shared_ptr< WDataSet > > >(
new WModuleInputData< boost::shared_ptr< WDataSet > >( shared_from_this(),
m_input = boost::shared_ptr<WModuleInputData< WDataSetSingle > >(
new WModuleInputData< WDataSetSingle >( shared_from_this(),
"in", "Dataset to compute isosurface for." )
);
......
......@@ -181,7 +181,7 @@ private:
*/
void renderMesh( WTriangleMesh* mesh );
boost::shared_ptr< WModuleInputData< boost::shared_ptr< WDataSet > > > m_input; //!< Input connector required by this module.
boost::shared_ptr< WModuleInputData< WDataSetSingle > > m_input; //!< Input connector required by this module.
static const unsigned int m_edgeTable[256]; //!< Lookup table for edges used in the construction of the isosurface.
static const int m_triTable[256][16]; //!< Lookup table for triangles used in the construction of the isosurface.
......
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