Commit 9f970e5a by Robert Frohl

[MERGE] rev4170

parents 5ac1f205 c465e29c
[usersubs]
wiebel@informatik.uni-leipzig.de = *
math@informatik.uni-leipzig.de = *
ebaum@informatik.uni-leipzig.de = *
reichenbach@informatik.uni-leipzig.de = *
philips@zimbra.cbs.mpg.de = *
\ No newline at end of file
all-openwalnut-commits@lists.informatik.uni-leipzig.de = *
\ No newline at end of file
wiebel Alexander_Wiebel
wiebel@hegel.informatik.uni-leipzig.de Alexander_Wiebel
openwalnut@dergrosse.de Alexander_Wiebel
wiebel@openwalnut.org Alexander_Wiebel
wiebel_openwalnut@dergrosse.de Alexander_Wiebel
wiebel@bsv_2008a Alexander_Wiebel
math Mathias_Goldau
lmath@voltaire.informatik.uni-leipzig.de Mathias_Goldau
math@informatik.uni-leipzig.de Mathias_Goldau
schurade@spinat.cbs.mpg.de Ralph_Schurade
schurade Ralph_Schurade
ebaum Sebastian_Eichelbaum
eichelbaum@informatik.uni-leipzig.de Sebastian_Eichelbaum
......@@ -15,4 +17,12 @@ hlawitschka@ucdavis.edu Mario_Hlawitschka
mai02igw@informatik.uni-leipzig.de Robin_Ledig
mai02ifw@informatik.uni-leipzig.de Robin_Ledig
mai02igw@studserv.uni-leipzig.de Robin_Ledig
heine@informatik.uni-leipzig.de Christian_Heine
\ No newline at end of file
heine@informatik.uni-leipzig.de Christian_Heine
reichenbach@berkeley.informatik.uni-leipzig.de Andre_Reichenbach
reichenbach Andre_Reichenbach
philips@informatik.uni-leipzig.de Stefan_Philips
frohl.robert@googlemail.com Robert_Frohl
dirk_albrecht@gmx.net Dirk_Albrecht
albrecht Dirk_Albrecht
mstuber Marcus_Stuber
skiunke Sebastian_Kiunke
\ No newline at end of file
This directory is intended to serve as the place where one can compile OpenWalnut.
This .README file is in the build directory so that the directory will be recognized and created by mercurial. Only remove it if you know what you are doing or if the behavior of mercurial concerning empty directories has changed.
\ No newline at end of file
This .README file is in the build directory so that the directory will be recognized and created by mercurial (hg). Only remove it if you know what you are doing or if the behavior of mercurial concerning empty directories has changed.
\ No newline at end of file
......@@ -7,10 +7,7 @@ the currect working directory to be project's main directory,
the following steps should do the trick:
> cd build
> ccmake ../src
PRESS 'c' for configuration
PRESS 'c' again for further configuration
PRESS 'g' to generate the build system including the Makefiles.
> cmake ../src
> make
Now the subdirectory "bin" of the "build" directory should contain an executable named walnut.
......
......@@ -31,7 +31,7 @@ PROJECT_NAME = OpenWalnut
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 1.0+
PROJECT_NUMBER = 1.1+
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
......@@ -1030,7 +1030,7 @@ FORMULA_FONTSIZE = 10
# typically be disabled. For large projects the javascript based search engine
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
SEARCHENGINE = NO
SEARCHENGINE = YES
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index
# file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup
......@@ -1324,7 +1324,11 @@ INCLUDE_FILE_PATTERNS =
PREDEFINED = OUTLINE \
_GNU_SOURCE \
NODEBUG
NODEBUG \
WGE_EXPORT \
OWCOMMON_EXPORT \
OWDATAHANDLER_EXPORT \
OWKERNEL_EXPORT
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
......
......@@ -31,7 +31,7 @@ PROJECT_NAME = OpenWalnut
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 1.0+
PROJECT_NUMBER = 1.1+
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
......@@ -1030,7 +1030,7 @@ FORMULA_FONTSIZE = 10
# typically be disabled. For large projects the javascript based search engine
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
SEARCHENGINE = NO
SEARCHENGINE = YES
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index
# file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup
......@@ -1324,7 +1324,11 @@ INCLUDE_FILE_PATTERNS =
PREDEFINED = OUTLINE \
_GNU_SOURCE \
NODEBUG
NODEBUG \
WGE_EXPORT \
OWCOMMON_EXPORT \
OWDATAHANDLER_EXPORT \
OWKERNEL_EXPORT
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
......
......@@ -43,17 +43,25 @@ compatiblesToolBarStyle = 0 # this pref allows the compatibles toolbar to have a
# 2 -> left
# 3 -> right
# 4 -> hide completely
# 5 -> inside the dataset browser ( not possible for compatiblesToolBarPos! This will be mapped to right (=3) )
# 5 -> inside the control panel ( not possible for compatiblesToolBarPos! This will be mapped to right (=3) )
toolBarPos = 0 # default position of the toolbars
compatiblesToolBarPos = 0 # position of the compatibles toolbar (overrides toolBarPos)
####################################################################
# Dataset Browser
# Control panel
# combineTreeAndRoiAndTextureSorter = yes # should the module tree, ROI tree and the Texture Sorter be combined in ONE Tab widget?
# dsbWidth = 400 # the width of the dataset browser
# dsbInvisibleByDefault = yes # hide the dataset browser on startup. Can be shown using F9.
# dsbFloatingByDefault = yes # should the dataset browser be undocked on startup?
# dsbWidth = 400 # the width of the control panel
# dsbInvisibleByDefault = yes # hide the control panel on startup. Can be shown using F9.
# dsbFloatingByDefault = yes # should the control panel be undocked on startup?
# Here you can put any key sequence you would like to result in removing modules or ROIs
# Examples:
# deleteKey = Backspace
# deleteKey = Ctrl+J
# deleteKey = B
deleteModuleKey = Backspace
deleteROIKey = Del
####################################################################
# Other GUI settings
......@@ -65,4 +73,4 @@ compatiblesToolBarPos = 0 # position of the compatibles toolbar (overrides toolB
# bgColor.g = .9 # background color (green part)
# bgColor.b = .9 # background color (blue part)
zoomTrackballManipulator.allowThrow = yes # allow the auto-rotation thing when "throwing" an object with the mouse
# multiThreadedViewers = no # Use multiple threads for the multiple viewers. Causes hanging on some machines when opening a new view.
multiThreadedViewers = no # Use multiple threads for the multiple viewers. Causes hanging on some machines when opening a new view.
## This is a sample configuration file for OpenWalnut.
## Uncomment the options you are interested in.
[general]
allowOnlyOneFiberDataSet = yes # This will prevent you from accidently loading multiple fiber data sets.
[modules]
## use this to specify the default module to add during load.
## It is a comma seperated list. If this is not specified the
......@@ -12,7 +9,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,Fiber Display,Read Spherical Harmonics,Navigation Slices,Deterministic Tract Clustering using Gaussian Processes,Deterministic Tract to Gaussian Process Converter,Cluster Param Display,Write Tracts,Fiber Resampling,Teem Glyphs
## 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
......@@ -49,17 +46,25 @@ compatiblesToolBarStyle = 0 # this pref allows the compatibles toolbar to have a
# 2 -> left
# 3 -> right
# 4 -> hide completely
# 5 -> inside the dataset browser ( not possible for compatiblesToolBarPos! This will be mapped to right (=3) )
# 5 -> inside the control panel ( not possible for compatiblesToolBarPos! This will be mapped to right (=3) )
toolBarPos = 0 # default position of the toolbars
compatiblesToolBarPos = 0 # position of the compatibles toolbar (overrides toolBarPos)
####################################################################
# Dataset Browser
# Control panel
# combineTreeAndRoiAndTextureSorter = yes # should the module tree, ROI tree and the Texture Sorter be combined in ONE Tab widget?
# dsbWidth = 400 # the width of the dataset browser
# dsbInvisibleByDefault = yes # hide the dataset browser on startup. Can be shown using F9.
# dsbFloatingByDefault = yes # should the dataset browser be undocked on startup?
# dsbWidth = 400 # the width of the control panel
# dsbInvisibleByDefault = yes # hide the control panel on startup. Can be shown using F9.
# dsbFloatingByDefault = yes # should the control panel be undocked on startup?
# Here you can put any key sequence you would like to result in removing modules or ROIs
# Examples:
# deleteKey = Backspace
# deleteKey = Ctrl+J
# deleteKey = B
deleteModuleKey = Backspace
deleteROIKey = Del
####################################################################
# Other GUI settings
......@@ -70,5 +75,5 @@ compatiblesToolBarPos = 0 # position of the compatibles toolbar (overrides toolB
# bgColor.r = .9 # background color (red part)
# bgColor.g = .9 # background color (green part)
# bgColor.b = .9 # background color (blue part)
# zoomTrackballManipulator.allowThrow = yes # allow the auto-rotation thing when "throwing" an object with the mouse
zoomTrackballManipulator.allowThrow = no # allow the auto-rotation thing when "throwing" an object with the mouse
multiThreadedViewers = no # Use multiple threads for the multiple viewers. Causes hanging on some machines when opening a new view.
#!/bin/sh
# This script allows you to use PyClewn (Vim GDB integration) with walnut.
# get path of this script
BINDIR=`dirname "$0"`
SRCDIR=$BINDIR # we assume this. We test lateron whether this
# we assume that your source dir is two or tree levels up. Setting the working directory to the source dir
# eases file browsing vim later
if [ -d "$BINDIR/../../src" ]; then
SRCDIR="$BINDIR/../../src"
else
if [ -d "$BINDIR/../../../src" ]; then
SRCDIR="$BINDIR/../../../src"
else
echo "Could not find source dir." # this is not really critical.
fi
fi
# run walnut
pyclewn -c "-c \"cd $SRCDIR\"" -a $BINDIR/walnut "$*"
......@@ -36,6 +36,10 @@
* \par
* http://www.openwalnut.org
* \par
* There exist two versions of this API.
* A simple one at http://berkeley.informatik.uni-leipzig.de/api/
* and one with callgraphs at http://berkeley.informatik.uni-leipzig.de/apiFull/
* \par
* Copyright 2009-2010 OpenWalnut Community, BSV\@Uni-Leipzig and CNCF\@MPI-CBS.
* For more information see http://www.openwalnut.org/copying
*/
......@@ -59,20 +63,14 @@ int main( int argc, char** argv )
// install signal handler as early as possible
WSegmentationFault::installSignalHandler();
// init logger here. It will be started by the GUI.
WLogger logger;
// initialize logger here. It will be started by the GUI.
WLogger::startup();
// initialize GUI
// NOTE: we need a shared ptr here since WGUI uses enable_shared_from_this.
// NOTE: we need a shared_ptr here since WGUI uses enable_shared_from_this.
boost::shared_ptr< WQt4Gui > gui = boost::shared_ptr< WQt4Gui > ( new WQt4Gui( argc, argv ) );
int result = gui->run();
// finish running thread if there is a WLogger.
if( !result )
{
WLogger::getLogger()->wait( true );
}
std::cout << "Closed OpenWalnut smoothly. Goodbye!" << std::endl;
return result;
......
......@@ -6,6 +6,6 @@ Directory Structure:
-gui
-dataHandler
-graphicsEngine
-math
-common
-kernel
-tools
......@@ -7,24 +7,45 @@ ADD_SUBDIRECTORY( datastructures )
ADD_SUBDIRECTORY( constraints )
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} )
SET( LIB_NAME "${OWCommonName}" )
SET( ${LIB_NAME}_COMBINER_SRC ${COMMON_SRC} ${COMMON_DATASTRUCTURES_SRC} ${COMMON_EXCEPTIONS_SRC} ${MATH_SRC} )
SET( ${LIB_NAME}_ALL_CPP ${COMMON_SRC} ${COMMON_DATASTRUCTURES_SRC} ${COMMON_EXCEPTIONS_SRC} ${MATH_SRC} )
FILE( GLOB_RECURSE ${LIB_NAME}_REMOVE_H "*.h" )
LIST( REMOVE_ITEM ${LIB_NAME}_ALL_CPP ${${LIB_NAME}_REMOVE_H} )
IF( OW_BUILD_AS_ONE_BIG_FILE )
SET( UNITY_BUILD_FILE_NAME "${LIB_NAME}UnityBuildFile.cpp" )
GENERATE_UNITY_BUILD_FILE( ${LIB_NAME}_ALL_CPP )
ADD_LIBRARY( ${LIB_NAME} SHARED ${UNITY_BUILD_FILE_NAME} ${${LIB_NAME}_COMBINER_SRC} )
ENDIF( OW_BUILD_AS_ONE_BIG_FILE )
IF( NOT OW_BUILD_AS_ONE_BIG_FILE )
ADD_LIBRARY( ${LIB_NAME} SHARED ${${LIB_NAME}_COMBINER_SRC} )
ENDIF( NOT OW_BUILD_AS_ONE_BIG_FILE )
TARGET_LINK_LIBRARIES( ${LIB_NAME} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${OPENSCENEGRAPH_LIBRARIES} )
IF(MSVC_IDE)
SET_TARGET_PROPERTIES( ${LIB_NAME} 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
# the quotes on the command line. WSharedLib::getSystemPrefix and
# the quotes on the command line. WSharedLib::getSystemPrefix and
# getSystemSuffix hard codes the right strings for VC.
# Maybe you have to spend another 500 bucks to have your VC support quotes.
IF( NOT CMAKE_GENERATOR MATCHES "Visual Studio" )
add_definitions( '-DW_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}"' )
add_definitions( '-DW_LIB_SUFFIX="${CMAKE_SHARED_LIBRARY_SUFFIX}"' )
add_definitions( '-DW_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}"' )
add_definitions( '-DW_LIB_SUFFIX="${CMAKE_SHARED_LIBRARY_SUFFIX}"' )
ENDIF()
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${COMMON_SRC}"
"OWcommon"
"${LIB_NAME}"
"WSegmentationFault.cpp" # can't test seg-faults ;-)
"WTransferable.cpp" # its an empty class
"WPropertyBase.cpp" # its an abstract class. Its small functionality is tested in WPropertyVariable_test.h
......
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#include "WBoundingBox.h"
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WBOUNDINGBOX_H
#define WBOUNDINGBOX_H
#include <ostream>
#include <osg/BoundingBox>
#include "exceptions/WInvalidBoundingBox.h"
#include "math/WVector3D.h"
/**
* Represents a \e axis \e parallel bounding box and provides some useful operations with them.
*
* \note Reason for subclassing: We don't want \c _min and \c _max member variables to be public.
* \note Reason for not having a \e private osg::BoundingBox member is, we don't have to wrap many
* member functions and can make use of the using directive. A downside on this is, we cannot
* automatical cast to osg::BoundingBox even if we provide a cast operator! Hence when we need this
* we will provide a toOsgBB() member function.
*/
template< class VT >
class WBoundingBoxImpl : private osg::BoundingBoxImpl< VT >
{
public:
/**
* Vertex type for min and max positions of this box.
*/
typedef typename osg::BoundingBoxImpl< VT >::vec_type vec_type;
/**
* Value type of the vertex type for example double, float, etc.
*/
typedef typename osg::BoundingBoxImpl< VT >::value_type value_type;
/**
* Default constructor.
*/
WBoundingBoxImpl();
/**
* Wrapps the component wise bounding box constructor from osg::BoundingBox.
*
* \param xmin Minimal x coordinate
* \param ymin Minimal y coordinate
* \param zmin Minimal z coordinate
* \param xmax Maximal x coordinate
* \param ymax Maximal y coordinate
* \param zmax Maximal z coordinate
*/
WBoundingBoxImpl( value_type xmin, value_type ymin, value_type zmin, value_type xmax, value_type ymax, value_type zmax );
/**
* Constructs a bounding box by min and max positions.
*
* \param min Position containing minx miny and minz coordinates.
* \param max Position containing maxx maxy and maxz coordinates.
*/
WBoundingBoxImpl( const vec_type& min, const vec_type& max );
/**
* Destructs this instance.
*/
virtual ~WBoundingBoxImpl();
/**
* Resets this box to an initial state where max is FLT_MIN and min FLT_MAX.
*
* \note This is a wrapper call to osg::BoundingBoxImpl< VT >::init()
*/
void reset();
using osg::BoundingBoxImpl< VT >::valid;
using osg::BoundingBoxImpl< VT >::set;
using osg::BoundingBoxImpl< VT >::xMin;
using osg::BoundingBoxImpl< VT >::yMin;
using osg::BoundingBoxImpl< VT >::zMin;
using osg::BoundingBoxImpl< VT >::xMax;
using osg::BoundingBoxImpl< VT >::yMax;
using osg::BoundingBoxImpl< VT >::zMax;
using osg::BoundingBoxImpl< VT >::center;
using osg::BoundingBoxImpl< VT >::radius;
/**
* Calculates and returns the squared length of the bounding box radius.
*
* \note This is a wrapper call to osg::BoundingBoxImpl< VT >::radius2()
*/
value_type radiusSquare() const;
using osg::BoundingBoxImpl< VT >::corner;
/**
* Converts this bounding box to the osg::BoundingBoxImpl< VT >.
*
* \return Copy of this casted to the osg::BoundingBoxImpl< VT > type
*/
osg::BoundingBoxImpl< VT > toOSGBB() const;
using osg::BoundingBoxImpl< VT >::expandBy;
/**
* Expands this bounding box to include the given bounding box.
*
* \param bb The other bounding box.
*/
void expandBy( const WBoundingBoxImpl< VT > &bb );
/**
* Checks for intersection of this bounding box with the specified bounding box.
*
* \param bb The other bouding box to tetst with.
*
* \return True if they intersect, false otherwise.
*/