Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
addd16ed
Commit
addd16ed
authored
Nov 05, 2009
by
Mathias Goldau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX
#164
] Renaming for the new "WM" module naming convention
parent
b9a2fa11
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
54 additions
and
52 deletions
+54
-52
src/CMakeLists.txt
src/CMakeLists.txt
+2
-2
src/kernel/CMakeLists.txt
src/kernel/CMakeLists.txt
+1
-1
src/kernel/WKernel.cpp
src/kernel/WKernel.cpp
+7
-5
src/modules/coordinateSystem/WMCoordinateSystem.cpp
src/modules/coordinateSystem/WMCoordinateSystem.cpp
+12
-12
src/modules/coordinateSystem/WMCoordinateSystem.h
src/modules/coordinateSystem/WMCoordinateSystem.h
+9
-9
src/modules/navSlices/WMNavSlices.cpp
src/modules/navSlices/WMNavSlices.cpp
+15
-15
src/modules/navSlices/WMNavSlices.h
src/modules/navSlices/WMNavSlices.h
+8
-8
src/modules/navSlices/slice.fs
src/modules/navSlices/slice.fs
+0
-0
src/modules/navSlices/slice.vs
src/modules/navSlices/slice.vs
+0
-0
No files found.
src/CMakeLists.txt
View file @
addd16ed
...
...
@@ -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/nav
igation
Slices/slice.vs
${
CMAKE_BINARY_DIR
}
/bin/shaders/
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
CMAKE_SOURCE_DIR
}
/modules/nav
igation
Slices/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:
...
...
src/kernel/CMakeLists.txt
View file @
addd16ed
...
...
@@ -22,7 +22,7 @@ IF( CXXTEST_FOUND )
"WModuleOutputData.hpp"
"WModuleInputData.cpp"
"WModuleOutputData.cpp"
"../modules/nav
igationSlices/WMNavSlice
.cpp"
"../modules/nav
Slices/WMNavSlices
.cpp"
"../modules/eegTest/WMEEGTest.cpp"
)
ENDIF
(
CXXTEST_FOUND
)
src/kernel/WKernel.cpp
View file @
addd16ed
...
...
@@ -35,8 +35,8 @@
#include "WModule.h"
#include "../modules/data/WMData.hpp"
#include "../modules/nav
igationSlices/WMNavSlice
.h"
#include "../modules/coordinateSystem/WCoordinateSystem.h"
#include "../modules/nav
Slices/WMNavSlices
.h"
#include "../modules/coordinateSystem/W
M
CoordinateSystem.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
W
M
CoordinateSystem
()
);
WLogger
::
getLogger
()
->
addLogMessage
(
"Loading module: "
+
m2
->
getName
(),
"Kernel"
,
LL_DEBUG
);
m_modules
.
push_back
(
m2
);
}
...
...
src/modules/coordinateSystem/WCoordinateSystem.cpp
→
src/modules/coordinateSystem/W
M
CoordinateSystem.cpp
View file @
addd16ed
...
...
@@ -29,19 +29,19 @@
#include <osg/Geometry>
#include "../../kernel/WKernel.h"
#include "WCoordinateSystem.h"
#include "W
M
CoordinateSystem.h"
W
CoordinateSystem
::
W
CoordinateSystem
()
:
W
MCoordinateSystem
::
WM
CoordinateSystem
()
:
WModule
()
{
properties
();
}
W
CoordinateSystem
::~
W
CoordinateSystem
()
W
MCoordinateSystem
::~
WM
CoordinateSystem
()
{
}
void
WCoordinateSystem
::
threadMain
()
void
W
M
CoordinateSystem
::
threadMain
()
{
createGeometry
();
...
...
@@ -55,22 +55,22 @@ void WCoordinateSystem::threadMain()
// clean up stuff
}
const
std
::
string
WCoordinateSystem
::
getName
()
const
const
std
::
string
W
M
CoordinateSystem
::
getName
()
const
{
return
"Coordinate System Module"
;
}
const
std
::
string
WCoordinateSystem
::
getDescription
()
const
const
std
::
string
W
M
CoordinateSystem
::
getDescription
()
const
{
return
"This module displays coordinate systems as overlay withn the main 3D view."
;
}
void
WCoordinateSystem
::
connectToGui
()
void
W
M
CoordinateSystem
::
connectToGui
()
{
WKernel
::
getRunningKernel
()
->
getGui
()
->
connectProperties
(
m_properties
);
}
void
WCoordinateSystem
::
properties
()
void
W
M
CoordinateSystem
::
properties
()
{
m_properties
->
addBool
(
"textureChanged"
,
false
);
...
...
@@ -90,7 +90,7 @@ void WCoordinateSystem::properties()
m_properties
->
addFloat
(
"brbZ"
,
160.0
);
}
void
WCoordinateSystem
::
createGeometry
()
void
W
M
CoordinateSystem
::
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
<
W
M
CoordinateSystem
>
(
shared_from_this
()
)
)
);
}
void
WCoordinateSystem
::
updateGeometry
()
void
W
M
CoordinateSystem
::
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
<
W
DataModule
<
int
>
>
module
=
boost
::
shared_dynamic_cast
<
WDataModule
<
int
>
>
(
datasetList
[
0
]
);
boost
::
shared_ptr
<
W
MData
<
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
)
...
...
src/modules/coordinateSystem/WCoordinateSystem.h
→
src/modules/coordinateSystem/W
M
CoordinateSystem.h
View file @
addd16ed
...
...
@@ -22,15 +22,15 @@
//
//---------------------------------------------------------------------------
#ifndef WCOORDINATESYSTEM_H
#define WCOORDINATESYSTEM_H
#ifndef W
M
COORDINATESYSTEM_H
#define W
M
COORDINATESYSTEM_H
#include <string>
#include <osg/Geode>
#include "../../dataHandler/WDataSet.h"
#include "../data/W
DataModule
.hpp"
#include "../data/W
MData
.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
W
M
CoordinateSystem
:
public
WModule
,
public
osg
::
Referenced
{
public:
/**
* standard constructor
*/
WCoordinateSystem
();
W
M
CoordinateSystem
();
/**
* destructor
*/
virtual
~
WCoordinateSystem
();
virtual
~
W
M
CoordinateSystem
();
/**
* 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
<
W
M
CoordinateSystem
>
module
)
{
m_module
=
module
;
}
...
...
@@ -128,10 +128,10 @@ public:
traverse
(
node
,
nv
);
}
private:
boost
::
shared_ptr
<
WCoordinateSystem
>
m_module
;
boost
::
shared_ptr
<
W
M
CoordinateSystem
>
m_module
;
};
#endif // WCOORDINATESYSTEM_H
#endif // W
M
COORDINATESYSTEM_H
src/modules/nav
igationSlices/WMNavSlice
.cpp
→
src/modules/nav
Slices/WMNavSlices
.cpp
View file @
addd16ed
...
...
@@ -35,7 +35,7 @@
#include "boost/smart_ptr.hpp"
#include "WMNavSlice.h"
#include "WMNavSlice
s
.h"
#include "../../kernel/WKernel.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleConnector.h"
...
...
@@ -50,7 +50,7 @@
#include "../../graphicsEngine/WShader.h"
WMNavSlice
::
WMNavSlice
()
:
WMNavSlice
s
::
WMNavSlices
()
:
WModule
()
{
// WARNING: initializing connectors inside the constructor will lead to an exception.
...
...
@@ -63,23 +63,23 @@ WMNavSlice::WMNavSlice():
properties
();
}
WMNavSlice
::~
WMNavSlice
()
WMNavSlice
s
::~
WMNavSlices
()
{
// cleanup
removeConnectors
();
}
const
std
::
string
WMNavSlice
::
getName
()
const
const
std
::
string
WMNavSlice
s
::
getName
()
const
{
return
"Navigation Slice Module"
;
}
const
std
::
string
WMNavSlice
::
getDescription
()
const
const
std
::
string
WMNavSlice
s
::
getDescription
()
const
{
return
"This module shows 3 orthogonal navigation slices."
;
}
void
WMNavSlice
::
connectors
()
void
WMNavSlice
s
::
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
WMNavSlice
s
::
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
WMNavSlice
s
::
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
WMNavSlice
s
::
threadMain
()
{
createGeometry
();
...
...
@@ -135,7 +135,7 @@ void WMNavSlice::threadMain()
// clean up stuff
}
void
WMNavSlice
::
createGeometry
()
void
WMNavSlice
s
::
createGeometry
()
{
float
axialPos
=
(
float
)(
m_properties
->
getValue
<
int
>
(
"axialPos"
)
)
+
0.5
f
;
float
coronalPos
=
(
float
)(
m_properties
->
getValue
<
int
>
(
"coronalPos"
)
)
+
0.5
f
;
...
...
@@ -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
<
WMNavSlice
s
>
(
shared_from_this
()
)
)
);
}
void
WMNavSlice
::
updateGeometry
()
void
WMNavSlice
s
::
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
WMNavSlice
s
::
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
WMNavSlice
s
::
connectToGui
()
{
WKernel
::
getRunningKernel
()
->
getGui
()
->
connectProperties
(
m_properties
);
}
void
WMNavSlice
::
initUniforms
(
osg
::
StateSet
*
rootState
)
void
WMNavSlice
s
::
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
)
)
);
...
...
src/modules/nav
igationSlices/WMNavSlice
.h
→
src/modules/nav
Slices/WMNavSlices
.h
View file @
addd16ed
...
...
@@ -22,8 +22,8 @@
//
//---------------------------------------------------------------------------
#ifndef WMNAVSLICE_H
#define WMNAVSLICE_H
#ifndef WMNAVSLICE
S
_H
#define WMNAVSLICE
S
_H
#include <list>
#include <string>
...
...
@@ -43,7 +43,7 @@
*
* Simple module for testing some WKernel functionality.
*/
class
WMNavSlice
:
public
WModule
,
public
osg
::
Referenced
class
WMNavSlice
s
:
public
WModule
,
public
osg
::
Referenced
{
public:
...
...
@@ -51,13 +51,13 @@ public:
* \par Description
* Default constructor.
*/
WMNavSlice
();
WMNavSlice
s
();
/**
* \par Description
* Destructor.
*/
virtual
~
WMNavSlice
();
virtual
~
WMNavSlice
s
();
/**
* \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
<
WMNavSlice
s
>
module
)
{
m_module
=
module
;
}
...
...
@@ -183,8 +183,8 @@ public:
traverse
(
node
,
nv
);
}
private:
boost
::
shared_ptr
<
WMNavSlice
>
m_module
;
boost
::
shared_ptr
<
WMNavSlice
s
>
m_module
;
};
#endif // WMNAVSLICE_H
#endif // WMNAVSLICE
S
_H
src/modules/nav
igation
Slices/slice.fs
→
src/modules/navSlices/slice.fs
View file @
addd16ed
File moved
src/modules/nav
igation
Slices/slice.vs
→
src/modules/navSlices/slice.vs
View file @
addd16ed
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment