Commit 6084c618 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX] - isnan and isinf renamed. Boost provides makros with these names on...

[FIX] - isnan and isinf renamed. Boost provides makros with these names on _some_ architectures which leads to a name conflict.
parent dccd2c56
......@@ -65,7 +65,7 @@ namespace wlimits
*
* \return True if the value is a NaN, false otherwise.
*/
template< typename T > bool isnan( T value );
template< typename T > bool isNaN( T value );
/**
* Determines if a number is considered as infinity or not.
......@@ -76,15 +76,15 @@ namespace wlimits
*
* \return True if the value is infinity, false otherwise.
*/
template< typename T > bool isinf( T value );
template< typename T > bool isInf( T value );
}
template< typename T > bool wlimits::isnan( T value )
template< typename T > bool wlimits::isNaN( T value )
{
return boost::math::isnan( value );
}
template< typename T > bool wlimits::isinf( T value )
template< typename T > bool wlimits::isInf( T value )
{
return boost::math::isinf( value );
}
......
......@@ -51,7 +51,7 @@ WDataSetTimeSeries::WDataSetTimeSeries( std::vector< boost::shared_ptr< WDataSet
{
WAssert( *dit, "" );
WAssert( g == boost::shared_dynamic_cast< WGridRegular3D >( ( *dit )->getGrid() ), "" );
WAssert( !wlimits::isnan( *tit ), "" );
WAssert( !wlimits::isNaN( *tit ), "" );
WAssert( d == ( *dit )->getValueSet()->getDataType(), "" );
WAssert( ( *dit )->getValueSet()->dimension() == 1, "" );
WAssert( ( *dit )->getValueSet()->order() == 0, "" );
......@@ -107,7 +107,7 @@ bool WDataSetTimeSeries::isTimeSlice( float time ) const
float WDataSetTimeSeries::findNearestTimeSlice( float time ) const
{
WAssert( !wlimits::isnan( time ), "" );
WAssert( !wlimits::isNaN( time ), "" );
if( time > getMaxTime() )
{
return getMaxTime();
......@@ -129,7 +129,7 @@ boost::shared_ptr< WDataSetScalar const > WDataSetTimeSeries::getDataSetPtrAtTim
boost::shared_ptr< WDataSetScalar const > WDataSetTimeSeries::calcDataSetAtTime( float time, std::string const& name ) const
{
WAssert( !wlimits::isnan( time ), "" );
WAssert( !wlimits::isNaN( time ), "" );
if( time < getMinTime() || time > getMaxTime() )
{
return boost::shared_ptr< WDataSetScalar const >();
......
......@@ -263,8 +263,8 @@ Data_T WDataSetTimeSeries::interpolate( WVector3d const& pos, float time, bool*
{
static const float inf = std::numeric_limits< float >::infinity();
WAssert( success, "" );
WAssert( !wlimits::isnan( length( pos ) ), "" );
WAssert( !wlimits::isnan( time ), "" );
WAssert( !wlimits::isNaN( length( pos ) ), "" );
WAssert( !wlimits::isNaN( time ), "" );
if( time < getMinTime() || time > getMaxTime() )
{
*success = false;
......
......@@ -49,7 +49,7 @@ namespace wtracking
// find t such that job.first() + t * dir is a point on the boundary of the current voxel
double t = getDistanceToBoundary( g, job.first, dir );
WAssert( !wlimits::isinf( t ) && !wlimits::isnan( t ), "Warning in WTrackingUtility::followToNextVoxel NaN's or INF's occured" );
WAssert( !wlimits::isInf( t ) && !wlimits::isNaN( t ), "Warning in WTrackingUtility::followToNextVoxel NaN's or INF's occured" );
WAssert( t > 0.0, "" );
WAssert( onBoundary( g, job.first + dir * t ), "" );
......
......@@ -422,7 +422,7 @@ WSymmetricSphericalHarmonic WMBermanTracking::createRandomODF( std::size_t i )
// "-", because the residuals in the input dataset have differing sign
q( k, 0 ) = v( k, 0 ) - ( m_dataSetResidual->getValueAt( i * v.rows() + z ) / ( sqrt( 1.0 - m_HMat( k, k ) ) ) );
WAssert( !wlimits::isnan( q( k, 0 ) ), "" );
WAssert( !wlimits::isNaN( q( k, 0 ) ), "" );
}
// now calc new sh coeffs from the resampled hardi data
......
......@@ -291,7 +291,7 @@ bool WMSplineSurface::save() const
// for( size_t i = 0; i < m_triMesh->vertSize(); ++i )
// {
// point = m_triMesh->getVertex( i );
// if( !( !wlimits::isinf( point[0] ) && !wlimits::isinf( point[1] ) && !wlimits::isinf( point[2] ) ) )
// if( !( !wlimits::isInf( point[0] ) && !wlimits::isInf( point[1] ) && !wlimits::isInf( point[2] ) ) )
// {
// WLogger::getLogger()->addLogMessage( "Will not write file from data that contains NAN or INF.", "Marching Cubes", LL_ERROR );
// return false;
......
......@@ -187,7 +187,7 @@ bool WMWriteMesh::saveVTKASCII() const
for( size_t i = 0; i < m_triMesh->vertSize(); ++i )
{
point = m_triMesh->getVertex( i );
if( !( !wlimits::isinf( point[0] ) && !wlimits::isinf( point[1] ) && !wlimits::isinf( point[2] ) ) )
if( !( !wlimits::isInf( point[0] ) && !wlimits::isInf( point[1] ) && !wlimits::isInf( point[2] ) ) )
{
WLogger::getLogger()->addLogMessage( "Will not write file from data that contains NAN or INF.", "Write Mesh", LL_ERROR );
return false;
......@@ -268,7 +268,7 @@ bool WMWriteMesh::saveJson()
for( size_t i = 0; i < meshes[k]->vertSize() - 1; ++i )
{
point = meshes[k]->getVertex( i );
if( !( !wlimits::isinf( point[0] ) && !wlimits::isinf( point[1] ) && !wlimits::isinf( point[2] ) ) )
if( !( !wlimits::isInf( point[0] ) && !wlimits::isInf( point[1] ) && !wlimits::isInf( point[2] ) ) )
{
WLogger::getLogger()->addLogMessage( "Will not write file from data that contains NAN or INF.", "Write Mesh", LL_ERROR );
return false;
......@@ -283,7 +283,7 @@ bool WMWriteMesh::saveJson()
for( size_t i = 0; i < meshes[k]->vertSize() - 1; ++i )
{
normal = meshes[k]->getNormal( i );
if( !( !wlimits::isinf( normal[0] ) && !wlimits::isinf( normal[1] ) && !wlimits::isinf( normal[2] ) ) )
if( !( !wlimits::isInf( normal[0] ) && !wlimits::isInf( normal[1] ) && !wlimits::isInf( normal[2] ) ) )
{
WLogger::getLogger()->addLogMessage( "Will not write file from data that contains NAN or INF.", "Write Mesh", LL_ERROR );
return false;
......
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