Commit 1cf3269d authored by Mathias Goldau's avatar Mathias Goldau

[MERGE]

parents a6831840 edd88492
...@@ -11,6 +11,7 @@ schurade@spinat.cbs.mpg.de Ralph_Schurade ...@@ -11,6 +11,7 @@ schurade@spinat.cbs.mpg.de Ralph_Schurade
schurade Ralph_Schurade schurade Ralph_Schurade
ebaum Sebastian_Eichelbaum ebaum Sebastian_Eichelbaum
eichelbaum@informatik.uni-leipzig.de Sebastian_Eichelbaum eichelbaum@informatik.uni-leipzig.de Sebastian_Eichelbaum
Sebastian Eichelbaum = Sebastian_Eichelbaum
cornimueller Cornelius_Mueller cornimueller Cornelius_Mueller
mam04cvr@studserv.uni-leipzig.de Cornelius_Mueller mam04cvr@studserv.uni-leipzig.de Cornelius_Mueller
hlawitschka@ucdavis.edu Mario_Hlawitschka hlawitschka@ucdavis.edu Mario_Hlawitschka
...@@ -20,6 +21,8 @@ mai02igw@studserv.uni-leipzig.de Robin_Ledig ...@@ -20,6 +21,8 @@ mai02igw@studserv.uni-leipzig.de Robin_Ledig
heine@informatik.uni-leipzig.de Christian_Heine heine@informatik.uni-leipzig.de Christian_Heine
reichenbach@berkeley.informatik.uni-leipzig.de Andre_Reichenbach reichenbach@berkeley.informatik.uni-leipzig.de Andre_Reichenbach
reichenbach Andre_Reichenbach reichenbach Andre_Reichenbach
reichenbach@informatik.uni-leipzig.de Andre_Reichenbach
Andre Andre_Reichenbach
philips@informatik.uni-leipzig.de Stefan_Philips philips@informatik.uni-leipzig.de Stefan_Philips
frohl.robert@googlemail.com Robert_Frohl frohl.robert@googlemail.com Robert_Frohl
dirk_albrecht@gmx.net Dirk_Albrecht dirk_albrecht@gmx.net Dirk_Albrecht
...@@ -27,4 +30,6 @@ albrecht Dirk_Albrecht ...@@ -27,4 +30,6 @@ albrecht Dirk_Albrecht
mstuber Marcus_Stuber mstuber Marcus_Stuber
skiunke Sebastian_Kiunke skiunke Sebastian_Kiunke
a_berres@informatik.uni-kl.de Anne_Berres a_berres@informatik.uni-kl.de Anne_Berres
gsommer_by@gmx.de Gerald_Sommer gsommer_by@gmx.de Gerald_Sommer
\ No newline at end of file = Unknown___________________
root@openwalnut.com = Unknown___________________
\ No newline at end of file
...@@ -1417,7 +1417,7 @@ HIDE_UNDOC_RELATIONS = NO ...@@ -1417,7 +1417,7 @@ HIDE_UNDOC_RELATIONS = NO
# toolkit from AT&T and Lucent Bell Labs. The other options in this section # toolkit from AT&T and Lucent Bell Labs. The other options in this section
# have no effect if this option is set to NO (the default) # have no effect if this option is set to NO (the default)
HAVE_DOT = YES HAVE_DOT = NO
# By default doxygen will write a font called FreeSans.ttf to the output # By default doxygen will write a font called FreeSans.ttf to the output
# directory and reference it in all dot files that doxygen generates. This # directory and reference it in all dot files that doxygen generates. This
......
...@@ -1419,7 +1419,7 @@ HIDE_UNDOC_RELATIONS = NO ...@@ -1419,7 +1419,7 @@ HIDE_UNDOC_RELATIONS = NO
# toolkit from AT&T and Lucent Bell Labs. The other options in this section # toolkit from AT&T and Lucent Bell Labs. The other options in this section
# have no effect if this option is set to NO (the default) # have no effect if this option is set to NO (the default)
HAVE_DOT = YES HAVE_DOT = NO
# By default doxygen will write a font called FreeSans.ttf to the output # By default doxygen will write a font called FreeSans.ttf to the output
# directory and reference it in all dot files that doxygen generates. This # directory and reference it in all dot files that doxygen generates. This
......
<h1>Welcome to OpenWalnut %OW_LIB_VERSION%!</h1>
<a href="http://www.openwalnut.org/projects/openwalnut/wiki/ReleaseNotes">Release Notes</a>
<br>
<br>
Hello User! New to OpenWalnut? Have a look at <a href="http://www.openwalnut.org">http://www.openwalnut.org</a>!
We provide
<ul>
<li> user-/video documentation,
<li> programming tutorials
<li> and the latest information on OpenWalnut.
</ul>
Do you have problems using OpenWalnut? Do not hesitate to ask:
<ul>
<li><a href="mailto:openwalnut@lists.informatik.uni-leipzig.de">Mailing list</a>
<li>IRC Chat on irc.freenode.net in #ow
</ul>
Found a bug? Do you have ideas for improvements? Please <a href="http://www.openwalnut.org/projects/openwalnut/wiki/Contribute">report</a> these issues! We can improve OpenWalnut only with your help and ideas.
<br><br>
<i>Thank you for using OpenWalnut!</i>
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
## and project files. ## and project files.
## recommendation list: ## recommendation list:
recommended = 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,Grid Renderer recommended = 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,Grid Renderer,Spatial Derivation,Scalar Operator,Vector Operator,Colormapper
...@@ -64,7 +64,7 @@ WColor OWCOMMON_EXPORT inverseColor( const WColor& other ); ...@@ -64,7 +64,7 @@ WColor OWCOMMON_EXPORT inverseColor( const WColor& other );
*/ */
namespace defaultColor namespace defaultColor
{ {
// \cond Supress_Doxygen // \cond Suppress_Doxygen
static const WColor GREEN( 0.0, 1.0, 0.0, 1.0 ); //!< Default for green static const WColor GREEN( 0.0, 1.0, 0.0, 1.0 ); //!< Default for green
static const WColor RED( 1.0, 0.0, 0.0, 1.0 ); //!< Default for red static const WColor RED( 1.0, 0.0, 0.0, 1.0 ); //!< Default for red
static const WColor BLUE( 0.0, 0.0, 1.0, 1.0 ); //!< Default for blue static const WColor BLUE( 0.0, 0.0, 1.0, 1.0 ); //!< Default for blue
......
...@@ -191,7 +191,7 @@ namespace wlog ...@@ -191,7 +191,7 @@ namespace wlog
template< typename T > WStreamedLogger operator<<( const T& loggable ); template< typename T > WStreamedLogger operator<<( const T& loggable );
// Doxygen should ignore the TypeDef below which are just an alias for std::endl etc. // Doxygen should ignore the TypeDef below which are just an alias for std::endl etc.
// \cond Supress_Doxygen // \cond Suppress_Doxygen
typedef std::basic_ostream< char, std::char_traits< char > > OutStreamType; typedef std::basic_ostream< char, std::char_traits< char > > OutStreamType;
typedef OutStreamType& ( *StreamManipulatorFunctor )( OutStreamType& ); typedef OutStreamType& ( *StreamManipulatorFunctor )( OutStreamType& );
// \endcond // \endcond
......
...@@ -406,6 +406,17 @@ public: ...@@ -406,6 +406,17 @@ public:
*/ */
virtual bool set( T value, bool suppressNotification = false ); virtual bool set( T value, bool suppressNotification = false );
/**
* Sets the specified value as recommended value. The difference to \ref set is simple. If some value was set using the method \ref set
* earlier, the \ref setRecommendedValue call is ignored. This is very useful in modules, where incoming data yields some useful default values
* but you do not want to overwrite a user-value which might have been set.
*
* \param value the new value to set if the user did not yet set the value
*
* \return true if value has been set successfully.
*/
virtual bool setRecommendedValue( T value );
protected: protected:
/** /**
...@@ -439,13 +450,19 @@ protected: ...@@ -439,13 +450,19 @@ protected:
boost::shared_ptr< ConstraintContainerType > m_constraints; boost::shared_ptr< ConstraintContainerType > m_constraints;
private: private:
/**
* This is true, if the user did not set a value until now using \ref set.
*/
bool m_notYetSet;
}; };
template < typename T > template < typename T >
WPropertyVariable< T >::WPropertyVariable( std::string name, std::string description, const T& initial ): WPropertyVariable< T >::WPropertyVariable( std::string name, std::string description, const T& initial ):
WFlag< T >( new WCondition(), initial ), WFlag< T >( new WCondition(), initial ),
WPropertyBase( name, description ), WPropertyBase( name, description ),
m_constraints( new ConstraintContainerType() ) m_constraints( new ConstraintContainerType() ),
m_notYetSet( true )
{ {
updateType(); updateType();
...@@ -458,7 +475,8 @@ template < typename T > ...@@ -458,7 +475,8 @@ template < typename T >
WPropertyVariable< T >::WPropertyVariable( std::string name, std::string description, const T& initial, boost::shared_ptr< WCondition > condition ): WPropertyVariable< T >::WPropertyVariable( std::string name, std::string description, const T& initial, boost::shared_ptr< WCondition > condition ):
WFlag< T >( condition, initial ), WFlag< T >( condition, initial ),
WPropertyBase( name, description ), WPropertyBase( name, description ),
m_constraints( new ConstraintContainerType() ) m_constraints( new ConstraintContainerType() ),
m_notYetSet( true )
{ {
updateType(); updateType();
...@@ -472,7 +490,8 @@ WPropertyVariable< T >::WPropertyVariable( std::string name, std::string descrip ...@@ -472,7 +490,8 @@ WPropertyVariable< T >::WPropertyVariable( std::string name, std::string descrip
PropertyChangeNotifierType notifier ): PropertyChangeNotifierType notifier ):
WFlag< T >( new WCondition(), initial ), WFlag< T >( new WCondition(), initial ),
WPropertyBase( name, description ), WPropertyBase( name, description ),
m_constraints( new ConstraintContainerType() ) m_constraints( new ConstraintContainerType() ),
m_notYetSet( true )
{ {
updateType(); updateType();
...@@ -492,7 +511,8 @@ WPropertyVariable< T >::WPropertyVariable( std::string name, std::string descrip ...@@ -492,7 +511,8 @@ WPropertyVariable< T >::WPropertyVariable( std::string name, std::string descrip
PropertyChangeNotifierType notifier ): PropertyChangeNotifierType notifier ):
WFlag< T >( condition, initial ), WFlag< T >( condition, initial ),
WPropertyBase( name, description ), WPropertyBase( name, description ),
m_constraints( new ConstraintContainerType() ) m_constraints( new ConstraintContainerType() ),
m_notYetSet( true )
{ {
updateType(); updateType();
...@@ -511,7 +531,8 @@ template < typename T > ...@@ -511,7 +531,8 @@ template < typename T >
WPropertyVariable< T >::WPropertyVariable( const WPropertyVariable< T >& from ): WPropertyVariable< T >::WPropertyVariable( const WPropertyVariable< T >& from ):
WFlag< T >( from ), WFlag< T >( from ),
WPropertyBase( from ), WPropertyBase( from ),
m_constraints( new ConstraintContainerType() ) m_constraints( new ConstraintContainerType() ),
m_notYetSet( from.m_notYetSet )
{ {
// copy the constraints // copy the constraints
...@@ -584,7 +605,7 @@ bool WPropertyVariable< T >::setAsString( std::string value ) ...@@ -584,7 +605,7 @@ bool WPropertyVariable< T >::setAsString( std::string value )
{ {
// use the helper class which can handle different kinds of properties for us // use the helper class which can handle different kinds of properties for us
PROPERTY_TYPE_HELPER::WStringConversion< T > h = PROPERTY_TYPE_HELPER::WStringConversion< T >(); PROPERTY_TYPE_HELPER::WStringConversion< T > h = PROPERTY_TYPE_HELPER::WStringConversion< T >();
return WFlag< T >::set( h.create( WFlag< T >::get(), value ) ); return set( h.create( WFlag< T >::get(), value ) );
} }
catch( const boost::bad_lexical_cast &e ) catch( const boost::bad_lexical_cast &e )
{ {
...@@ -610,7 +631,7 @@ bool WPropertyVariable< T >::set( boost::shared_ptr< WPropertyBase > value ) ...@@ -610,7 +631,7 @@ bool WPropertyVariable< T >::set( boost::shared_ptr< WPropertyBase > value )
boost::shared_ptr< WPropertyVariable< T > > v = boost::shared_dynamic_cast< WPropertyVariable< T > >( value ); boost::shared_ptr< WPropertyVariable< T > > v = boost::shared_dynamic_cast< WPropertyVariable< T > >( value );
if( v ) if( v )
{ {
return WFlag< T >::set( v->get() ); return set( v->get() );
} }
else else
{ {
...@@ -621,9 +642,26 @@ bool WPropertyVariable< T >::set( boost::shared_ptr< WPropertyBase > value ) ...@@ -621,9 +642,26 @@ bool WPropertyVariable< T >::set( boost::shared_ptr< WPropertyBase > value )
template < typename T > template < typename T >
bool WPropertyVariable< T >::set( T value, bool suppressNotification ) bool WPropertyVariable< T >::set( T value, bool suppressNotification )
{ {
m_notYetSet = false;
return WFlag< T >::set( value, suppressNotification ); return WFlag< T >::set( value, suppressNotification );
} }
template < typename T >
bool WPropertyVariable< T >::setRecommendedValue( T value )
{
// NOTE: well this is quite problematic when used multi-threaded ...
if( m_notYetSet )
{
bool ret = set( value );
m_notYetSet = true;
return ret;
}
else
{
return false;
}
}
template < typename T > template < typename T >
bool WPropertyVariable< T >::ensureValidity( T newValidValue, bool suppressNotification ) bool WPropertyVariable< T >::ensureValidity( T newValidValue, bool suppressNotification )
{ {
......
...@@ -146,7 +146,7 @@ public: ...@@ -146,7 +146,7 @@ public:
m_second = normalize( m_second ); m_second = normalize( m_second );
} }
// \cond Supress_Doxygen // \cond Suppress_Doxygen
// /** // /**
// * Computes sample points on that plane. // * Computes sample points on that plane.
// * // *
......
...@@ -41,7 +41,7 @@ template< typename T > class WValue ...@@ -41,7 +41,7 @@ template< typename T > class WValue
template< typename S > friend class WValue; //!< All WValues are friends of each other. template< typename S > friend class WValue; //!< All WValues are friends of each other.
// We exclude this from doxygen since they are documented already as functions and I don't want to duplicate that documentation // We exclude this from doxygen since they are documented already as functions and I don't want to duplicate that documentation
// \cond Supress_Doxygen // \cond Suppress_Doxygen
template< typename U > friend std::ostream& operator<<( std::ostream& os, const WValue< U > &rhs ); template< typename U > friend std::ostream& operator<<( std::ostream& os, const WValue< U > &rhs );
template< typename U > friend std::istream& operator>>( std::istream& in, WValue< U >& rhs ); template< typename U > friend std::istream& operator>>( std::istream& in, WValue< U >& rhs );
// \endcond // \endcond
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "../WMixinVector.h" #include "../WMixinVector.h"
#include "WMixinVectorTraits.h" #include "WMixinVectorTraits.h"
// \cond Supress_Doxygen // \cond Suppress_Doxygen
// This is just a dummy class to test if the default constructor is called when // This is just a dummy class to test if the default constructor is called when
// not specified by WMixinVector instanziation. // not specified by WMixinVector instanziation.
class A {public: A(){m_x = 3.1415;} bool operator==(double x){return m_x == x;} double m_x; }; // NOLINT class A {public: A(){m_x = 3.1415;} bool operator==(double x){return m_x == x;} double m_x; }; // NOLINT
......
...@@ -66,6 +66,16 @@ struct DataType ...@@ -66,6 +66,16 @@ struct DataType
{ {
}; };
/**
* Convert a runtime type to a C++ type
*
* \tparam rtType the runtime type
*/
template< int rtType >
struct DataTypeRT
{
};
/** /**
* Specialization for a specific datatype. * Specialization for a specific datatype.
*/ */
...@@ -76,6 +86,16 @@ struct DataType< int8_t > ...@@ -76,6 +86,16 @@ struct DataType< int8_t >
static dataType const type = W_DT_INT8; static dataType const type = W_DT_INT8;
}; };
/**
* Specialization for a specific type
*/
template<>
struct DataTypeRT< W_DT_INT8 >
{
//! correct C++ type for this runtime type
typedef int8_t type;
};
/** /**
* Specialization for a specific datatype. * Specialization for a specific datatype.
*/ */
...@@ -86,6 +106,16 @@ struct DataType< uint8_t > ...@@ -86,6 +106,16 @@ struct DataType< uint8_t >
static dataType const type = W_DT_UINT8; static dataType const type = W_DT_UINT8;
}; };
/**
* Specialization for a specific type
*/
template<>
struct DataTypeRT< W_DT_UINT8 >
{
//! correct C++ type for this runtime type
typedef uint8_t type;
};
/** /**
* Specialization for a specific datatype. * Specialization for a specific datatype.
*/ */
...@@ -96,6 +126,16 @@ struct DataType< int16_t > ...@@ -96,6 +126,16 @@ struct DataType< int16_t >
static dataType const type = W_DT_INT16; static dataType const type = W_DT_INT16;
}; };
/**
* Specialization for a specific type
*/
template<>
struct DataTypeRT< W_DT_INT16 >
{
//! correct C++ type for this runtime type
typedef int16_t type;
};
/** /**
* Specialization for a specific datatype. * Specialization for a specific datatype.
*/ */
...@@ -106,6 +146,16 @@ struct DataType< uint16_t > ...@@ -106,6 +146,16 @@ struct DataType< uint16_t >
static dataType const type = W_DT_UINT16; static dataType const type = W_DT_UINT16;
}; };
/**
* Specialization for a specific type
*/
template<>
struct DataTypeRT< W_DT_UINT16 >
{
//! correct C++ type for this runtime type
typedef uint16_t type;
};
/** /**
* Specialization for a specific datatype. * Specialization for a specific datatype.
*/ */
...@@ -116,6 +166,16 @@ struct DataType< int32_t > ...@@ -116,6 +166,16 @@ struct DataType< int32_t >
static dataType const type = W_DT_SIGNED_INT; static dataType const type = W_DT_SIGNED_INT;
}; };
/**
* Specialization for a specific type
*/
template<>
struct DataTypeRT< W_DT_SIGNED_INT >
{
//! correct C++ type for this runtime type
typedef int32_t type;
};
/** /**
* Specialization for a specific datatype. * Specialization for a specific datatype.
*/ */
...@@ -126,6 +186,16 @@ struct DataType< uint32_t > ...@@ -126,6 +186,16 @@ struct DataType< uint32_t >
static dataType const type = W_DT_UINT32; static dataType const type = W_DT_UINT32;
}; };
/**
* Specialization for a specific type
*/
template<>
struct DataTypeRT< W_DT_UINT32 >
{
//! correct C++ type for this runtime type
typedef uint32_t type;
};
/** /**
* Specialization for a specific datatype. * Specialization for a specific datatype.
*/ */
...@@ -136,6 +206,16 @@ struct DataType< int64_t > ...@@ -136,6 +206,16 @@ struct DataType< int64_t >
static dataType const type = W_DT_INT64; static dataType const type = W_DT_INT64;
}; };
/**
* Specialization for a specific type
*/
template<>
struct DataTypeRT< W_DT_INT64 >
{
//! correct C++ type for this runtime type
typedef int64_t type;
};
/** /**
* Specialization for a specific datatype. * Specialization for a specific datatype.
*/ */
...@@ -146,6 +226,16 @@ struct DataType< uint64_t > ...@@ -146,6 +226,16 @@ struct DataType< uint64_t >
static dataType const type = W_DT_UINT64; static dataType const type = W_DT_UINT64;
}; };
/**
* Specialization for a specific type
*/
template<>
struct DataTypeRT< W_DT_UINT64 >
{
//! correct C++ type for this runtime type
typedef uint64_t type;
};
/** /**
* Specialization for a specific datatype. * Specialization for a specific datatype.
*/ */
...@@ -156,6 +246,16 @@ struct DataType< float > ...@@ -156,6 +246,16 @@ struct DataType< float >
static dataType const type = W_DT_FLOAT; static dataType const type = W_DT_FLOAT;
}; };
/**
* Specialization for a specific type
*/
template<>
struct DataTypeRT< W_DT_FLOAT >
{
//! correct C++ type for this runtime type
typedef float type;
};
/** /**
* Specialization for a specific datatype. * Specialization for a specific datatype.
*/ */
...@@ -166,6 +266,16 @@ struct DataType< double > ...@@ -166,6 +266,16 @@ struct DataType< double >
static dataType const type = W_DT_DOUBLE; static dataType const type = W_DT_DOUBLE;
}; };
/**
* Specialization for a specific type
*/
template<>
struct DataTypeRT< W_DT_DOUBLE >
{
//! correct C++ type for this runtime type
typedef double type;
};
enum qformOrientation enum qformOrientation
{ {
Left_to_Right, Left_to_Right,
......
...@@ -335,141 +335,6 @@ WPosition WDataSetFibers::getTangent( size_t fiber, size_t vertex ) const ...@@ -335,141 +335,6 @@ WPosition WDataSetFibers::getTangent( size_t fiber, size_t vertex ) const
return normalize( tangent ); return normalize( tangent );
} }
/**
* Special helper functions for the saveSelected member function.
*/
namespace
{
/**
* converts an integer into a byte array and back
*/
union converterByteINT32
{
unsigned char b[4]; //!< the bytes
int i; //!< the int
};
/**
* converts a float into a byte array and back