Commit 6db48da5 authored by Mathias Goldau's avatar Mathias Goldau

[CHANGE] As discussed yesterday math library will merge into common but stay in seperate directory

parent 7482627a
......@@ -113,7 +113,6 @@ ENDIF()
SET( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -DDEBUG -O2" CACHE STRING "" FORCE )
ADD_SUBDIRECTORY( math )
ADD_SUBDIRECTORY( dataHandler )
ADD_SUBDIRECTORY( graphicsEngine )
ADD_SUBDIRECTORY( gui )
......
FILE( GLOB COMMON_SRC "*.cpp" "*.h" )
FILE( GLOB COMMON_DATASTRUCTURES_SRC "datastructures/*.cpp" "datastructures/*.h" )
FILE( GLOB COMMON_EXCEPTIONS_SRC "exceptions/*.cpp" "exceptions/*.h" )
FILE( GLOB MATH_SRC "math/*.cpp" "math/*.h" )
FILE( GLOB FIBERSIMILARITY_SRC "math/fiberSimilarity/*.cpp" "math/fiberSimilarity/*.h" )
ADD_SUBDIRECTORY( datastructures )
ADD_SUBDIRECTORY( constraints )
ADD_SUBDIRECTORY( math )
ADD_LIBRARY( common ${COMMON_SRC} ${COMMON_DATASTRUCTURES_SRC} ${COMMON_EXCEPTIONS_SRC} )
TARGET_LINK_LIBRARIES( common ${Boost_LIBRARIES} math )
ADD_LIBRARY( common ${COMMON_SRC} ${COMMON_DATASTRUCTURES_SRC} ${COMMON_EXCEPTIONS_SRC} ${MATH_SRC} ${FIBERSIMILARITY_SRC} )
TARGET_LINK_LIBRARIES( common ${Boost_LIBRARIES} )
# Unit tests
IF( OW_COMPILE_TESTS )
......
......@@ -33,7 +33,7 @@
#include <boost/filesystem.hpp>
#include "../math/WPosition.h"
#include "math/WPosition.h"
#include "WColor.h"
template < typename T >
......
......@@ -27,8 +27,8 @@
#include <vector>
#include "../../math/WPosition.h"
#include "../../math/WVector3D.h"
#include "../math/WPosition.h"
#include "../math/WVector3D.h"
/**
......
......@@ -30,7 +30,7 @@
#include <cxxtest/TestSuite.h>
#include "../WTriangleMesh.h"
#include "../../../math/WVector3D.h"
#include "../../math/WVector3D.h"
/**
......
......@@ -3,12 +3,10 @@ ADD_SUBDIRECTORY( fiberSimilarity )
FILE( GLOB MATH_SRC "*.cpp" "*.h" )
FILE( GLOB FIBERSIMILARITY_SRC "fiberSimilarity/*.cpp" "fiberSimilarity/*.h" )
ADD_LIBRARY( math ${MATH_SRC} ${FIBERSIMILARITY_SRC} )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MATH_SRC}"
"math;common"
"common"
"WMath.cpp" # this declares only a namespace
)
ENDIF( OW_COMPILE_TESTS )
......@@ -26,9 +26,9 @@
#include <iostream>
#include <vector>
#include "../common/WLimits.h"
#include "../common/WStringUtils.h"
#include "../common/exceptions/WOutOfBounds.h"
#include "../WLimits.h"
#include "../WStringUtils.h"
#include "../exceptions/WOutOfBounds.h"
#include "WLine.h"
#include "WPosition.h"
......
......@@ -29,7 +29,7 @@
#include <iostream>
#include <vector>
#include "../common/WMixinVector.h"
#include "../WMixinVector.h"
#include "WPosition.h"
// we need this to find the WLineTest class which is not inside wmath namespace
......
......@@ -29,7 +29,7 @@
#include <cmath>
#include <vector>
#include "../common/WStringUtils.h"
#include "../WStringUtils.h"
namespace wmath
{
......
......@@ -3,7 +3,7 @@ FILE( GLOB FIBERSIMILARITY_SRC "*.cpp" "*.h" )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${FIBERSIMILARITY_SRC}"
"math;common"
"common"
"WFiberSimilarity.cpp" # This is just an interface
)
ENDIF( OW_COMPILE_TESTS )
......@@ -27,7 +27,7 @@
#include <vector>
#include "WZhangMetric.h"
#include "../../common/WLimits.h"
#include "../../WLimits.h"
WZhangMetric::WZhangMetric( double thresholdSquare )
: m_thresholdSquare( thresholdSquare )
......
......@@ -30,7 +30,7 @@
#include <cxxtest/TestSuite.h>
#include <cxxtest/ValueTraits.h>
#include "../../common/test/WTraitsBase.h"
#include "../../test/WTraitsBase.h"
#include "../WFiber.h"
#ifdef CXXTEST_RUNNING
......
......@@ -30,7 +30,7 @@
#include <cxxtest/TestSuite.h>
#include <cxxtest/ValueTraits.h>
#include "../../common/test/WTraitsBase.h"
#include "../../test/WTraitsBase.h"
#include "../WLine.h"
#ifdef CXXTEST_RUNNING
......
......@@ -30,8 +30,8 @@
#include <cxxtest/TestSuite.h>
#include "../../common/WLimits.h"
#include "../../common/exceptions/WOutOfBounds.h"
#include "../../WLimits.h"
#include "../../exceptions/WOutOfBounds.h"
#include "../WLine.h"
#include "WLineTraits.h"
#include "WPositionTraits.h"
......
......@@ -30,7 +30,7 @@
#include <cxxtest/TestSuite.h>
#include <cxxtest/ValueTraits.h>
#include "../../common/test/WTraitsBase.h"
#include "../../test/WTraitsBase.h"
#include "../WPosition.h"
#ifdef CXXTEST_RUNNING
......
......@@ -30,7 +30,7 @@
#include <cxxtest/TestSuite.h>
#include <cxxtest/ValueTraits.h>
#include "../../common/test/WTraitsBase.h"
#include "../../test/WTraitsBase.h"
#include "../WVector3D.h"
#ifdef CXXTEST_RUNNING
......
......@@ -13,10 +13,10 @@ IF( CMAKE_GENERATOR MATCHES "Visual Studio" )
FILE( GLOB EXCLUDE_biosig "io/*Biosig.cpp" "io/*Biosig.h" )
LIST( REMOVE_ITEM DATAHANDLER_IO_SRC ${EXCLUDE_biosig} )
ADD_LIBRARY( dataHandler ${DATAHANDLER_SRC} ${DATAHANDLER_EXCEPTIONS_SRC} ${DATAHANDLER_IO_SRC} ${DATAHANDLER_DATASTRUCTURES_SRC} )
TARGET_LINK_LIBRARIES( dataHandler common math ${Boost_LIBRARIES} niftiio libeep ${OPENSCENEGRAPH_LIBRARIES})
TARGET_LINK_LIBRARIES( dataHandler common ${Boost_LIBRARIES} niftiio libeep ${OPENSCENEGRAPH_LIBRARIES})
ELSE()
ADD_LIBRARY( dataHandler ${DATAHANDLER_SRC} ${DATAHANDLER_EXCEPTIONS_SRC} ${DATAHANDLER_IO_SRC} ${DATAHANDLER_DATASTRUCTURES_SRC} )
TARGET_LINK_LIBRARIES( dataHandler common math ${Boost_LIBRARIES} niftiio biosig libeep ${OPENSCENEGRAPH_LIBRARIES})
TARGET_LINK_LIBRARIES( dataHandler common ${Boost_LIBRARIES} niftiio biosig libeep ${OPENSCENEGRAPH_LIBRARIES})
ENDIF()
# Unit tests
IF( OW_COMPILE_TESTS )
......
......@@ -27,7 +27,7 @@
#include <vector>
#include "../common/WLogger.h"
#include "../math/WFiber.h"
#include "../common/math/WFiber.h"
#include "WDataSet.h"
#include "WDataSetFiberVector.h"
......
......@@ -30,7 +30,7 @@
#include <boost/shared_ptr.hpp>
#include "../math/WFiber.h"
#include "../common/math/WFiber.h"
#include "WDataSet.h"
#include "WDataSetFibers.h"
......
......@@ -30,7 +30,7 @@
#include <boost/shared_ptr.hpp>
#include "../math/WPosition.h"
#include "../common/math/WPosition.h"
#include "WDataSet.h"
......
......@@ -30,7 +30,7 @@
#include <vector>
#include "WRecording.h"
#include "../common/WPrototyped.h"
#include "../math/WPosition.h"
#include "../common/math/WPosition.h"
///======================================
......
......@@ -28,7 +28,7 @@
#include <cstddef>
#include <utility>
#include "../math/WPosition.h"
#include "../common/math/WPosition.h"
/**
* Base class to all grid types, e.g. a regular grid.
......
......@@ -26,7 +26,7 @@
#include <vector>
#include "../common/exceptions/WOutOfBounds.h"
#include "../math/WLinearAlgebraFunctions.h"
#include "../common/math/WLinearAlgebraFunctions.h"
#include "WGridRegular3D.h"
using wmath::WVector3D;
......
......@@ -32,9 +32,9 @@
#include <osg/Vec3>
#include "../math/WMatrix.h"
#include "../math/WPosition.h"
#include "../math/WVector3D.h"
#include "../common/math/WMatrix.h"
#include "../common/math/WPosition.h"
#include "../common/math/WVector3D.h"
#include "WGrid.h"
/**
......
......@@ -31,7 +31,7 @@
#include "WValueSetBase.h"
#include "WDataHandlerEnums.h"
#include "../math/WValue.h"
#include "../common/math/WValue.h"
/**
* Base Class for all value set types.
......
......@@ -30,7 +30,7 @@
#include <boost/shared_ptr.hpp>
#include "../WLoader.h"
#include "../../math/WMatrix.h"
#include "../../common/math/WMatrix.h"
#include "nifti/nifti1_io.h"
......
......@@ -35,7 +35,7 @@
#include <cxxtest/TestSuite.h>
#include "../../../common/test/WStreamPosTraits.h"
#include "../../../math/test/WFiberTraits.h"
#include "../../../common/math/test/WFiberTraits.h"
#include "../WLoaderFibers.h"
/**
......
......@@ -31,7 +31,7 @@
#include <cxxtest/TestSuite.h>
#include "../WDataSetFiberVector.h"
#include "../../math/WPosition.h"
#include "../../common/math/WPosition.h"
/**
* Unit tests our fiber dataset class
......
......@@ -35,7 +35,7 @@
#include <cxxtest/TestSuite.h>
#include "../../common/exceptions/WOutOfBounds.h"
#include "../../math/test/WVector3DTraits.h"
#include "../../common/math/test/WVector3DTraits.h"
#include "../WGridRegular3D.h"
using wmath::WVector3D;
......
......@@ -9,7 +9,7 @@ TARGET_LINK_LIBRARIES( ge common ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${OP
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${GE_SRC}" "ge;math"
CXXTEST_ADD_TESTS_FROM_LIST( "${GE_SRC}" "ge"
"WGESignals.cpp"
"WGraphicsEngine.cpp"
"WGEScene.cpp"
......
......@@ -32,7 +32,7 @@
#include "WGEGeodeUtils.h"
#include "WGEUtils.h"
#include "../math/WPosition.h"
#include "../common/math/WPosition.h"
osg::ref_ptr< osg::Geode > wge::generateBoundingBoxGeode( const wmath::WPosition& pos1, const wmath::WPosition& pos2, const WColor& color )
......
......@@ -29,8 +29,8 @@
#include "../common/datastructures/WTriangleMesh.h"
#include "../common/WColor.h"
#include "../math/WPosition.h"
#include "../math/WLine.h"
#include "../common/math/WPosition.h"
#include "../common/math/WLine.h"
namespace wge
......
......@@ -31,7 +31,7 @@
#include "exceptions/WGEException.h"
#include "WGEGeometryUtils.h"
#include "WGEUtils.h"
#include "../math/WPosition.h"
#include "../common/math/WPosition.h"
osg::ref_ptr< osg::Vec3Array > wge::generateCuboidQuads( const std::vector< wmath::WPosition >& corners )
......
......@@ -30,7 +30,7 @@
#include <osg/Array>
#include "../common/datastructures/WTriangleMesh.h"
#include "../math/WPosition.h"
#include "../common/math/WPosition.h"
namespace wge
......
......@@ -28,7 +28,7 @@
#include <GL/glu.h>
#include "../math/WPosition.h"
#include "../common/math/WPosition.h"
#include "WGEUtils.h"
osg::ref_ptr< osg::Vec3Array > wge::osgVec3Array( const std::vector< wmath::WPosition >& posArray )
......
......@@ -33,7 +33,7 @@
#include <osg/Camera>
#include "../common/WColor.h"
#include "../math/WPosition.h"
#include "../common/math/WPosition.h"
namespace wge
{
......
......@@ -40,7 +40,7 @@
#include "../common/WColor.h"
#include "../common/WLogger.h"
#include "../common/WPreferences.h"
#include "../math/WPosition.h"
#include "../common/math/WPosition.h"
#include "WGEViewer.h"
#include "WGraphicsEngine.h"
#include "exceptions/WGEInitFailed.h"
......
......@@ -46,7 +46,7 @@
#include "../common/WThreadedRunner.h"
#include "../common/WColor.h"
#include "../math/WPosition.h"
#include "../common/math/WPosition.h"
#include "WGEGraphicsWindow.h"
#include "WGEScene.h"
#include "WGEViewer.h"
......
......@@ -46,7 +46,7 @@
#include <osg/ShapeDrawable>
#include <osgText/Text>
#include "../math/WPosition.h"
#include "../common/math/WPosition.h"
#include "WPickInfo.h"
/**
......
......@@ -28,8 +28,8 @@
#include <string>
#include <utility>
#include "../math/WPosition.h"
#include "../math/WVector3D.h"
#include "../common/math/WPosition.h"
#include "../common/math/WVector3D.h"
/**
* Encapsulates info for pick action.
......
......@@ -30,7 +30,7 @@
#include <boost/thread.hpp>
#include "../math/WPosition.h"
#include "../common/math/WPosition.h"
#include "WPickHandler.h"
#include "WGEViewer.h"
......
......@@ -6,7 +6,7 @@ ADD_SUBDIRECTORY( exceptions )
FILE( GLOB KERNEL_EXCEPTIONS_SRC "exceptions/*.cpp" "exceptions/*.h" )
ADD_LIBRARY( kernel ${KERNEL_SRC} ${MODULES_SRC} ${KERNEL_EXCEPTIONS_SRC} )
TARGET_LINK_LIBRARIES( kernel common dataHandler ge math ${OPENSCENEGRAPH_LIBRARIES} )
TARGET_LINK_LIBRARIES( kernel common dataHandler ge ${OPENSCENEGRAPH_LIBRARIES} )
# Unit tests
......
......@@ -36,7 +36,7 @@
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleInputData.h"
#include "../../math/WVector3D.h"
#include "../../common/math/WVector3D.h"
class WPickHandler;
......
......@@ -34,8 +34,8 @@
#include "../../dataHandler/WGridRegular3D.h"
#include "../../graphicsEngine/WGEGeodeUtils.h"
#include "../../kernel/WKernel.h"
#include "../../math/WPosition.h"
#include "../../math/WVector3D.h"
#include "../../common/math/WPosition.h"
#include "../../common/math/WVector3D.h"
#include "../data/WMData.h"
#include "WMBoundingBox.h"
#include "boundingbox.xpm"
......
......@@ -36,7 +36,7 @@
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleInputData.h"
#include "../../math/WVector3D.h"
#include "../../common/math/WVector3D.h"
class WPickHandler;
......
......@@ -41,7 +41,7 @@
#include "../../common/WProgress.h"
#include "../../common/WPreferences.h"
#include "../../math/WVector3D.h"
#include "../../common/math/WVector3D.h"
#include "../../dataHandler/WSubject.h"
#include "../../dataHandler/WGridRegular3D.h"
#include "../../dataHandler/WDataTexture3D.h"
......
......@@ -25,8 +25,8 @@
#ifndef WCOORDCONVERTER_H
#define WCOORDCONVERTER_H
#include "../../math/WVector3D.h"
#include "../../math/WMatrix.h"
#include "../../common/math/WVector3D.h"
#include "../../common/math/WMatrix.h"
using wmath::WMatrix;
using wmath::WVector3D;
......
......@@ -25,7 +25,7 @@
#include <cassert>
#include "WTalairachConverter.h"
#include "../../math/WLinearAlgebraFunctions.h"
#include "../../common/math/WLinearAlgebraFunctions.h"
WTalairachConverter::WTalairachConverter( wmath::WVector3D ac, wmath::WVector3D pc, wmath::WVector3D ihp ) :
m_rotMat( 3, 3 ),
......
......@@ -25,8 +25,8 @@
#ifndef WTALAIRACHCONVERTER_H
#define WTALAIRACHCONVERTER_H
#include "../../math/WVector3D.h"
#include "../../math/WMatrix.h"
#include "../../common/math/WVector3D.h"
#include "../../common/math/WMatrix.h"
/**
* class to provide conversions between world or voxel space coordinates und talairach coordinates
......
......@@ -35,8 +35,8 @@
#include "../../common/WProgress.h"
#include "../../dataHandler/WGridRegular3D.h"
#include "../../kernel/WKernel.h"
#include "../../math/WPosition.h"
#include "../../math/WVector3D.h"
#include "../../common/math/WPosition.h"
#include "../../common/math/WVector3D.h"
#include "../data/WMData.h"
#include "WMDataTypeConversion.h"
#include "datatypeconversion.xpm"
......
......@@ -36,7 +36,7 @@
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleInputData.h"
#include "../../math/WVector3D.h"
#include "../../common/math/WVector3D.h"
/**
* Provides a new field with the approximately the same data, but with another data type. E.g., it
......
......@@ -46,8 +46,8 @@
#include "../../dataHandler/io/WWriterLookUpTableVTK.h"
#include "../../graphicsEngine/WGEUtils.h"
#include "../../kernel/WKernel.h"
#include "../../math/WFiber.h"
#include "../../math/fiberSimilarity/WDLTMetric.h"
#include "../../common/math/WFiber.h"
#include "../../common/math/fiberSimilarity/WDLTMetric.h"
#include "WMFiberClustering.h"
WMFiberClustering::WMFiberClustering()
......
......@@ -38,7 +38,7 @@
#include "../../graphicsEngine/WGEGroupNode.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleInputData.h"
#include "../../math/WFiber.h"
#include "../../common/math/WFiber.h"
/**
* Test module for Clustering fibers
......
......@@ -36,8 +36,8 @@
#include "../../dataHandler/WSubject.h"
#include "../../dataHandler/io/WWriterFiberVTK.h"
#include "../../kernel/WKernel.h"
#include "../../math/WFiber.h"
#include "../../math/fiberSimilarity/WDSTMetric.h"
#include "../../common/math/WFiber.h"
#include "../../common/math/fiberSimilarity/WDSTMetric.h"
#include "WMFiberCulling.h"
WMFiberCulling::WMFiberCulling()
......
......@@ -33,7 +33,7 @@
#include "../../dataHandler/WDataSetFiberVector.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleInputData.h"
#include "../../math/WFiber.h"
#include "../../common/math/WFiber.h"
/**