Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
3e7face9
Commit
3e7face9
authored
16 years ago
by
Thomas Feuvrier
Browse files
Options
Downloads
Patches
Plain Diff
Modif fonction MissingValue avec vnl_numeric_limit::quiet_NaN et vcl_numeric_isnan
parent
db1dff55
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/BasicFilters/otbEuclideanDistanceWithMissingValue.h
+1
-1
1 addition, 1 deletion
Code/BasicFilters/otbEuclideanDistanceWithMissingValue.h
Code/BasicFilters/otbEuclideanDistanceWithMissingValue.txx
+3
-32
3 additions, 32 deletions
Code/BasicFilters/otbEuclideanDistanceWithMissingValue.txx
with
4 additions
and
33 deletions
Code/BasicFilters/otbEuclideanDistanceWithMissingValue.h
+
1
−
1
View file @
3e7face9
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#ifndef __otbEuclideanDistanceWithMissingValue_h
#ifndef __otbEuclideanDistanceWithMissingValue_h
#define __otbEuclideanDistanceWithMissingValue_h
#define __otbEuclideanDistanceWithMissingValue_h
#include
<
itkEuclideanDistance.h
>
#include
"
itkEuclideanDistance.h
"
namespace
otb
{
namespace
otb
{
...
...
This diff is collapsed.
Click to expand it.
Code/BasicFilters/otbEuclideanDistanceWithMissingValue.txx
+
3
−
32
View file @
3e7face9
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#define __otbEuclideanDistanceWithMissingValue_txx
#define __otbEuclideanDistanceWithMissingValue_txx
#include "itkNumericTraits.h"
#include "itkNumericTraits.h"
#include "vnl/vnl_math.h"
namespace otb {
namespace otb {
...
@@ -93,50 +94,20 @@ EuclideanDistanceWithMissingValue< TVector >
...
@@ -93,50 +94,20 @@ EuclideanDistanceWithMissingValue< TVector >
return ::vcl_sqrt(temp * temp) ;
return ::vcl_sqrt(temp * temp) ;
}
}
#if defined(_MSC_VER) /* Microsoft Visual C++ */
#include <float.h>
template< class TVector >
/*static */
bool
EuclideanDistanceWithMissingValue< TVector >
::IsMissingValue ( const ValueType & v)
{
return static_cast<bool>( _isnan( static_cast<double>( v ) ) );
}
#elif HAVE_IEEE_COMPARISONS
template< class TVector >
template< class TVector >
/*static */
bool
bool
EuclideanDistanceWithMissingValue< TVector >
EuclideanDistanceWithMissingValue< TVector >
::IsMissingValue ( const ValueType & v)
::IsMissingValue ( const ValueType & v)
{
{
return
(v!=
v);
return
vnl_math_isnan(
v);
}
}
#else
template< class TVector >
/*static */
bool
EuclideanDistanceWithMissingValue< TVector >
::IsMissingValue ( const ValueType & v)
{
return static_cast<bool>( isnan(v) );
}
#endif
template< class TVector >
template< class TVector >
/* static */
void
void
EuclideanDistanceWithMissingValue< TVector >
EuclideanDistanceWithMissingValue< TVector >
::SetToMissingValue ( ValueType & v )
::SetToMissingValue ( ValueType & v )
{
{
//v = static_cast<ValueType>( 0.0/0.0 );
v = vcl_numeric_limits<ValueType>::quiet_NaN();
v = std::numeric_limits<ValueType>::quiet_NaN();
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment