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
2081ad51
Commit
2081ad51
authored
Oct 07, 2010
by
schurade
Browse files
Options
Browse Files
Download
Plain Diff
[MERGE] with af067365b90d687a0fc85d93bc734d35edeee81d
parents
29efacae
407d5387
Changes
88
Hide whitespace changes
Inline
Side-by-side
Showing
88 changed files
with
410 additions
and
151 deletions
+410
-151
doc/user/walnut.cfg.mpi
doc/user/walnut.cfg.mpi
+1
-1
src/CMakeLists.txt
src/CMakeLists.txt
+7
-0
src/common/CMakeLists.txt
src/common/CMakeLists.txt
+4
-0
src/common/WPathHelper.cpp
src/common/WPathHelper.cpp
+17
-1
src/common/WPathHelper.h
src/common/WPathHelper.h
+5
-5
src/dataHandler/CMakeLists.txt
src/dataHandler/CMakeLists.txt
+5
-0
src/ext/libeep/CMakeLists.txt
src/ext/libeep/CMakeLists.txt
+4
-0
src/ext/nifti/CMakeLists.txt
src/ext/nifti/CMakeLists.txt
+3
-0
src/graphicsEngine/CMakeLists.txt
src/graphicsEngine/CMakeLists.txt
+4
-0
src/graphicsEngine/WGEUtils.h
src/graphicsEngine/WGEUtils.h
+0
-11
src/graphicsEngine/WGraphicsEngine.h
src/graphicsEngine/WGraphicsEngine.h
+5
-5
src/gui/CMakeLists.txt
src/gui/CMakeLists.txt
+4
-0
src/gui/qt4/CMakeLists.txt
src/gui/qt4/CMakeLists.txt
+4
-0
src/gui/qt4/WQt4Gui.cpp
src/gui/qt4/WQt4Gui.cpp
+1
-1
src/kernel/CMakeLists.txt
src/kernel/CMakeLists.txt
+4
-0
src/kernel/WKernel.cpp
src/kernel/WKernel.cpp
+13
-3
src/kernel/WKernel.h
src/kernel/WKernel.h
+18
-2
src/kernel/WModuleFactory.h
src/kernel/WModuleFactory.h
+4
-5
src/kernel/WModuleLoader.cpp
src/kernel/WModuleLoader.cpp
+14
-14
src/kernel/modules/navSlices/WMNavSlices.cpp
src/kernel/modules/navSlices/WMNavSlices.cpp
+11
-11
src/modules/HARDIToSphericalHarmonics/CMakeLists.txt
src/modules/HARDIToSphericalHarmonics/CMakeLists.txt
+4
-0
src/modules/applyMask/CMakeLists.txt
src/modules/applyMask/CMakeLists.txt
+4
-0
src/modules/arbitraryPlane/CMakeLists.txt
src/modules/arbitraryPlane/CMakeLists.txt
+4
-0
src/modules/arbitraryPlane/WMArbitraryPlane.cpp
src/modules/arbitraryPlane/WMArbitraryPlane.cpp
+12
-12
src/modules/arbitraryRois/CMakeLists.txt
src/modules/arbitraryRois/CMakeLists.txt
+4
-0
src/modules/atlasSurfaces/CMakeLists.txt
src/modules/atlasSurfaces/CMakeLists.txt
+4
-0
src/modules/bermanTracking/CMakeLists.txt
src/modules/bermanTracking/CMakeLists.txt
+4
-0
src/modules/boundingBox/CMakeLists.txt
src/modules/boundingBox/CMakeLists.txt
+4
-0
src/modules/calculateGFA/CMakeLists.txt
src/modules/calculateGFA/CMakeLists.txt
+4
-0
src/modules/clusterDisplay/CMakeLists.txt
src/modules/clusterDisplay/CMakeLists.txt
+4
-0
src/modules/clusterParamDisplay/CMakeLists.txt
src/modules/clusterParamDisplay/CMakeLists.txt
+4
-0
src/modules/clusterSlicer/CMakeLists.txt
src/modules/clusterSlicer/CMakeLists.txt
+4
-0
src/modules/contourTree/CMakeLists.txt
src/modules/contourTree/CMakeLists.txt
+4
-0
src/modules/coordinateHUD/CMakeLists.txt
src/modules/coordinateHUD/CMakeLists.txt
+4
-0
src/modules/coordinateSystem/CMakeLists.txt
src/modules/coordinateSystem/CMakeLists.txt
+4
-0
src/modules/dataTypeConversion/CMakeLists.txt
src/modules/dataTypeConversion/CMakeLists.txt
+4
-0
src/modules/detTractClustering/CMakeLists.txt
src/modules/detTractClustering/CMakeLists.txt
+4
-0
src/modules/detTractCulling/CMakeLists.txt
src/modules/detTractCulling/CMakeLists.txt
+4
-0
src/modules/deterministicFTMori/CMakeLists.txt
src/modules/deterministicFTMori/CMakeLists.txt
+4
-0
src/modules/distanceMap/CMakeLists.txt
src/modules/distanceMap/CMakeLists.txt
+4
-0
src/modules/distanceMapIsosurface/CMakeLists.txt
src/modules/distanceMapIsosurface/CMakeLists.txt
+4
-0
src/modules/eegView/CMakeLists.txt
src/modules/eegView/CMakeLists.txt
+4
-0
src/modules/effectiveConnectivityCluster/CMakeLists.txt
src/modules/effectiveConnectivityCluster/CMakeLists.txt
+4
-0
src/modules/exportGeometry/CMakeLists.txt
src/modules/exportGeometry/CMakeLists.txt
+4
-0
src/modules/fiberDisplay/CMakeLists.txt
src/modules/fiberDisplay/CMakeLists.txt
+4
-0
src/modules/fiberDisplaySimple/CMakeLists.txt
src/modules/fiberDisplaySimple/CMakeLists.txt
+4
-0
src/modules/fiberParameterColoring/CMakeLists.txt
src/modules/fiberParameterColoring/CMakeLists.txt
+4
-0
src/modules/fiberResampling/CMakeLists.txt
src/modules/fiberResampling/CMakeLists.txt
+4
-0
src/modules/fiberSelection/CMakeLists.txt
src/modules/fiberSelection/CMakeLists.txt
+4
-0
src/modules/fiberTransform/CMakeLists.txt
src/modules/fiberTransform/CMakeLists.txt
+4
-0
src/modules/functionalMRIViewer/CMakeLists.txt
src/modules/functionalMRIViewer/CMakeLists.txt
+4
-0
src/modules/gaussFiltering/CMakeLists.txt
src/modules/gaussFiltering/CMakeLists.txt
+4
-0
src/modules/gaussProcesses/detTract2GPConvert/CMakeLists.txt
src/modules/gaussProcesses/detTract2GPConvert/CMakeLists.txt
+4
-0
src/modules/gridRenderer/CMakeLists.txt
src/modules/gridRenderer/CMakeLists.txt
+4
-0
src/modules/histogramEqualization/CMakeLists.txt
src/modules/histogramEqualization/CMakeLists.txt
+4
-0
src/modules/hud/CMakeLists.txt
src/modules/hud/CMakeLists.txt
+4
-0
src/modules/imageExtractor/CMakeLists.txt
src/modules/imageExtractor/CMakeLists.txt
+4
-0
src/modules/imageSpaceLIC/CMakeLists.txt
src/modules/imageSpaceLIC/CMakeLists.txt
+4
-0
src/modules/isosurfaceRaytracer/CMakeLists.txt
src/modules/isosurfaceRaytracer/CMakeLists.txt
+4
-0
src/modules/lic/CMakeLists.txt
src/modules/lic/CMakeLists.txt
+4
-0
src/modules/lineGuidedSlice/CMakeLists.txt
src/modules/lineGuidedSlice/CMakeLists.txt
+4
-0
src/modules/lineGuidedSlice/WMLineGuidedSlice.cpp
src/modules/lineGuidedSlice/WMLineGuidedSlice.cpp
+2
-7
src/modules/marchingCubes/CMakeLists.txt
src/modules/marchingCubes/CMakeLists.txt
+4
-0
src/modules/marchingCubes/WMMarchingCubes.cpp
src/modules/marchingCubes/WMMarchingCubes.cpp
+9
-8
src/modules/marchingCubes/WMMarchingCubes.h
src/modules/marchingCubes/WMMarchingCubes.h
+1
-38
src/modules/modules-io.toolbox
src/modules/modules-io.toolbox
+1
-1
src/modules/overlayAtlas/CMakeLists.txt
src/modules/overlayAtlas/CMakeLists.txt
+4
-0
src/modules/paintTexture/CMakeLists.txt
src/modules/paintTexture/CMakeLists.txt
+4
-0
src/modules/probTractDisplay/CMakeLists.txt
src/modules/probTractDisplay/CMakeLists.txt
+4
-0
src/modules/readMesh/CMakeLists.txt
src/modules/readMesh/CMakeLists.txt
+4
-0
src/modules/readMesh/WMReadMesh.cpp
src/modules/readMesh/WMReadMesh.cpp
+17
-18
src/modules/readMesh/WMReadMesh.h
src/modules/readMesh/WMReadMesh.h
+6
-6
src/modules/readMesh/WMReadMesh.xpm
src/modules/readMesh/WMReadMesh.xpm
+1
-1
src/modules/readMesh/readMesh.png
src/modules/readMesh/readMesh.png
+0
-0
src/modules/scalarSegmentation/CMakeLists.txt
src/modules/scalarSegmentation/CMakeLists.txt
+4
-0
src/modules/spatialDerivation/CMakeLists.txt
src/modules/spatialDerivation/CMakeLists.txt
+4
-0
src/modules/splineSurface/CMakeLists.txt
src/modules/splineSurface/CMakeLists.txt
+4
-0
src/modules/splineSurface/WMSplineSurface.cpp
src/modules/splineSurface/WMSplineSurface.cpp
+1
-1
src/modules/subtractDataSetScalar/CMakeLists.txt
src/modules/subtractDataSetScalar/CMakeLists.txt
+4
-0
src/modules/superquadricGlyphs/CMakeLists.txt
src/modules/superquadricGlyphs/CMakeLists.txt
+4
-0
src/modules/surfaceParameterAnimator/CMakeLists.txt
src/modules/surfaceParameterAnimator/CMakeLists.txt
+4
-0
src/modules/teemGlyphs/CMakeLists.txt
src/modules/teemGlyphs/CMakeLists.txt
+4
-0
src/modules/template/CMakeLists.txt
src/modules/template/CMakeLists.txt
+4
-0
src/modules/triangleMeshRenderer/CMakeLists.txt
src/modules/triangleMeshRenderer/CMakeLists.txt
+4
-0
src/modules/vectorPlot/CMakeLists.txt
src/modules/vectorPlot/CMakeLists.txt
+4
-0
src/modules/voxelizer/CMakeLists.txt
src/modules/voxelizer/CMakeLists.txt
+4
-0
src/modules/writeNIfTI/CMakeLists.txt
src/modules/writeNIfTI/CMakeLists.txt
+4
-0
src/modules/writeTracts/CMakeLists.txt
src/modules/writeTracts/CMakeLists.txt
+4
-0
No files found.
doc/user/walnut.cfg.mpi
View file @
2081ad51
...
...
@@ -12,7 +12,7 @@ allowOnlyOneFiberDataSet = yes # This will prevent you from accidently loading m
# default=HUD
## A list of modules that will be provided through the GUI.
## If the list is empty all available modules are provided.
whiteList = Arbitrary Plane,Coordinate System,Image Extractor,Paint Texture,Arbitrary Rois,Bounding Box,Distance Map Isosurface,Gauss Filtering,HUD,Isosurface,Isosurface Raytracer,LIC,
Mesh Reader
,Voxelizer,Superquadric Glyphs,Triangle Mesh Renderer,Vector Plot,Write NIfTI
whiteList = Arbitrary Plane,Coordinate System,Image Extractor,Paint Texture,Arbitrary Rois,Bounding Box,Distance Map Isosurface,Gauss Filtering,HUD,Isosurface,Isosurface Raytracer,LIC,
Read Mesh
,Voxelizer,Superquadric Glyphs,Triangle Mesh Renderer,Vector Plot,Write NIfTI
## Specify a ";" separated list of additional paths for modules. The order of appearance is the order of loading. The following additional rules apply here:
## 1. if the directory contains one or more libOWmodule_XYZ it/they get loaded
...
...
src/CMakeLists.txt
View file @
2081ad51
...
...
@@ -152,6 +152,8 @@ IF( CMAKE_GENERATOR MATCHES "Visual Studio" )
SET
(
CMAKE_SHARED_LINKER_FLAGS
" /STACK:10000000 /machine:I386 /NODEFAULTLIB:
${
EXCLUDE_LIBRARIES
}
"
CACHE STRING
""
FORCE
)
SET
(
CMAKE_EXE_LINKER_FLAGS
" /STACK:10000000 /machine:I386 /NODEFAULTLIB:
${
EXCLUDE_LIBRARIES
}
"
CACHE STRING
""
FORCE
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/D
\"
NOMINMAX
\"
"
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/MP"
)
SET
(
CMAKE_DEBUG_POSTFIX
"d"
CACHE STRING
"add a postfix, usually d on windows"
)
ELSE
()
# Unfortunately libstdc++'s header files don't work with mingw in ansi mode (basically libstdc++'s fault)
IF
(
CMAKE_HOST_SYSTEM MATCHES
"Windows"
)
...
...
@@ -208,6 +210,11 @@ ENDIF()
ADD_EXECUTABLE
(
walnut OpenWalnut.cpp version.h
)
TARGET_LINK_LIBRARIES
(
walnut OWkernel OWdataHandler OWgui OWguiqt4 OWcommon OWge
${
Boost_LIBRARIES
}
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
walnut PROPERTIES DEBUG_POSTFIX
"d"
)
SET_TARGET_PROPERTIES
(
walnut PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
#---------- Shaders -------------
option
(
OW_COPY_SHADERS
"This enables copying shaders with every make call."
ON
)
if
(
OW_COPY_SHADERS
)
...
...
src/common/CMakeLists.txt
View file @
2081ad51
...
...
@@ -10,6 +10,10 @@ ADD_SUBDIRECTORY( math )
ADD_LIBRARY
(
OWcommon SHARED
${
COMMON_SRC
}
${
COMMON_DATASTRUCTURES_SRC
}
${
COMMON_EXCEPTIONS_SRC
}
${
MATH_SRC
}
${
FIBERSIMILARITY_SRC
}
)
TARGET_LINK_LIBRARIES
(
OWcommon
${
Boost_LIBRARIES
}
${
CMAKE_DL_LIBS
}
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
OWcommon PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
# Set the prefix and suffix of dynamically loadable modules to match
# CMAKEs naming of them. The quotes are necessary so the shell doesn't mess
# with these defines. Unfortunately, the Visual Studio has problems handling
...
...
src/common/WPathHelper.cpp
View file @
2081ad51
...
...
@@ -24,6 +24,7 @@
#include <string>
#include <vector>
#include <cstdlib>
#include <boost/tokenizer.hpp>
...
...
@@ -70,7 +71,22 @@ boost::filesystem::path WPathHelper::getAppPath()
boost
::
filesystem
::
path
WPathHelper
::
getConfigFile
()
{
// TODO(ebaum): we should prefer a user config file in ~.walnut.cfg in future. This needs to be platform independent of course.
return
getPathHelper
()
->
m_sharePath
/
"walnut.cfg"
;
namespace
fs
=
boost
::
filesystem
;
// I know that this work only for linux, but it should not break anything elsewhere.
// Thus, we prefer the file in the home directory now.
std
::
string
homeDir
=
getenv
(
"HOME"
)
?
getenv
(
"HOME"
)
:
""
;
std
::
string
linuxDefault
=
homeDir
+
"/.walnut.cfg"
;
boost
::
filesystem
::
path
configFile
;
if
(
fs
::
exists
(
linuxDefault
)
)
{
configFile
=
boost
::
filesystem
::
path
(
linuxDefault
);
}
else
{
configFile
=
getPathHelper
()
->
m_sharePath
/
"walnut.cfg"
;
}
return
configFile
;
}
boost
::
filesystem
::
path
WPathHelper
::
getFontPath
()
...
...
src/common/WPathHelper.h
View file @
2081ad51
...
...
@@ -39,11 +39,6 @@ class OWCOMMON_EXPORT WPathHelper // NOLINT
{
public:
/**
* Default constructor.
*/
WPathHelper
();
/**
* Destructor.
*/
...
...
@@ -157,6 +152,11 @@ public:
protected:
/**
* Constructors are protected because this is a Singleton.
*/
WPathHelper
();
private:
/**
...
...
src/dataHandler/CMakeLists.txt
View file @
2081ad51
...
...
@@ -24,6 +24,11 @@ FILE( GLOB DATAHANDLER_IO_SRC "io/*.cpp" "io/*.h" ) # former WLoader
TARGET_LINK_LIBRARIES
(
OWdataHandler OWcommon
${
Boost_LIBRARIES
}
OWext_niftiio OWext_biosig OWext_eep
${
OPENSCENEGRAPH_LIBRARIES
}
)
ENDIF
()
#ENDIF()
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
OWdataHandler PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
# Unit tests
IF
(
OW_COMPILE_TESTS
)
# in case of not installed ITK the unit test won't compile, so we remove it
...
...
src/ext/libeep/CMakeLists.txt
View file @
2081ad51
...
...
@@ -16,3 +16,7 @@ IF( CMAKE_GENERATOR MATCHES "Visual Studio" )
ELSE
()
TARGET_LINK_LIBRARIES
(
OWext_eep m
)
ENDIF
()
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
OWext_eep PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
src/ext/nifti/CMakeLists.txt
View file @
2081ad51
...
...
@@ -42,6 +42,9 @@ SET(NIFTI_NIFTILIB_NAME ${PACKAGE_PREFIX}niftiio)
ADD_LIBRARY
(
${
NIFTI_NIFTILIB_NAME
}
${
NIFTILIB_SRC
}
)
TARGET_LINK_LIBRARIES
(
${
NIFTI_NIFTILIB_NAME
}
${
PACKAGE_PREFIX
}
znz
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
${
NIFTI_NIFTILIB_NAME
}
PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
IF
(
UNIX
)
TARGET_LINK_LIBRARIES
(
${
NIFTI_NIFTILIB_NAME
}
-lm
)
...
...
src/graphicsEngine/CMakeLists.txt
View file @
2081ad51
...
...
@@ -10,6 +10,10 @@ FILE( GLOB GE_SRC "*.cpp" "*.h" )
ADD_LIBRARY
(
OWge SHARED
${
GE_SRC
}
${
GE_EXCEPTIONS_SRC
}
${
GE_CALLBACKS_SRC
}
${
GE_ALGORITHMS_SRC
}
)
TARGET_LINK_LIBRARIES
(
OWge OWcommon
${
OPENGL_gl_LIBRARY
}
${
OPENSCENEGRAPH_LIBRARIES
}
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
OWge PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
# Unit tests
IF
(
OW_COMPILE_TESTS
)
CXXTEST_ADD_TESTS_FROM_LIST
(
"
${
GE_SRC
}
"
"OWge;OWkernel"
...
...
src/graphicsEngine/WGEUtils.h
View file @
2081ad51
...
...
@@ -88,12 +88,6 @@ namespace wge
*/
osg
::
Vec3
WGE_EXPORT
unprojectFromScreen
(
const
osg
::
Vec3
screen
,
osg
::
ref_ptr
<
osg
::
Camera
>
camera
);
/**
* Conversion of WVector3D to osg::Vec3
* \param v the vector to convert.
*/
osg
::
Vec3
wv3D2ov3
(
wmath
::
WVector3D
v
);
/**
* creates the same color as the atlas colormap shader from the index
*
...
...
@@ -180,11 +174,6 @@ inline osg::Vec3 wge::osgVec3( const wmath::WPosition& pos )
return
osg
::
Vec3
(
pos
[
0
],
pos
[
1
],
pos
[
2
]
);
}
inline
osg
::
Vec3
wge
::
wv3D2ov3
(
wmath
::
WVector3D
v
)
{
return
osg
::
Vec3
(
v
[
0
],
v
[
1
],
v
[
2
]
);
}
inline
osg
::
Matrixd
wge
::
toOSGMatrix
(
const
wmath
::
WMatrix
<
double
>&
matrix
)
{
WAssert
(
(
matrix
.
getNbRows
()
==
3
||
matrix
.
getNbRows
()
==
4
)
&&
(
matrix
.
getNbCols
()
==
3
||
matrix
.
getNbCols
()
==
4
),
...
...
src/graphicsEngine/WGraphicsEngine.h
View file @
2081ad51
...
...
@@ -62,11 +62,6 @@ class WGE_EXPORT WGraphicsEngine: public WThreadedRunner
{
public:
/**
* Default constructor.
*/
explicit
WGraphicsEngine
();
/**
* Destructor.
*/
...
...
@@ -142,6 +137,11 @@ public:
protected:
/**
* Constructors are protected because this is a Singleton.
*/
explicit
WGraphicsEngine
();
/**
* Handler for repainting and event handling. Gets executed in separate thread.
*/
...
...
src/gui/CMakeLists.txt
View file @
2081ad51
...
...
@@ -5,6 +5,10 @@ FILE( GLOB GUI_SRC "*.cpp" "*.h" )
ADD_LIBRARY
(
OWgui
${
GUI_SRC
}
)
TARGET_LINK_LIBRARIES
(
OWgui OWcommon
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
OWgui PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
# Unit tests
IF
(
OW_COMPILE_TESTS
)
CXXTEST_ADD_TESTS_FROM_LIST
(
"
${
GUI_SRC
}
"
...
...
src/gui/qt4/CMakeLists.txt
View file @
2081ad51
...
...
@@ -41,3 +41,7 @@ FILE(GLOB GUI_QT4_SRC "*.cpp" "guiElements/*.cpp" "controlPanel/*.cpp" "ribbonMe
ADD_LIBRARY
(
OWguiqt4
${
GUI_QT4_SRC
}
${
GUI_QT4_MOC_SRCS
}
)
TARGET_LINK_LIBRARIES
(
OWguiqt4 OWcommon OWgui OWge OWkernel
${
QT_LIBS
}
${
Boost_LIBRARIES
}
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
OWguiqt4 PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
src/gui/qt4/WQt4Gui.cpp
View file @
2081ad51
...
...
@@ -150,7 +150,7 @@ int WQt4Gui::run()
m_ge
=
WGraphicsEngine
::
getGraphicsEngine
();
// and startup kernel
m_kernel
=
boost
::
shared_ptr
<
WKernel
>
(
new
WKernel
(
m_ge
,
shared_from_this
()
)
);
m_kernel
=
boost
::
shared_ptr
<
WKernel
>
(
WKernel
::
instance
(
m_ge
,
shared_from_this
()
)
);
m_kernel
->
run
();
t_ModuleErrorSignalHandlerType
func
=
boost
::
bind
(
&
WQt4Gui
::
moduleError
,
this
,
_1
,
_2
);
m_kernel
->
getRootContainer
()
->
addDefaultNotifier
(
WM_ERROR
,
func
);
...
...
src/kernel/CMakeLists.txt
View file @
2081ad51
...
...
@@ -8,6 +8,10 @@ FILE( GLOB KERNEL_COMBINER_SRC "combiner/*.cpp" "combiner/*.h" )
ADD_LIBRARY
(
OWkernel SHARED
${
KERNEL_SRC
}
${
MODULES_SRC
}
${
KERNEL_EXCEPTIONS_SRC
}
${
KERNEL_COMBINER_SRC
}
)
TARGET_LINK_LIBRARIES
(
OWkernel OWcommon OWdataHandler OWge
${
OPENSCENEGRAPH_LIBRARIES
}
${
CMAKE_DL_LIBS
}
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
OWkernel PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
# Unit tests
IF
(
OW_COMPILE_TESTS
)
# SET( testLibs guiqt4 )
...
...
src/kernel/WKernel.cpp
View file @
2081ad51
...
...
@@ -50,7 +50,7 @@
/**
* Used for program wide access to the kernel.
*/
WKernel
*
kernel
=
NULL
;
WKernel
*
WKernel
::
m_
kernel
=
NULL
;
WKernel
::
WKernel
(
boost
::
shared_ptr
<
WGraphicsEngine
>
ge
,
boost
::
shared_ptr
<
WGUI
>
gui
)
:
WThreadedRunner
()
...
...
@@ -58,7 +58,7 @@ WKernel::WKernel( boost::shared_ptr< WGraphicsEngine > ge, boost::shared_ptr< WG
WLogger
::
getLogger
()
->
addLogMessage
(
"Initializing Kernel"
,
"Kernel"
,
LL_INFO
);
// init the singleton
kernel
=
this
;
m_
kernel
=
this
;
// initialize members
m_gui
=
gui
;
...
...
@@ -74,6 +74,16 @@ WKernel::~WKernel()
WLogger
::
getLogger
()
->
addLogMessage
(
"Shutting down Kernel"
,
"Kernel"
,
LL_INFO
);
}
WKernel
*
WKernel
::
instance
(
boost
::
shared_ptr
<
WGraphicsEngine
>
ge
,
boost
::
shared_ptr
<
WGUI
>
gui
)
{
if
(
m_kernel
==
NULL
)
{
new
WKernel
(
ge
,
gui
);
// m_kernel will be set in the constructor.
}
return
m_kernel
;
}
void
WKernel
::
init
()
{
// initialize
...
...
@@ -99,7 +109,7 @@ void WKernel::init()
WKernel
*
WKernel
::
getRunningKernel
()
{
return
kernel
;
return
m_
kernel
;
}
boost
::
shared_ptr
<
WGraphicsEngine
>
WKernel
::
getGraphicsEngine
()
const
...
...
src/kernel/WKernel.h
View file @
2081ad51
...
...
@@ -64,12 +64,15 @@ class OWKERNEL_EXPORT WKernel: public WThreadedRunner
public:
/**
* Constructor. Awaits an INITIALIZED graphics engine an gui.
* Returns pointer to the running kernel or a new if no kernel was there.
* If a running kernel exists the function return it and does not check if
* ge and gui of the running kernel are equivalent to the ones given as parameters.
*
* \param ge initialized graphics engine.
* \param gui initialized gui.
* \return the kernel instance.
*/
WKernel
(
boost
::
shared_ptr
<
WGraphicsEngine
>
ge
,
boost
::
shared_ptr
<
WGUI
>
gui
);
static
WKernel
*
instance
(
boost
::
shared_ptr
<
WGraphicsEngine
>
ge
,
boost
::
shared_ptr
<
WGUI
>
gui
);
/**
* Destructor.
...
...
@@ -155,6 +158,14 @@ public:
boost
::
shared_ptr
<
WSelectionManager
>
getSelectionManager
();
protected:
/**
* Constructor is protected because this class is a singleton. Awaits an INITIALIZED graphics engine an gui.
*
* \param ge initialized graphics engine.
* \param gui initialized gui.
*/
WKernel
(
boost
::
shared_ptr
<
WGraphicsEngine
>
ge
,
boost
::
shared_ptr
<
WGUI
>
gui
);
/**
* Function that has to be overwritten for execution. It gets executed in a separate thread after run()
...
...
@@ -202,6 +213,11 @@ private:
* Initializes the graphics engine, data handler and so on.
*/
void
init
();
/**
* Pointer to the unique instance of this singleton class.
*/
static
WKernel
*
m_kernel
;
};
#endif // WKERNEL_H
...
...
src/kernel/WModuleFactory.h
View file @
2081ad51
...
...
@@ -72,11 +72,6 @@ public:
*/
typedef
WSharedAssociativeContainer
<
PrototypeContainerType
>
PrototypeSharedContainerType
;
/**
* Default constructor.
*/
WModuleFactory
();
/**
* Destructor.
*/
...
...
@@ -182,6 +177,10 @@ public:
static
bool
isPrototype
(
boost
::
shared_ptr
<
WModule
>
module
);
protected:
/**
* Constructors are protected because this is a Singleton.
*/
WModuleFactory
();
/**
* The module prototypes available.
...
...
src/kernel/WModuleLoader.cpp
View file @
2081ad51
...
...
@@ -56,8 +56,21 @@ void WModuleLoader::load( WSharedAssociativeContainer< std::set< boost::shared_p
std
::
string
suffix
=
wiotools
::
getSuffix
(
i
->
leaf
()
);
std
::
string
stem
=
i
->
path
().
stem
();
#ifdef _MSC_VER
std
::
string
supposedFilename
=
getModulePrefix
()
+
'_'
+
i
->
path
().
parent_path
().
filename
()
#ifdef _DEBUG
+
'd'
#endif
+
WSharedLib
::
getSystemSuffix
();
std
::
string
isFileName
=
i
->
path
().
filename
();
#endif // _MSC_VER
if
(
!
boost
::
filesystem
::
is_directory
(
*
i
)
&&
(
suffix
==
WSharedLib
::
getSystemSuffix
()
)
&&
(
stem
.
compare
(
0
,
getModulePrefix
().
length
(),
getModulePrefix
()
)
==
0
)
)
(
stem
.
compare
(
0
,
getModulePrefix
().
length
(),
getModulePrefix
()
)
==
0
)
#ifdef _MSC_VER
&&
supposedFilename
==
isFileName
#endif
)
{
try
{
...
...
@@ -104,19 +117,6 @@ void WModuleLoader::load( WSharedAssociativeContainer< std::set< boost::shared_p
// if it a dir -> traverse down
load
(
ticket
,
*
i
,
level
+
1
);
}
// this little construct will enable vc to find the dll's in the correct build mode we are in
#ifdef _MSC_VER
else
if
(
(
level
==
1
)
&&
#ifdef _DEBUG
boost
::
filesystem
::
path
(
*
i
).
filename
()
==
"Debug"
#else // _DEBUG
boost
::
filesystem
::
path
(
*
i
).
filename
()
==
"Release"
#endif // _DEBUG
)
{
load
(
ticket
,
*
i
,
level
+
1
);
}
#endif // _MSC_VER
}
}
...
...
src/kernel/modules/navSlices/WMNavSlices.cpp
View file @
2081ad51
...
...
@@ -510,7 +510,7 @@ void WMNavSlices::setSlicePosFromPick( WPickInfo pickInfo )
osg
::
Vec3
endPosWorld
=
wge
::
unprojectFromScreen
(
endPosScreen
,
m_viewer
->
getCamera
()
);
osg
::
Vec3
moveDirWorld
=
endPosWorld
-
startPosWorld
;
float
diff
=
wge
::
wv3D2ov3
(
normal
)
*
moveDirWorld
;
float
diff
=
normal
*
moveDirWorld
;
// recognize also small values.
if
(
diff
<
0
&&
diff
>
-
1
)
...
...
@@ -628,7 +628,7 @@ osg::ref_ptr<osg::Geometry> WMNavSlices::createGeometry( int slice )
vertices
.
push_back
(
wmath
::
WPosition
(
xPos
,
m_bb
.
second
[
1
],
m_bb
.
first
[
2
]
)
);
for
(
size_t
i
=
0
;
i
<
nbVerts
;
++
i
)
{
sliceVertices
->
push_back
(
wge
::
wv3D2ov3
(
vertices
[
i
]
)
);
sliceVertices
->
push_back
(
vertices
[
i
]
);
}
sliceGeometry
->
setVertexArray
(
sliceVertices
);
...
...
@@ -641,7 +641,7 @@ osg::ref_ptr<osg::Geometry> WMNavSlices::createGeometry( int slice )
osg
::
Vec3Array
*
texCoords
=
new
osg
::
Vec3Array
;
for
(
size_t
i
=
0
;
i
<
nbVerts
;
++
i
)
{
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
vertices
[
i
]
)
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
vertices
[
i
]
)
);
}
sliceGeometry
->
setTexCoordArray
(
c
,
texCoords
);
++
c
;
...
...
@@ -655,7 +655,7 @@ osg::ref_ptr<osg::Geometry> WMNavSlices::createGeometry( int slice )
osg
::
Vec3Array
*
texCoords
=
new
osg
::
Vec3Array
;
for
(
size_t
i
=
0
;
i
<
nbVerts
;
++
i
)
{
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
vertices
[
i
]
)
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
vertices
[
i
]
)
);
}
sliceGeometry
->
setTexCoordArray
(
c
,
texCoords
);
++
c
;
...
...
@@ -672,7 +672,7 @@ osg::ref_ptr<osg::Geometry> WMNavSlices::createGeometry( int slice )
vertices
.
push_back
(
wmath
::
WPosition
(
m_bb
.
second
[
0
],
yPos
,
m_bb
.
first
[
2
]
)
);
for
(
size_t
i
=
0
;
i
<
nbVerts
;
++
i
)
{
sliceVertices
->
push_back
(
wge
::
wv3D2ov3
(
vertices
[
i
]
)
);
sliceVertices
->
push_back
(
vertices
[
i
]
);
}
sliceGeometry
->
setVertexArray
(
sliceVertices
);
...
...
@@ -684,7 +684,7 @@ osg::ref_ptr<osg::Geometry> WMNavSlices::createGeometry( int slice )
osg
::
Vec3Array
*
texCoords
=
new
osg
::
Vec3Array
;
for
(
size_t
i
=
0
;
i
<
nbVerts
;
++
i
)
{
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
vertices
[
i
]
)
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
vertices
[
i
]
)
);
}
sliceGeometry
->
setTexCoordArray
(
c
,
texCoords
);
++
c
;
...
...
@@ -698,7 +698,7 @@ osg::ref_ptr<osg::Geometry> WMNavSlices::createGeometry( int slice )
osg
::
Vec3Array
*
texCoords
=
new
osg
::
Vec3Array
;
for
(
size_t
i
=
0
;
i
<
nbVerts
;
++
i
)
{
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
vertices
[
i
]
)
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
vertices
[
i
]
)
);
}
sliceGeometry
->
setTexCoordArray
(
c
,
texCoords
);
++
c
;
...
...
@@ -714,7 +714,7 @@ osg::ref_ptr<osg::Geometry> WMNavSlices::createGeometry( int slice )
vertices
.
push_back
(
wmath
::
WPosition
(
m_bb
.
second
[
0
],
m_bb
.
first
[
1
],
zPos
)
);
for
(
size_t
i
=
0
;
i
<
nbVerts
;
++
i
)
{
sliceVertices
->
push_back
(
wge
::
wv3D2ov3
(
vertices
[
i
]
)
);
sliceVertices
->
push_back
(
vertices
[
i
]
);
}
sliceGeometry
->
setVertexArray
(
sliceVertices
);
...
...
@@ -727,7 +727,7 @@ osg::ref_ptr<osg::Geometry> WMNavSlices::createGeometry( int slice )
osg
::
Vec3Array
*
texCoords
=
new
osg
::
Vec3Array
;
for
(
size_t
i
=
0
;
i
<
nbVerts
;
++
i
)
{
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
vertices
[
i
]
)
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
vertices
[
i
]
)
);
}
sliceGeometry
->
setTexCoordArray
(
c
,
texCoords
);
++
c
;
...
...
@@ -742,7 +742,7 @@ osg::ref_ptr<osg::Geometry> WMNavSlices::createGeometry( int slice )
for
(
size_t
i
=
0
;
i
<
nbVerts
;
++
i
)
{
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
vertices
[
i
]
)
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
vertices
[
i
]
)
);
}
sliceGeometry
->
setTexCoordArray
(
c
,
texCoords
);
++
c
;
...
...
@@ -818,7 +818,7 @@ osg::ref_ptr<osg::Geometry> WMNavSlices::createCrossGeometry( int slice )
for
(
size_t
i
=
0
;
i
<
vertices
.
size
();
++
i
)
{
crossVertices
->
push_back
(
wge
::
wv3D2ov3
(
vertices
[
i
]
)
);
crossVertices
->
push_back
(
vertices
[
i
]
);
}
colorArray
->
push_back
(
osg
::
Vec3
(
1.0
f
,
0.0
f
,
0.0
f
)
);
...
...
src/modules/HARDIToSphericalHarmonics/CMakeLists.txt
View file @
2081ad51
...
...
@@ -12,6 +12,10 @@ SET( MODULE_NAME "OWmodule_${MODULE_NAME}" ) # prefix all module names w
ADD_LIBRARY
(
${
MODULE_NAME
}
SHARED
${
MODULES_SRC
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
OWkernel
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
${
MODULE_NAME
}
PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
# Copy local shaders to module target directory
IF
(
OW_COPY_SHADERS AND EXISTS
${
CMAKE_CURRENT_SOURCE_DIR
}
/shaders
)
# copy shaders only if the user wants it
ADD_CUSTOM_TARGET
(
${
MODULE_NAME
}
_CopyShaders
...
...
src/modules/applyMask/CMakeLists.txt
View file @
2081ad51
...
...
@@ -12,6 +12,10 @@ SET( MODULE_NAME "OWmodule_${MODULE_NAME}" ) # prefix all module names w
ADD_LIBRARY
(
${
MODULE_NAME
}
SHARED
${
MODULES_SRC
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
OWkernel
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
${
MODULE_NAME
}
PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
# Copy local shaders to module target directory
IF
(
OW_COPY_SHADERS AND EXISTS
${
CMAKE_CURRENT_SOURCE_DIR
}
/shaders
)
# copy shaders only if the user wants it
ADD_CUSTOM_TARGET
(
${
MODULE_NAME
}
_CopyShaders
...
...
src/modules/arbitraryPlane/CMakeLists.txt
View file @
2081ad51
...
...
@@ -12,6 +12,10 @@ SET( MODULE_NAME "OWmodule_${MODULE_NAME}" ) # prefix all module names w
ADD_LIBRARY
(
${
MODULE_NAME
}
SHARED
${
MODULES_SRC
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
OWkernel
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
${
MODULE_NAME
}
PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
# Copy local shaders to module target directory
IF
(
OW_COPY_SHADERS AND EXISTS
${
CMAKE_CURRENT_SOURCE_DIR
}
/shaders
)
# copy shaders only if the user wants it
ADD_CUSTOM_TARGET
(
${
MODULE_NAME
}
_CopyShaders
...
...
src/modules/arbitraryPlane/WMArbitraryPlane.cpp
View file @
2081ad51
...
...
@@ -275,10 +275,10 @@ void WMArbitraryPlane::updatePlane()
osg
::
ref_ptr
<
osg
::
Geometry
>
planeGeometry
=
osg
::
ref_ptr
<
osg
::
Geometry
>
(
new
osg
::
Geometry
()
);
osg
::
Vec3Array
*
planeVertices
=
new
osg
::
Vec3Array
;
planeVertices
->
push_back
(
wge
::
wv3D2ov3
(
v0
)
);
planeVertices
->
push_back
(
wge
::
wv3D2ov3
(
v1
)
);
planeVertices
->
push_back
(
wge
::
wv3D2ov3
(
v2
)
);
planeVertices
->
push_back
(
wge
::
wv3D2ov3
(
v3
)
);
planeVertices
->
push_back
(
v0
);
planeVertices
->
push_back
(
v1
);
planeVertices
->
push_back
(
v2
);
planeVertices
->
push_back
(
v3
);
planeGeometry
->
setVertexArray
(
planeVertices
);
osg
::
DrawElementsUInt
*
quad
=
new
osg
::
DrawElementsUInt
(
osg
::
PrimitiveSet
::
QUADS
,
0
);
...
...
@@ -298,10 +298,10 @@ void WMArbitraryPlane::updatePlane()
boost
::
shared_ptr
<
WGridRegular3D
>
grid
=
WKernel
::
getRunningKernel
()
->
getSelectionManager
()
->
getGrid
();
osg
::
Vec3Array
*
texCoords
=
new
osg
::
Vec3Array
;
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
v0
)
)
);
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
v1
)
)
);
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
v2
)
)
);
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
v3
)
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
v0
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
v1
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
v2
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
v3
)
);
planeGeometry
->
setTexCoordArray
(
c
,
texCoords
);
++
c
;
...
...
@@ -313,10 +313,10 @@ void WMArbitraryPlane::updatePlane()
osg
::
Vec3Array
*
texCoords
=
new
osg
::
Vec3Array
;
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
v0
)
)
);
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
v1
)
)
);
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
v2
)
)
);
texCoords
->
push_back
(
wge
::
wv3D2ov3
(
grid
->
worldCoordToTexCoord
(
v3
)
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
v0
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
v1
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
v2
)
);
texCoords
->
push_back
(
grid
->
worldCoordToTexCoord
(
v3
)
);
planeGeometry
->
setTexCoordArray
(
c
,
texCoords
);
++
c
;
...
...
src/modules/arbitraryRois/CMakeLists.txt
View file @
2081ad51
...
...
@@ -12,6 +12,10 @@ SET( MODULE_NAME "OWmodule_${MODULE_NAME}" ) # prefix all module names w
ADD_LIBRARY
(
${
MODULE_NAME
}
SHARED
${
MODULES_SRC
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
OWkernel
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
${
MODULE_NAME
}
PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
# Copy local shaders to module target directory
IF
(
OW_COPY_SHADERS AND EXISTS
${
CMAKE_CURRENT_SOURCE_DIR
}
/shaders
)
# copy shaders only if the user wants it
ADD_CUSTOM_TARGET
(
${
MODULE_NAME
}
_CopyShaders
...
...
src/modules/atlasSurfaces/CMakeLists.txt
View file @
2081ad51
...
...
@@ -12,6 +12,10 @@ SET( MODULE_NAME "OWmodule_${MODULE_NAME}" ) # prefix all module names w
ADD_LIBRARY
(
${
MODULE_NAME
}
SHARED
${
MODULES_SRC
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
OWkernel
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
${
MODULE_NAME
}
PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
# Copy local shaders to module target directory
IF
(
OW_COPY_SHADERS AND EXISTS
${
CMAKE_CURRENT_SOURCE_DIR
}
/shaders
)
# copy shaders only if the user wants it
ADD_CUSTOM_TARGET
(
${
MODULE_NAME
}
_CopyShaders
...
...
src/modules/bermanTracking/CMakeLists.txt
View file @
2081ad51
...
...
@@ -12,6 +12,10 @@ SET( MODULE_NAME "OWmodule_${MODULE_NAME}" ) # prefix all module names w
ADD_LIBRARY
(
${
MODULE_NAME
}
SHARED
${
MODULES_SRC
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
OWkernel
${
Teem_LIBRARIES
}
)
IF
(
MSVC_IDE
)
SET_TARGET_PROPERTIES
(
${
MODULE_NAME
}
PROPERTIES PREFIX
"../"
)
ENDIF
(
MSVC_IDE
)
# Copy local shaders to module target directory
IF
(
OW_COPY_SHADERS AND EXISTS
${
CMAKE_CURRENT_SOURCE_DIR
}
/shaders
)
# copy shaders only if the user wants it
ADD_CUSTOM_TARGET
(
${
MODULE_NAME
}
_CopyShaders
...
...
src/modules/boundingBox/CMakeLists.txt
View file @
2081ad51
...
...
@@ -12,6 +12,10 @@ SET( MODULE_NAME "OWmodule_${MODULE_NAME}" ) # prefix all module names w
ADD_LIBRARY
(
${
MODULE_NAME
}
SHARED
${
MODULES_SRC
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
OWkernel
)