Commit 015d425c authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

Merge remote-tracking branch 'origin/hs-worms/IntegrationOfTOP'

parents f0477549 13654611
......@@ -37,3 +37,12 @@ src/modules/modules-user.toolbox
.cproject
.settings
# jetbrains CLion / IntelliJ files
**/.idea
.vscode
openwalnut.log
# AppImage
tools/AppImage/AppImageBuild
......@@ -56,6 +56,7 @@ doc_job:
paths:
- build/debug
script:
- doxygen --version
- pwd
- cd build/debug
- pwd
......
......@@ -7,21 +7,29 @@ Chris Unger
Christian Heine
Christof Pieloth
Cornelius Müller
Daniel Bub
Daniel Gerlicher
David Geistert
Dirk Albrecht
Gerald Sommer
Hung Dang-Quoc
Jan Forberg
Joshua Santana
Marcus Stuber
Mario Hlawitschka
Markus Jankowski
Matthias Berndt
Matthias Klose
Michael Hamburger
Naizn Khelani
Patrick Oesterling
Robert Frohl
Robin Eschbach
Robin Ledig
Sebastian Kiunke
Sebastian Volke
Steffen Wenz
Tobias Rump
Viktor Leonhardt
......@@ -52,7 +52,7 @@ and get the URL to our git repository.
## Required Dependencies:
* Qt (Preferably Qt5, build support also for Qt4 >= 4.6)
* Qt (Preferrably Qt5, build support also for Qt4 >= 4.6)
* OpenSceneGraph (>= 2.8.0)
* Boost (>= 1.46.0)
* NIfTI library
......
......@@ -9,6 +9,8 @@ convert ../Logo/Logo.png -thumbnail '128x128>' \
-background transparent -gravity center -extent 128x128 openwalnut_128x128.png
convert ../Logo/Logo.png -thumbnail '64x64>' \
-background transparent -gravity center -extent 64x64 openwalnut_64x64.png
convert ../Logo/Logo.png -thumbnail '55x55>' \
-background transparent -gravity center -extent 55x55 openwalnut_55x55.png
convert ../Logo/Logo.png -thumbnail '32x32>' \
-background transparent -gravity center -extent 32x32 openwalnut_32x32.png
convert ../Logo/Logo.png -thumbnail '16x16>' \
......
[Desktop Entry]
Categories=Education;
Exec=/usr/bin/openwalnut
Name=OpenWalnut
Icon=openwalnut
X-KDE-StartupNotify=true
Terminal=false
Type=Application
Keywords=visualization;medical data;neuroscience;
......@@ -110,7 +110,7 @@ WColor convertHSVtoRGBA( double h, double s, double v )
r = ( h - twothird ) / onesixth;
g = 0.0;
}
else if( h > fivesixth && h <= 1.0) // red/blue
else if( h > fivesixth && h <= 1.0 ) // red/blue
{
r = 1.0;
b = ( 1.0 - h ) / onesixth;
......
......@@ -38,7 +38,7 @@
* In order to mark functions for the compiler as deprecated we need to put this before each deprecated function to get compiler warnings whenever this function is used.
* \note This macro is defined in here, since almost every header of the dataHandler includes this header.
*/
#if ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) )
#if( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) )
#define OW_API_DEPRECATED __attribute__( ( __deprecated__ ) )
#else
#define OW_API_DEPRECATED
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#if (( defined( __linux__ ) && defined( __GNUC__ )) && !defined( __ANDROID__) || defined ( __APPLE__ ))
#if( ( defined( __linux__ ) && defined( __GNUC__ ) ) && !defined( __ANDROID__ ) || defined( __APPLE__ ) )
#define BACKTRACE_SUPPORTED
#endif
......
......@@ -179,7 +179,7 @@ WGETexture2D::RPtr WHistogram2D::getSphereTexture()
areaScale = calcAreaScale( bucket, j );
for( size_t i = 0; i < imageWidth; ++i )
{
if( areaScale * m_bins( i, j ) > maxCount)
if( areaScale * m_bins( i, j ) > maxCount )
{
maxCount = areaScale * static_cast< double >( m_bins( i, j ) );
}
......
......@@ -92,7 +92,7 @@ void WProjectFileIO::printProperties( std::ostream& output, boost::shared_ptr< W
for( WProperties::PropertyConstIterator iter = l->get().begin(); iter != l->get().end(); ++iter )
{
// information properties do not get written
if( ( *iter )->getPurpose () == PV_PURPOSE_INFORMATION )
if( ( *iter )->getPurpose() == PV_PURPOSE_INFORMATION )
{
continue;
}
......
......@@ -80,6 +80,16 @@ namespace WPropertyHelper
}
}
namespace PC_CONFIRMOVERWRITE
{
void addTo( WPropFilename prop )
{
prop->addConstraint( boost::shared_ptr< WPropertyConstraintConfirmOverwrite< WPVBaseTypes::PV_PATH > >(
new WPropertyConstraintConfirmOverwrite< WPVBaseTypes::PV_PATH >()
) );
}
}
namespace PC_ISVALID
{
void addTo( WPropSelection prop )
......
......@@ -34,6 +34,7 @@
#include "constraints/WPropertyConstraintIsDirectory.h"
#include "constraints/WPropertyConstraintSelectOnlyOne.h"
#include "constraints/WPropertyConstraintIsValid.h"
#include "constraints/WPropertyConstraintConfirmOverwrite.h"
/**
......@@ -107,6 +108,19 @@ namespace WPropertyHelper
void addTo( WPropFilename prop );
}
/**
* Contains functions for easily adding contraints of type PC_CONFIRMOVERWRITE to properties compatible with this constraint.
*/
namespace PC_CONFIRMOVERWRITE
{
/**
* Add the PC_CONFIRMOVERWRITE constraint to the property.
*
* \param prop the property where to add the constraint.
*/
void addTo( WPropFilename prop );
}
/**
* Contains functions for easily adding constraints of type PC_ISVALID to properties compatible with this constraint.
*/
......
......@@ -49,7 +49,7 @@ std::string string_utils::lTrim( const std::string& source, const std::string& t
std::string string_utils::trim( const std::string& source, const std::string& t )
{
std::string str = source;
return lTrim( rTrim( str , t) , t );
return lTrim( rTrim( str , t ) , t );
}
std::string string_utils::toUpper( const std::string& source )
......
......@@ -163,7 +163,7 @@ namespace WStructuredTextParser
if( elementName == *keyIter )
{
// only if the key path continues AND the current element is no leaf, traverse
if( !elementIsKeyValuePair && ( ( keyIter + 1 ) != keyEnd) )
if( !elementIsKeyValuePair && ( ( keyIter + 1 ) != keyEnd ) )
{
ObjectType elementAsObj = boost::get< ObjectType >( current );
for( std::vector< MemberType >::const_iterator nodeIter = elementAsObj.m_nodes.begin();
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#if ( defined( __linux__ ) && !defined( __ANDROID__ ) )
#if( defined( __linux__ ) && !defined( __ANDROID__ ) )
#include <sys/prctl.h>
#endif
......@@ -149,7 +149,7 @@ void WThreadedRunner::msleep( const int32_t t ) const
boost::signals2::connection WThreadedRunner::subscribeSignal( THREAD_SIGNAL signal, t_ThreadErrorSignalHandlerType notifier )
{
switch( signal)
switch( signal )
{
case WTHREAD_ERROR:
return signal_thread_error.connect( notifier );
......@@ -174,7 +174,7 @@ const std::string& WThreadedRunner::getCrashMessage() const
return m_crashMessage;
}
#if ( defined( __linux__ ) && !defined( __ANDROID__ ) )
#if( defined( __linux__ ) && !defined( __ANDROID__ ) )
void WThreadedRunner::setThisThreadName( std::string name )
{
// set the name of the thread. This name is shown by the "top", for example.
......
......@@ -82,6 +82,6 @@ int WMarchingCubesAlgorithm::getEdgeID( unsigned int nX, unsigned int nY, unsign
unsigned int WMarchingCubesAlgorithm::getVertexID( unsigned int nX, unsigned int nY, unsigned int nZ )
{
return nZ * ( m_nCellsY + 1 ) * ( m_nCellsX + 1) + nY * ( m_nCellsX + 1 ) + nX;
return nZ * ( m_nCellsY + 1 ) * ( m_nCellsX + 1 ) + nY * ( m_nCellsX + 1 ) + nX;
}
......@@ -284,7 +284,7 @@ void WMarchingLegoAlgorithm::addSurface( size_t x, size_t y, size_t z, size_t su
size_t WMarchingLegoAlgorithm::getVertexID( size_t nX, size_t nY, size_t nZ )
{
return nZ * ( m_nCellsY + 1 ) * ( m_nCellsX + 1) + nY * ( m_nCellsX + 1 ) + nX;
return nZ * ( m_nCellsY + 1 ) * ( m_nCellsX + 1 ) + nY * ( m_nCellsX + 1 ) + nX;
}
boost::shared_ptr<WTriangleMesh> WMarchingLegoAlgorithm::genSurfaceOneValue( size_t nbCoordsX, size_t nbCoordsY, size_t nbCoordsZ,
......
//---------------------------------------------------------------------------
//
// 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 "WPropertyConstraintConfirmOverwrite.h"
#include "../WPropertyVariable.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 WPROPERTYCONSTRAINTCONFIRMOVERWRITE_H
#define WPROPERTYCONSTRAINTCONFIRMOVERWRITE_H
#include "../WPropertyTypes.h"
#include "WPropertyConstraintTypes.h"
/**
* This class allows constraining properties to be existing filenames. This is especially useful for WPropFilename.
*/
template < typename T >
class WPropertyConstraintConfirmOverwrite: public WPropertyVariable< T >::PropertyConstraint
{
public:
/**
* Constructor.
*/
WPropertyConstraintConfirmOverwrite();
/**
* Destructor.
*/
virtual ~WPropertyConstraintConfirmOverwrite();
/**
* Checks whether the specified value is a directory or not.
*
* \param property the property whose new value should be set.
* \param value the new value to check
*
* \return true if the file/path is a directory
*/
virtual bool accept( boost::shared_ptr< WPropertyVariable< T > > property, const T& value );
/**
* Allows simple identification of the real constraint type.
*
* \return the type
*/
virtual PROPERTYCONSTRAINT_TYPE getType();
/**
* Method to clone the constraint and create a new one with the correct dynamic type.
*
* \return the constraint.
*/
virtual boost::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint > clone();
private:
};
template < typename T >
WPropertyConstraintConfirmOverwrite< T >::WPropertyConstraintConfirmOverwrite()
{
}
template < typename T >
WPropertyConstraintConfirmOverwrite< T >::~WPropertyConstraintConfirmOverwrite()
{
}
template < typename T >
bool WPropertyConstraintConfirmOverwrite< T >::accept( boost::shared_ptr< WPropertyVariable< T > > /* property */, const T& /* value */ )
{
return true;
}
template < typename T >
PROPERTYCONSTRAINT_TYPE WPropertyConstraintConfirmOverwrite< T >::getType()
{
return PC_CONFIRMOVERWRITE;
}
template < typename T >
boost::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint > WPropertyConstraintConfirmOverwrite< T >::clone()
{
return boost::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint >( new WPropertyConstraintConfirmOverwrite< T >( *this ) );
}
#endif // WPROPERTYCONSTRAINTCONFIRMOVERWRITE_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