Commit addd16ed authored by Mathias Goldau's avatar Mathias Goldau

[FIX #164] Renaming for the new "WM" module naming convention

parent b9a2fa11
......@@ -125,8 +125,8 @@ ELSE( NOT CMAKE_BUILD_TYPE STREQUAL "Static" )
ENDIF ( NOT CMAKE_BUILD_TYPE STREQUAL "Static" )
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/shaders)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/modules/navigationSlices/slice.vs ${CMAKE_BINARY_DIR}/bin/shaders/)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/modules/navigationSlices/slice.fs ${CMAKE_BINARY_DIR}/bin/shaders/)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/modules/navSlices/slice.vs ${CMAKE_BINARY_DIR}/bin/shaders/)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/modules/navSlices/slice.fs ${CMAKE_BINARY_DIR}/bin/shaders/)
# Special targets:
......
......@@ -22,7 +22,7 @@ IF( CXXTEST_FOUND )
"WModuleOutputData.hpp"
"WModuleInputData.cpp"
"WModuleOutputData.cpp"
"../modules/navigationSlices/WMNavSlice.cpp"
"../modules/navSlices/WMNavSlices.cpp"
"../modules/eegTest/WMEEGTest.cpp"
)
ENDIF( CXXTEST_FOUND )
......@@ -35,8 +35,8 @@
#include "WModule.h"
#include "../modules/data/WMData.hpp"
#include "../modules/navigationSlices/WMNavSlice.h"
#include "../modules/coordinateSystem/WCoordinateSystem.h"
#include "../modules/navSlices/WMNavSlices.h"
#include "../modules/coordinateSystem/WMCoordinateSystem.h"
#include "../modules/fiberDisplay/WMFiberDisplay.h"
#include "../modules/fiberCulling/WMFiberCulling.h"
#include "../modules/fiberClustering/WMFiberClustering.h"
......@@ -188,13 +188,15 @@ void WKernel::loadModules()
m_modules.clear();
using boost::shared_ptr;
shared_ptr< WModule > m1 = shared_ptr< WModule >( new WNavigationSliceModule() );
// shared_ptr< WModule > m = shared_ptr< WModule >( new WFiberDisplay() );
shared_ptr< WModule > m1 = shared_ptr< WModule >( new WMNavSlices() );
// shared_ptr< WModule > m = shared_ptr< WModule >( new WMFiberDisplay() );
// shared_ptr< WModule > m = shared_ptr< WModule >( new WMFiberCulling() );
// shared_ptr< WModule > m = shared_ptr< WModule >( new WMFiberClustering() );
WLogger::getLogger()->addLogMessage( "Loading module: " + m1->getName(), "Kernel", LL_DEBUG );
m_modules.push_back( m1 );
shared_ptr< WModule > m2 = shared_ptr< WModule >( new WCoordinateSystem() );
shared_ptr< WModule > m2 = shared_ptr< WModule >( new WMCoordinateSystem() );
WLogger::getLogger()->addLogMessage( "Loading module: " + m2->getName(), "Kernel", LL_DEBUG );
m_modules.push_back( m2 );
}
......
......@@ -29,19 +29,19 @@
#include <osg/Geometry>
#include "../../kernel/WKernel.h"
#include "WCoordinateSystem.h"
#include "WMCoordinateSystem.h"
WCoordinateSystem::WCoordinateSystem() :
WMCoordinateSystem::WMCoordinateSystem() :
WModule()
{
properties();
}
WCoordinateSystem::~WCoordinateSystem()
WMCoordinateSystem::~WMCoordinateSystem()
{
}
void WCoordinateSystem::threadMain()
void WMCoordinateSystem::threadMain()
{
createGeometry();
......@@ -55,22 +55,22 @@ void WCoordinateSystem::threadMain()
// clean up stuff
}
const std::string WCoordinateSystem::getName() const
const std::string WMCoordinateSystem::getName() const
{
return "Coordinate System Module";
}
const std::string WCoordinateSystem::getDescription() const
const std::string WMCoordinateSystem::getDescription() const
{
return "This module displays coordinate systems as overlay withn the main 3D view.";
}
void WCoordinateSystem::connectToGui()
void WMCoordinateSystem::connectToGui()
{
WKernel::getRunningKernel()->getGui()->connectProperties( m_properties );
}
void WCoordinateSystem::properties()
void WMCoordinateSystem::properties()
{
m_properties->addBool( "textureChanged", false );
......@@ -90,7 +90,7 @@ void WCoordinateSystem::properties()
m_properties->addFloat( "brbZ", 160.0 );
}
void WCoordinateSystem::createGeometry()
void WMCoordinateSystem::createGeometry()
{
float zeroX = m_properties->getValue<float>( "zeroX" );
float zeroY = m_properties->getValue<float>( "zeroY" );
......@@ -174,10 +174,10 @@ void WCoordinateSystem::createGeometry()
// osg::StateSet* rootState = m_rootNode->getOrCreateStateSet();
m_rootNode->setUpdateCallback( new coordinateNodeCallback( boost::shared_dynamic_cast<WCoordinateSystem>( shared_from_this() ) ) );
m_rootNode->setUpdateCallback( new coordinateNodeCallback( boost::shared_dynamic_cast<WMCoordinateSystem>( shared_from_this() ) ) );
}
void WCoordinateSystem::updateGeometry()
void WMCoordinateSystem::updateGeometry()
{
boost::shared_lock< boost::shared_mutex > slock;
slock = boost::shared_lock< boost::shared_mutex >( m_updateLock );
......@@ -193,7 +193,7 @@ void WCoordinateSystem::updateGeometry()
if ( datasetList.size() > 0 )
{
boost::shared_ptr< WDataModule< int > > module = boost::shared_dynamic_cast< WDataModule< int > >( datasetList[0] );
boost::shared_ptr< WMData< int > > module = boost::shared_dynamic_cast< WMData< int > >( datasetList[0] );
boost::shared_ptr< WDataSetSingle > ds = boost::shared_dynamic_cast< WDataSetSingle >( module->getDataSet() );
if ( ds->getValueSet()->getDataType() != 2 )
......
......@@ -22,15 +22,15 @@
//
//---------------------------------------------------------------------------
#ifndef WCOORDINATESYSTEM_H
#define WCOORDINATESYSTEM_H
#ifndef WMCOORDINATESYSTEM_H
#define WMCOORDINATESYSTEM_H
#include <string>
#include <osg/Geode>
#include "../../dataHandler/WDataSet.h"
#include "../data/WDataModule.hpp"
#include "../data/WMData.hpp"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleConnector.h"
#include "../../kernel/WModuleInputData.hpp"
......@@ -38,18 +38,18 @@
/**
* class that implements the various coordinate systems as overlays within the 3D view
*/
class WCoordinateSystem : public WModule, public osg::Referenced
class WMCoordinateSystem : public WModule, public osg::Referenced
{
public:
/**
* standard constructor
*/
WCoordinateSystem();
WMCoordinateSystem();
/**
* destructor
*/
virtual ~WCoordinateSystem();
virtual ~WMCoordinateSystem();
/**
* callback for updating the geometry
......@@ -114,7 +114,7 @@ private:
class coordinateNodeCallback : public osg::NodeCallback
{
public:
explicit coordinateNodeCallback( boost::shared_ptr< WCoordinateSystem > module )
explicit coordinateNodeCallback( boost::shared_ptr< WMCoordinateSystem > module )
{
m_module = module;
}
......@@ -128,10 +128,10 @@ public:
traverse( node, nv );
}
private:
boost::shared_ptr< WCoordinateSystem > m_module;
boost::shared_ptr< WMCoordinateSystem > m_module;
};
#endif // WCOORDINATESYSTEM_H
#endif // WMCOORDINATESYSTEM_H
......@@ -35,7 +35,7 @@
#include "boost/smart_ptr.hpp"
#include "WMNavSlice.h"
#include "WMNavSlices.h"
#include "../../kernel/WKernel.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleConnector.h"
......@@ -50,7 +50,7 @@
#include "../../graphicsEngine/WShader.h"
WMNavSlice::WMNavSlice():
WMNavSlices::WMNavSlices():
WModule()
{
// WARNING: initializing connectors inside the constructor will lead to an exception.
......@@ -63,23 +63,23 @@ WMNavSlice::WMNavSlice():
properties();
}
WMNavSlice::~WMNavSlice()
WMNavSlices::~WMNavSlices()
{
// cleanup
removeConnectors();
}
const std::string WMNavSlice::getName() const
const std::string WMNavSlices::getName() const
{
return "Navigation Slice Module";
}
const std::string WMNavSlice::getDescription() const
const std::string WMNavSlices::getDescription() const
{
return "This module shows 3 orthogonal navigation slices.";
}
void WMNavSlice::connectors()
void WMNavSlices::connectors()
{
// initialize connectors
// XXX to add a new connector and to offer it, these simple steps need to be done
......@@ -96,7 +96,7 @@ void WMNavSlice::connectors()
WModule::connectors();
}
void WMNavSlice::properties()
void WMNavSlices::properties()
{
m_properties->addBool( "textureChanged", false );
......@@ -113,7 +113,7 @@ void WMNavSlice::properties()
m_properties->addBool( "showSagittal", true );
}
void WMNavSlice::notifyDataChange( boost::shared_ptr<WModuleConnector> input,
void WMNavSlices::notifyDataChange( boost::shared_ptr<WModuleConnector> input,
boost::shared_ptr<WModuleConnector> output )
{
WModule::notifyDataChange( input, output );
......@@ -121,7 +121,7 @@ void WMNavSlice::notifyDataChange( boost::shared_ptr<WModuleConnector> input,
// in this case input==m_input
}
void WMNavSlice::threadMain()
void WMNavSlices::threadMain()
{
createGeometry();
......@@ -135,7 +135,7 @@ void WMNavSlice::threadMain()
// clean up stuff
}
void WMNavSlice::createGeometry()
void WMNavSlices::createGeometry()
{
float axialPos = ( float )( m_properties->getValue< int >( "axialPos" ) ) + 0.5f;
float coronalPos = ( float )( m_properties->getValue< int >( "coronalPos" ) ) + 0.5f;
......@@ -236,10 +236,10 @@ void WMNavSlice::createGeometry()
rootState->setAttributeAndModes( m_shader->getProgramObject(), osg::StateAttribute::ON );
m_rootNode->setUpdateCallback( new sliceNodeCallback( boost::shared_dynamic_cast<WMNavSlice>( shared_from_this() ) ) );
m_rootNode->setUpdateCallback( new sliceNodeCallback( boost::shared_dynamic_cast<WMNavSlices>( shared_from_this() ) ) );
}
void WMNavSlice::updateGeometry()
void WMNavSlices::updateGeometry()
{
boost::shared_lock<boost::shared_mutex> slock;
slock = boost::shared_lock<boost::shared_mutex>( m_updateLock );
......@@ -375,7 +375,7 @@ void WMNavSlice::updateGeometry()
}
void WMNavSlice::updateTextures()
void WMNavSlices::updateTextures()
{
boost::shared_lock<boost::shared_mutex> slock;
slock = boost::shared_lock<boost::shared_mutex>( m_updateLock );
......@@ -422,13 +422,13 @@ void WMNavSlice::updateTextures()
}
void WMNavSlice::connectToGui()
void WMNavSlices::connectToGui()
{
WKernel::getRunningKernel()->getGui()->connectProperties( m_properties );
}
void WMNavSlice::initUniforms( osg::StateSet* rootState )
void WMNavSlices::initUniforms( osg::StateSet* rootState )
{
m_typeUniforms.push_back( osg::ref_ptr<osg::Uniform>( new osg::Uniform( "type0", 0 ) ) );
m_typeUniforms.push_back( osg::ref_ptr<osg::Uniform>( new osg::Uniform( "type1", 0 ) ) );
......
......@@ -22,8 +22,8 @@
//
//---------------------------------------------------------------------------
#ifndef WMNAVSLICE_H
#define WMNAVSLICE_H
#ifndef WMNAVSLICES_H
#define WMNAVSLICES_H
#include <list>
#include <string>
......@@ -43,7 +43,7 @@
*
* Simple module for testing some WKernel functionality.
*/
class WMNavSlice: public WModule, public osg::Referenced
class WMNavSlices: public WModule, public osg::Referenced
{
public:
......@@ -51,13 +51,13 @@ public:
* \par Description
* Default constructor.
*/
WMNavSlice();
WMNavSlices();
/**
* \par Description
* Destructor.
*/
virtual ~WMNavSlice();
virtual ~WMNavSlices();
/**
* \par Description
......@@ -168,7 +168,7 @@ private:
class sliceNodeCallback : public osg::NodeCallback
{
public:
explicit sliceNodeCallback( boost::shared_ptr< WMNavSlice > module )
explicit sliceNodeCallback( boost::shared_ptr< WMNavSlices > module )
{
m_module = module;
}
......@@ -183,8 +183,8 @@ public:
traverse( node, nv );
}
private:
boost::shared_ptr< WMNavSlice > m_module;
boost::shared_ptr< WMNavSlices > m_module;
};
#endif // WMNAVSLICE_H
#endif // WMNAVSLICES_H
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