From 12ae43337ee479b293ab6e14e95c999f44ec21a9 Mon Sep 17 00:00:00 2001 From: Charles Peyrega <charles.peyrega@c-s.fr> Date: Wed, 29 Jan 2014 17:03:32 +0100 Subject: [PATCH] ENH: Rename EuclideanDistance as EuclideanDistanceMetric --- .../otbBoxAndWhiskerImageFilter.h | 4 +-- .../otbBoxAndWhiskerImageFilter.txx | 4 +-- .../otbDBOverlapDataNodeFeatureFunction.h | 2 +- .../otbDBOverlapDataNodeFeatureFunction.txx | 4 +-- ...EuclideanDistanceMetricWithMissingValue.h} | 26 +++++++++---------- ...ideanDistanceMetricWithMissingValuePow2.h} | 20 +++++++------- ...eanDistanceMetricWithMissingValuePow2.txx} | 16 ++++++------ .../otbFlexibleDistanceWithMissingValue.h | 12 ++++----- .../otbFlexibleDistanceWithMissingValue.txx | 2 +- Code/Common/otbDataNode.h | 4 +-- Code/Common/otbDataNode.txx | 4 +-- Code/Common/otbRectangle.h | 2 +- Code/Common/otbRectangle.txx | 6 ++--- ...rInterpolateDisplacementFieldGenerator.txx | 2 +- ...rInterpolateDisplacementFieldGenerator.txx | 2 +- .../otbPointSetToDisplacementFieldGenerator.h | 2 +- ...tbPointSetToDisplacementFieldGenerator.txx | 4 +-- Code/Learning/otbSOMWithMissingValue.h | 6 ++--- Code/Learning/otbSOMbasedImageFilter.h | 2 +- .../otbLabeledSampleLocalizationGenerator.h | 2 +- .../otbLabeledSampleLocalizationGenerator.txx | 4 +-- .../BayesianPluginClassifier.cxx | 2 +- .../EstimateAffineTransformationExample.cxx | 8 +++--- .../Patented/SIFTDisparityMapEstimation.cxx | 8 +++--- Testing/Code/BasicFilters/CMakeLists.txt | 14 +++++----- .../BasicFilters/otbBasicFiltersTests8.cxx | 4 +-- .../otbBoxAndWhiskerImageFilter.cxx | 4 +-- ...clideanDistanceMetricWithMissingValue.cxx} | 6 ++--- ...deanDistanceMetricWithMissingValueNew.cxx} | 6 ++--- .../otbKeyPointSetsMatchingFilterNew.cxx | 4 +-- .../otbGenericRSTransformGenericTest.cxx | 4 +-- .../otbRPCSolverAdapterTest.cxx | 6 ++--- 32 files changed, 98 insertions(+), 98 deletions(-) rename Code/BasicFilters/{otbEuclideanDistanceWithMissingValue.h => otbEuclideanDistanceMetricWithMissingValue.h} (73%) rename Code/BasicFilters/{otbEuclideanDistanceWithMissingValuePow2.h => otbEuclideanDistanceMetricWithMissingValuePow2.h} (82%) rename Code/BasicFilters/{otbEuclideanDistanceWithMissingValuePow2.txx => otbEuclideanDistanceMetricWithMissingValuePow2.txx} (83%) rename Testing/Code/BasicFilters/{otbEuclideanDistanceWithMissingValue.cxx => otbEuclideanDistanceMetricWithMissingValue.cxx} (87%) rename Testing/Code/BasicFilters/{otbEuclideanDistanceWithMissingValueNew.cxx => otbEuclideanDistanceMetricWithMissingValueNew.cxx} (80%) diff --git a/Code/BasicFilters/otbBoxAndWhiskerImageFilter.h b/Code/BasicFilters/otbBoxAndWhiskerImageFilter.h index f03a068c0d..c3650ab232 100644 --- a/Code/BasicFilters/otbBoxAndWhiskerImageFilter.h +++ b/Code/BasicFilters/otbBoxAndWhiskerImageFilter.h @@ -32,7 +32,7 @@ namespace otb { * This is appropriated to perform simple outlier detection over vector data. * The input image has to contain vector pixel through a VectorImage type. * When an outlier is detected, it is treated to as an missing value through the function - * \code otb::EuclideanDistanceWithMissingValue::SetToMissingValue() \endcode. + * \code otb::EuclideanDistanceMetricWithMissingValue::SetToMissingValue() \endcode. * * A component is considered to as a missing value when * \f$ \| x_i - \beta \left( x_{3/4} - x_{1/4} \right) \| > \| x_{1/2} \| \f$ @@ -40,7 +40,7 @@ namespace otb { * third quantile values. * * \ingroup Streamed - * \sa EuclideanDistanceWithMissingValue + * \sa EuclideanDistanceMetricWithMissingValue */ template <class TInputImage> class ITK_EXPORT BoxAndWhiskerImageFilter diff --git a/Code/BasicFilters/otbBoxAndWhiskerImageFilter.txx b/Code/BasicFilters/otbBoxAndWhiskerImageFilter.txx index 78b00e3363..9863ae1b2f 100644 --- a/Code/BasicFilters/otbBoxAndWhiskerImageFilter.txx +++ b/Code/BasicFilters/otbBoxAndWhiskerImageFilter.txx @@ -30,7 +30,7 @@ #include "itkProgressReporter.h" #include "otbBoxAndWhiskerImageFilter.h" -#include "otbEuclideanDistanceWithMissingValue.h" +#include "otbEuclideanDistanceMetricWithMissingValue.h" namespace otb { @@ -105,7 +105,7 @@ BoxAndWhiskerImageFilter <TInputImage> ::PerformBoxAndWhiskerDetection(const PixelType& pixel) { typedef std::vector<ValueType> VectorType; - typedef otb::Statistics::EuclideanDistanceWithMissingValue<PixelType> OutlierType; + typedef otb::Statistics::EuclideanDistanceMetricWithMissingValue<PixelType> OutlierType; unsigned int i; const unsigned int vectorSize = pixel.Size(); diff --git a/Code/BasicFilters/otbDBOverlapDataNodeFeatureFunction.h b/Code/BasicFilters/otbDBOverlapDataNodeFeatureFunction.h index 8b60c81128..f05d7d0352 100644 --- a/Code/BasicFilters/otbDBOverlapDataNodeFeatureFunction.h +++ b/Code/BasicFilters/otbDBOverlapDataNodeFeatureFunction.h @@ -79,7 +79,7 @@ public: itkSetMacro(DistanceThreshold, PrecisionType); /** Method to compute the distance of a point to a segment */ - double ComputeEuclideanDistanceToSegment(VertexType q1, VertexType q2, VertexType p) const; + double ComputeEuclideanDistanceMetricToSegment(VertexType q1, VertexType q2, VertexType p) const; protected: DBOverlapDataNodeFeatureFunction(); diff --git a/Code/BasicFilters/otbDBOverlapDataNodeFeatureFunction.txx b/Code/BasicFilters/otbDBOverlapDataNodeFeatureFunction.txx index d5b43c7786..cedd4fe944 100644 --- a/Code/BasicFilters/otbDBOverlapDataNodeFeatureFunction.txx +++ b/Code/BasicFilters/otbDBOverlapDataNodeFeatureFunction.txx @@ -53,7 +53,7 @@ DBOverlapDataNodeFeatureFunction<TCoordRep, TPrecision> template <class TCoordRep, class TPrecision> double DBOverlapDataNodeFeatureFunction<TCoordRep, TPrecision> -::ComputeEuclideanDistanceToSegment(VertexType q1, VertexType q2, VertexType p) const +::ComputeEuclideanDistanceMetricToSegment(VertexType q1, VertexType q2, VertexType p) const { // Length of the segment double l2 = q1.SquaredEuclideanDistanceTo(q2); @@ -102,7 +102,7 @@ DBOverlapDataNodeFeatureFunction<TCoordRep, TPrecision> while (j<node.GetLine()->GetVertexList()->Size()-1) { double dist; - dist = this->ComputeEuclideanDistanceToSegment(node.GetLine()->GetVertexList()->GetElement(j), + dist = this->ComputeEuclideanDistanceMetricToSegment(node.GetLine()->GetVertexList()->GetElement(j), node.GetLine()->GetVertexList()->GetElement(j+1), currentGeometry->GetPolygonExteriorRing()->GetVertexList()->GetElement(i)); //std::cout << "dist: " << dist << std::endl; diff --git a/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.h b/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValue.h similarity index 73% rename from Code/BasicFilters/otbEuclideanDistanceWithMissingValue.h rename to Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValue.h index 31b3eb3db4..62aa5bc8e2 100644 --- a/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.h +++ b/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValue.h @@ -18,19 +18,19 @@ =========================================================================*/ -#ifndef __otbEuclideanDistanceWithMissingValue_h -#define __otbEuclideanDistanceWithMissingValue_h +#ifndef __otbEuclideanDistanceMetricWithMissingValue_h +#define __otbEuclideanDistanceMetricWithMissingValue_h -#include "otbEuclideanDistanceWithMissingValuePow2.h" +#include "otbEuclideanDistanceMetricWithMissingValuePow2.h" namespace otb { namespace Statistics { -/** \class EuclideanDistanceWithMissingValue +/** \class EuclideanDistanceMetricWithMissingValue * \brief Euclidean distance function facing missing value. * - * This class is derived from EuclideanDistanceWithMissingValuePow2 class that handle the missing value + * This class is derived from EuclideanDistanceMetricWithMissingValuePow2 class that handle the missing value * functonnalities. Here, the square root is included in the evaluation... * * The class can be templated over any container that holds data elements, as @@ -39,16 +39,16 @@ namespace Statistics { * The only restriction is that elements have to support NaN values. * * \sa EuclideanDistanceMetric - * \sa EuclideanDistanceWithMissingValuePow2 + * \sa EuclideanDistanceMetricWithMissingValuePow2 */ template<class TVector> -class ITK_EXPORT EuclideanDistanceWithMissingValue : - public otb::Statistics::EuclideanDistanceWithMissingValuePow2<TVector> +class ITK_EXPORT EuclideanDistanceMetricWithMissingValue : + public otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2<TVector> { public: /** Standard "Self" typedef. */ - typedef EuclideanDistanceWithMissingValue Self; - typedef otb::Statistics::EuclideanDistanceWithMissingValuePow2<TVector> + typedef EuclideanDistanceMetricWithMissingValue Self; + typedef otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2<TVector> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; @@ -57,7 +57,7 @@ public: MeasurementVectorSizeType; /** Run-time type information (and related methods). */ - itkTypeMacro(EuclideanDistanceWithMissingValue, EuclideanDistanceWithMissingValuePow2); + itkTypeMacro(EuclideanDistanceMetricWithMissingValue, EuclideanDistanceMetricWithMissingValuePow2); /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -92,8 +92,8 @@ public: } protected: - EuclideanDistanceWithMissingValue() {} - virtual ~EuclideanDistanceWithMissingValue() {} + EuclideanDistanceMetricWithMissingValue() {} + virtual ~EuclideanDistanceMetricWithMissingValue() {} }; // end of class } // end namespace statistics diff --git a/Code/BasicFilters/otbEuclideanDistanceWithMissingValuePow2.h b/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValuePow2.h similarity index 82% rename from Code/BasicFilters/otbEuclideanDistanceWithMissingValuePow2.h rename to Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValuePow2.h index 1223f449b0..b716b6c60a 100644 --- a/Code/BasicFilters/otbEuclideanDistanceWithMissingValuePow2.h +++ b/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValuePow2.h @@ -18,8 +18,8 @@ =========================================================================*/ -#ifndef __otbEuclideanDistanceWithMissingValuePow2_h -#define __otbEuclideanDistanceWithMissingValuePow2_h +#ifndef __otbEuclideanDistanceMetricWithMissingValuePow2_h +#define __otbEuclideanDistanceMetricWithMissingValuePow2_h #include "itkEuclideanDistanceMetric.h" @@ -27,7 +27,7 @@ namespace otb { namespace Statistics { -/** \class EuclideanDistanceWithMissingValuePow2 +/** \class EuclideanDistanceMetricWithMissingValuePow2 * \brief Euclidean comparison distance function facing missing value. The square root is not performed in this class. * * This class is derived from EuclideanDistanceMetric class. In addition @@ -41,22 +41,22 @@ namespace Statistics { * The only restriction is that elements have to support NaN values. * * \sa EuclideanDistanceMetric - * \sa EuclideanDistanceWithMissingValue + * \sa EuclideanDistanceMetricWithMissingValue */ template<class TVector> -class ITK_EXPORT EuclideanDistanceWithMissingValuePow2 : +class ITK_EXPORT EuclideanDistanceMetricWithMissingValuePow2 : public itk::Statistics::EuclideanDistanceMetric<TVector> { public: /** Standard "Self" typedef. */ - typedef EuclideanDistanceWithMissingValuePow2 Self; + typedef EuclideanDistanceMetricWithMissingValuePow2 Self; typedef itk::Statistics::EuclideanDistanceMetric<TVector> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; typedef typename Superclass::MeasurementVectorSizeType MeasurementVectorSizeType; /** Run-time type information (and related methods). */ - itkTypeMacro(EuclideanDistanceWithMissingValuePow2, EuclideanDistanceMetric); + itkTypeMacro(EuclideanDistanceMetricWithMissingValuePow2, EuclideanDistanceMetric); /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -88,8 +88,8 @@ public: static void SetToMissingValue(ValueType& v); protected: - EuclideanDistanceWithMissingValuePow2() {} - virtual ~EuclideanDistanceWithMissingValuePow2() {} + EuclideanDistanceMetricWithMissingValuePow2() {} + virtual ~EuclideanDistanceMetricWithMissingValuePow2() {} }; // end of class } // end namespace statistics @@ -97,7 +97,7 @@ protected: } // end namespace otb #ifndef OTB_MANUAL_INSTANTIATION -#include "otbEuclideanDistanceWithMissingValuePow2.txx" +#include "otbEuclideanDistanceMetricWithMissingValuePow2.txx" #endif #endif diff --git a/Code/BasicFilters/otbEuclideanDistanceWithMissingValuePow2.txx b/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValuePow2.txx similarity index 83% rename from Code/BasicFilters/otbEuclideanDistanceWithMissingValuePow2.txx rename to Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValuePow2.txx index ffb2f227e1..18b7c18c35 100644 --- a/Code/BasicFilters/otbEuclideanDistanceWithMissingValuePow2.txx +++ b/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValuePow2.txx @@ -18,8 +18,8 @@ =========================================================================*/ -#ifndef __otbEuclideanDistanceWithMissingValuePow2_txx -#define __otbEuclideanDistanceWithMissingValuePow2_txx +#ifndef __otbEuclideanDistanceMetricWithMissingValuePow2_txx +#define __otbEuclideanDistanceMetricWithMissingValuePow2_txx #include "itkNumericTraits.h" #include "itkMeasurementVectorTraits.h" @@ -30,7 +30,7 @@ namespace Statistics { template<class TVector> inline double -EuclideanDistanceWithMissingValuePow2<TVector> +EuclideanDistanceMetricWithMissingValuePow2<TVector> ::Evaluate(const TVector& x1, const TVector& x2) const { if (itk::NumericTraits<TVector>::GetLength(x1) != @@ -55,7 +55,7 @@ EuclideanDistanceWithMissingValuePow2<TVector> template<class TVector> inline double -EuclideanDistanceWithMissingValuePow2<TVector> +EuclideanDistanceMetricWithMissingValuePow2<TVector> ::Evaluate(const TVector& x) const { MeasurementVectorSizeType @@ -65,7 +65,7 @@ EuclideanDistanceWithMissingValuePow2<TVector> itkExceptionMacro(<< "Please set the MeasurementVectorSize first"); } itk::Statistics::MeasurementVectorTraits::Assert(this->GetOrigin(), measurementVectorSize, - "EuclideanDistance::Evaluate Origin and input vector have different lengths"); + "EuclideanDistanceMetric::Evaluate Origin and input vector have different lengths"); double temp, distance = itk::NumericTraits<double>::Zero; @@ -83,7 +83,7 @@ EuclideanDistanceWithMissingValuePow2<TVector> template<class TVector> inline double -EuclideanDistanceWithMissingValuePow2<TVector> +EuclideanDistanceMetricWithMissingValuePow2<TVector> ::Evaluate(const ValueType& a, const ValueType& b) const { // FIXME throw NaN exception ?? @@ -96,7 +96,7 @@ EuclideanDistanceWithMissingValuePow2<TVector> template<class TVector> /*static */ bool -EuclideanDistanceWithMissingValuePow2<TVector> +EuclideanDistanceMetricWithMissingValuePow2<TVector> ::IsMissingValue(const ValueType& v) { return static_cast<bool>(vnl_math_isnan(static_cast<double>(v))); @@ -105,7 +105,7 @@ EuclideanDistanceWithMissingValuePow2<TVector> template<class TVector> /* static */ void -EuclideanDistanceWithMissingValuePow2<TVector> +EuclideanDistanceMetricWithMissingValuePow2<TVector> ::SetToMissingValue(ValueType& v) { v = std::numeric_limits<ValueType>::signaling_NaN(); diff --git a/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.h b/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.h index 23a8a08223..f954e159f7 100644 --- a/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.h +++ b/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.h @@ -21,7 +21,7 @@ #ifndef __otbFlexibleDistanceWithMissingValue_h #define __otbFlexibleDistanceWithMissingValue_h -#include "otbEuclideanDistanceWithMissingValuePow2.h" +#include "otbEuclideanDistanceMetricWithMissingValuePow2.h" namespace otb { @@ -30,7 +30,7 @@ namespace Statistics { /** \class FlexibleDistanceWithMissingValue * \brief Non-Euclidean distance function facing missing value. * - * This class is derived from EuclideanDistanceWithMissingValuePow2 class to + * This class is derived from EuclideanDistanceMetricWithMissingValuePow2 class to * deal with missing data. In addition, the initial Evaluate method performs * a flexible calculation of distance when a component does contain data. * @@ -44,23 +44,23 @@ namespace Statistics { * * The only restriction is that elements have to support \code NaN \endcode. * - * \sa EuclideanDistanceWithMissingValuePow2 + * \sa EuclideanDistanceMetricWithMissingValuePow2 */ template<class TVector> class ITK_EXPORT FlexibleDistanceWithMissingValue : - public otb::Statistics::EuclideanDistanceWithMissingValuePow2<TVector> + public otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2<TVector> { public: /** Standard "Self" typedef. */ typedef FlexibleDistanceWithMissingValue Self; - typedef otb::Statistics::EuclideanDistanceWithMissingValuePow2<TVector> Superclass; + typedef otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2<TVector> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; typedef typename Superclass::MeasurementVectorSizeType MeasurementVectorSizeType; /** Run-time type information (and related methods). */ - itkTypeMacro(FlexibleDistanceWithMissingValue, EuclideanDistanceWithMissingValuePow2); + itkTypeMacro(FlexibleDistanceWithMissingValue, EuclideanDistanceMetricWithMissingValuePow2); /** Method for creation through the object factory. */ itkNewMacro(Self); diff --git a/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.txx b/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.txx index ec63f4633e..c8b77afd35 100644 --- a/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.txx +++ b/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.txx @@ -70,7 +70,7 @@ FlexibleDistanceWithMissingValue<TVector> } itk::Statistics::MeasurementVectorTraits::Assert(this->GetOrigin(), measurementVectorSize, - "EuclideanDistance::Evaluate Origin and input vector have different lengths"); + "EuclideanDistanceMetric::Evaluate Origin and input vector have different lengths"); double temp, distance = itk::NumericTraits<double>::Zero; diff --git a/Code/Common/otbDataNode.h b/Code/Common/otbDataNode.h index 62fed30522..07ba9f2d1f 100644 --- a/Code/Common/otbDataNode.h +++ b/Code/Common/otbDataNode.h @@ -263,9 +263,9 @@ public: std::vector<std::string> GetFieldList() const; /** \return the distance to a point */ - double EuclideanDistance(const DataNode* node); + double EuclideanDistanceMetric(const DataNode* node); - double EuclideanDistance(const PointType point); + double EuclideanDistanceMetric(const PointType point); /** * \return true if the two datanodes intersects diff --git a/Code/Common/otbDataNode.txx b/Code/Common/otbDataNode.txx index 3b396fddfb..bda55ac30d 100644 --- a/Code/Common/otbDataNode.txx +++ b/Code/Common/otbDataNode.txx @@ -609,7 +609,7 @@ DataNode<TPrecision, VDimension, TValuePrecision> template <class TPrecision, unsigned int VDimension, class TValuePrecision> double DataNode<TPrecision, VDimension, TValuePrecision> -::EuclideanDistance(const DataNode* node) +::EuclideanDistanceMetric(const DataNode* node) { // Convert the nodes to OGRGeometries OGRGeometry * dstGeomtery = this->ConvertDataNodeToOGRGeometry(node); @@ -622,7 +622,7 @@ DataNode<TPrecision, VDimension, TValuePrecision> template <class TPrecision, unsigned int VDimension, class TValuePrecision> double DataNode<TPrecision, VDimension, TValuePrecision> -::EuclideanDistance(const PointType point) +::EuclideanDistanceMetric(const PointType point) { // Convert Point to point to ogrPoint OGRPoint ogrPointSrc; diff --git a/Code/Common/otbRectangle.h b/Code/Common/otbRectangle.h index 72581b6be0..e222d597b4 100644 --- a/Code/Common/otbRectangle.h +++ b/Code/Common/otbRectangle.h @@ -103,7 +103,7 @@ protected: virtual void PrintSelf(std::ostream& os, itk::Indent indent) const; /** */ - virtual double ComputeEuclideanDistanceToSegment(VertexType q1, VertexType q2, VertexType p) const; + virtual double ComputeEuclideanDistanceMetricToSegment(VertexType q1, VertexType q2, VertexType p) const; /** */ diff --git a/Code/Common/otbRectangle.txx b/Code/Common/otbRectangle.txx index dd500a2bee..c50a4b19e9 100644 --- a/Code/Common/otbRectangle.txx +++ b/Code/Common/otbRectangle.txx @@ -58,8 +58,8 @@ Rectangle<TValue> corner[1] = middleP[1] - (m_Width / 2) * vcl_cos(m_Orientation); /** Compute the distance to the orthogonal median of the rectangle*/ - if (this->ComputeEuclideanDistanceToSegment(p1, p2, point) - (m_Width / 2.) < 1e-10 - && this->ComputeEuclideanDistanceToSegment(middleP, corner, point) - (lengthSeg / 2.) < 1e-10) return true; + if (this->ComputeEuclideanDistanceMetricToSegment(p1, p2, point) - (m_Width / 2.) < 1e-10 + && this->ComputeEuclideanDistanceMetricToSegment(middleP, corner, point) - (lengthSeg / 2.) < 1e-10) return true; else return false; } @@ -69,7 +69,7 @@ Rectangle<TValue> template<class TValue> double Rectangle<TValue> -::ComputeEuclideanDistanceToSegment(VertexType q1, VertexType q2, VertexType p) const +::ComputeEuclideanDistanceMetricToSegment(VertexType q1, VertexType q2, VertexType p) const { double Xq1 = q1[0]; double Yq1 = q1[1]; diff --git a/Code/DisparityMap/otbNNearestPointsLinearInterpolateDisplacementFieldGenerator.txx b/Code/DisparityMap/otbNNearestPointsLinearInterpolateDisplacementFieldGenerator.txx index 628f2b5479..3c488e3c26 100644 --- a/Code/DisparityMap/otbNNearestPointsLinearInterpolateDisplacementFieldGenerator.txx +++ b/Code/DisparityMap/otbNNearestPointsLinearInterpolateDisplacementFieldGenerator.txx @@ -56,7 +56,7 @@ NNearestPointsLinearInterpolateDisplacementFieldGenerator<TPointSet, TDisplaceme PointType point; point[0] = static_cast<double>(this->GetPointSet()->GetPoints()->GetElement(*indexIt)[0]); point[1] = static_cast<double>(this->GetPointSet()->GetPoints()->GetElement(*indexIt)[1]); - double distance = this->EuclideanDistance(index, point); + double distance = this->EuclideanDistanceMetric(index, point); if (distance < EPSILON) { distance = EPSILON; diff --git a/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDisplacementFieldGenerator.txx b/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDisplacementFieldGenerator.txx index d55ac6cc7c..6df8ffdefe 100644 --- a/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDisplacementFieldGenerator.txx +++ b/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDisplacementFieldGenerator.txx @@ -56,7 +56,7 @@ NNearestTransformsLinearInterpolateDisplacementFieldGenerator<TPointSet, TDispla PointType point; point[0] = static_cast<double>(this->GetPointSet()->GetPoints()->GetElement(*indexIt)[0]); point[1] = static_cast<double>(this->GetPointSet()->GetPoints()->GetElement(*indexIt)[1]); - double distance = this->EuclideanDistance(index, point); + double distance = this->EuclideanDistanceMetric(index, point); if (distance < EPSILON) { distance = EPSILON; diff --git a/Code/DisparityMap/otbPointSetToDisplacementFieldGenerator.h b/Code/DisparityMap/otbPointSetToDisplacementFieldGenerator.h index a30bce33d0..04e2d6725c 100644 --- a/Code/DisparityMap/otbPointSetToDisplacementFieldGenerator.h +++ b/Code/DisparityMap/otbPointSetToDisplacementFieldGenerator.h @@ -132,7 +132,7 @@ protected: IndexVectorType GenerateNearestValidPointsPointSet(IndexType index, unsigned int n = 1); /** Euclidean distance of point to index */ - double EuclideanDistance(IndexType index, PointType p); + double EuclideanDistanceMetric(IndexType index, PointType p); private: PointSetToDisplacementFieldGenerator(const Self &); //purposely not implemented diff --git a/Code/DisparityMap/otbPointSetToDisplacementFieldGenerator.txx b/Code/DisparityMap/otbPointSetToDisplacementFieldGenerator.txx index 19b6b82d9e..31db3079ed 100644 --- a/Code/DisparityMap/otbPointSetToDisplacementFieldGenerator.txx +++ b/Code/DisparityMap/otbPointSetToDisplacementFieldGenerator.txx @@ -108,7 +108,7 @@ PointSetToDisplacementFieldGenerator<TPointSet, TDisplacementField> if (vcl_abs(this->GetPointSet()->GetPointData()->GetElement(j)[0]) >= m_MetricThreshold) { - distanceVector.push_back(EuclideanDistance(index, p)); + distanceVector.push_back(EuclideanDistanceMetric(index, p)); sortVector.push_back(i); indexVector.push_back(j); ++i; @@ -133,7 +133,7 @@ PointSetToDisplacementFieldGenerator<TPointSet, TDisplacementField> template <class TPointSet, class TDisplacementField> double PointSetToDisplacementFieldGenerator<TPointSet, TDisplacementField> -::EuclideanDistance(IndexType index, PointType p) +::EuclideanDistanceMetric(IndexType index, PointType p) { PointType pprime; // our point are expressed in index and not in physical coordinates diff --git a/Code/Learning/otbSOMWithMissingValue.h b/Code/Learning/otbSOMWithMissingValue.h index 5ddd8c81ef..47870321ab 100644 --- a/Code/Learning/otbSOMWithMissingValue.h +++ b/Code/Learning/otbSOMWithMissingValue.h @@ -29,16 +29,16 @@ namespace otb * \brief This class implements SOM training with missing value * * The distance between vectors that may have missing components is holded - * by the EuclideanDistanceWithMissingValue class in the SOMMap distance + * by the EuclideanDistanceMetricWithMissingValue class in the SOMMap distance * template. Nevertheless, this class re-implements the UpdateMap method to * adapt the evaluation of each component of the 'newNeuron' when dealing * with missing values. * - * TMap has to be templeted with EuclideanDistanceWithMissingValuePow2 + * TMap has to be templeted with EuclideanDistanceMetricWithMissingValuePow2 * * \sa SOMMap * \sa PeriodicSOM - * \sa EuclideanDistanceWithMissingValue + * \sa EuclideanDistanceMetricWithMissingValue */ template <class TListSample, class TMap, class TSOMLearningBehaviorFunctor = Functor::CzihoSOMLearningBehaviorFunctor, diff --git a/Code/Learning/otbSOMbasedImageFilter.h b/Code/Learning/otbSOMbasedImageFilter.h index b6b2472e2a..77d61dbe6c 100644 --- a/Code/Learning/otbSOMbasedImageFilter.h +++ b/Code/Learning/otbSOMbasedImageFilter.h @@ -92,7 +92,7 @@ private: * TMap is a template for the SOM that can be a simple VectorImage. * * \ingroup Streamed - * \sa EuclideanDistanceWithMissingValue + * \sa EuclideanDistanceMetricWithMissingValue */ template <class TInputImage, class TOutputImage, class TDistanceMetric, class TMap> diff --git a/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.h b/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.h index a7b241324e..b76a0b4e01 100644 --- a/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.h +++ b/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.h @@ -72,7 +72,7 @@ public: typedef itk::PreOrderTreeIterator<typename VectorDataType::DataTreeType> TreeIteratorType; typedef itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType; - typedef itk::Statistics::EuclideanDistanceMetric<PointType> EuclideanDistanceType; + typedef itk::Statistics::EuclideanDistanceMetric<PointType> EuclideanDistanceMetricType; /** Connects the VectorDatas from which the localizations are going to be extracted. */ void PushBackInput(const VectorDataType *); diff --git a/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.txx b/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.txx index e268e5dcd2..e97b24cc2a 100644 --- a/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.txx +++ b/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.txx @@ -107,7 +107,7 @@ LabeledSampleLocalizationGenerator<TVectorData> PointVectorType vPoint; // Euclidean distance - typename EuclideanDistanceType::Pointer euclideanDistance = EuclideanDistanceType::New(); + typename EuclideanDistanceMetricType::Pointer euclideanDistanceMetric = EuclideanDistanceMetricType::New(); // Gathering Information RegionType generatorRegion = node->GetPolygonExteriorRing()->GetBoundingRegion(); @@ -165,7 +165,7 @@ LabeledSampleLocalizationGenerator<TVectorData> while(valid && pit!=insiders.end()) { - valid = (euclideanDistance->Evaluate(candidate, *pit) > this->GetInhibitionRadius()); + valid = (euclideanDistanceMetric->Evaluate(candidate, *pit) > this->GetInhibitionRadius()); ++pit; } PointType point; diff --git a/Examples/Classification/BayesianPluginClassifier.cxx b/Examples/Classification/BayesianPluginClassifier.cxx index 5bcd9058f3..d30ad322d9 100644 --- a/Examples/Classification/BayesianPluginClassifier.cxx +++ b/Examples/Classification/BayesianPluginClassifier.cxx @@ -30,7 +30,7 @@ // differs with the previous k-means clustering algorithms in several // ways. The biggest difference is that this classifier uses the // \subdoxygen{itk}{Statistics}{itkGaussianMembershipFunction} as membership functions -// instead of the \subdoxygen{itk}{Statistics}{EuclideanDistance}. Since the +// instead of the \subdoxygen{itk}{Statistics}{EuclideanDistanceMetric}. Since the // membership function is different, the membership function requires a // different set of parameters, mean vectors and covariance matrices. We // choose the \subdoxygen{itk}{Statistics}{MeanSampleFilter} (sample mean) and the diff --git a/Examples/Patented/EstimateAffineTransformationExample.cxx b/Examples/Patented/EstimateAffineTransformationExample.cxx index eb5aa8f4a9..c138ab45ce 100644 --- a/Examples/Patented/EstimateAffineTransformationExample.cxx +++ b/Examples/Patented/EstimateAffineTransformationExample.cxx @@ -126,7 +126,7 @@ int main(int argc, char* argv[]) // Software Guide : BeginCodeSnippet typedef itk::Statistics::EuclideanDistanceMetric<RealVectorType> DistanceType; typedef otb::KeyPointSetsMatchingFilter<PointSetType, DistanceType> - EuclideanDistanceMatchingFilterType; + EuclideanDistanceMetricMatchingFilterType; // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // @@ -138,7 +138,7 @@ int main(int argc, char* argv[]) typedef PointSetType::PointType PointType; typedef std::pair<PointType, PointType> MatchType; typedef std::vector<MatchType> MatchVectorType; - typedef EuclideanDistanceMatchingFilterType::LandmarkListType + typedef EuclideanDistanceMetricMatchingFilterType::LandmarkListType LandmarkListType; typedef PointSetType::PointsContainer PointsContainerType; @@ -185,8 +185,8 @@ int main(int argc, char* argv[]) ImageToSIFTKeyPointSetFilterType::New(); ImageToSIFTKeyPointSetFilterType::Pointer filter2 = ImageToSIFTKeyPointSetFilterType::New(); - EuclideanDistanceMatchingFilterType::Pointer euclideanMatcher = - EuclideanDistanceMatchingFilterType::New(); + EuclideanDistanceMetricMatchingFilterType::Pointer euclideanMatcher = + EuclideanDistanceMetricMatchingFilterType::New(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // diff --git a/Examples/Patented/SIFTDisparityMapEstimation.cxx b/Examples/Patented/SIFTDisparityMapEstimation.cxx index 284d223626..cc7981e7a5 100644 --- a/Examples/Patented/SIFTDisparityMapEstimation.cxx +++ b/Examples/Patented/SIFTDisparityMapEstimation.cxx @@ -113,7 +113,7 @@ int main(int argc, char* argv[]) // Software Guide : BeginCodeSnippet typedef itk::Statistics::EuclideanDistanceMetric<RealVectorType> DistanceType; typedef otb::KeyPointSetsMatchingFilter<PointSetType, DistanceType> - EuclideanDistanceMatchingFilterType; + EuclideanDistanceMetricMatchingFilterType; // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // @@ -125,7 +125,7 @@ int main(int argc, char* argv[]) typedef PointSetType::PointType PointType; typedef std::pair<PointType, PointType> MatchType; typedef std::vector<MatchType> MatchVectorType; - typedef EuclideanDistanceMatchingFilterType::LandmarkListType + typedef EuclideanDistanceMetricMatchingFilterType::LandmarkListType LandmarkListType; typedef PointSetType::PointsContainer PointsContainerType; @@ -172,8 +172,8 @@ int main(int argc, char* argv[]) ImageToSIFTKeyPointSetFilterType::New(); ImageToSIFTKeyPointSetFilterType::Pointer filter2 = ImageToSIFTKeyPointSetFilterType::New(); - EuclideanDistanceMatchingFilterType::Pointer euclideanMatcher = - EuclideanDistanceMatchingFilterType::New(); + EuclideanDistanceMetricMatchingFilterType::Pointer euclideanMatcher = + EuclideanDistanceMetricMatchingFilterType::New(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // diff --git a/Testing/Code/BasicFilters/CMakeLists.txt b/Testing/Code/BasicFilters/CMakeLists.txt index 8d7b414d84..60a9e24a34 100644 --- a/Testing/Code/BasicFilters/CMakeLists.txt +++ b/Testing/Code/BasicFilters/CMakeLists.txt @@ -1062,13 +1062,13 @@ add_test(bfTvPhaseFunctorTest ${BASICFILTERS_TESTS7} 80 80 ) -# ------- otb::EuclideanDistanceWithMissingValue ---------------------------- +# ------- otb::EuclideanDistanceMetricWithMissingValue ---------------------------- - add_test(bfTuEuclideanDistanceWithMissingValueNew ${BASICFILTERS_TESTS8} - otbEuclideanDistanceWithMissingValueNew) + add_test(bfTuEuclideanDistanceMetricWithMissingValueNew ${BASICFILTERS_TESTS8} + otbEuclideanDistanceMetricWithMissingValueNew) - add_test(bfTvEuclideanDistanceWithMissingValue ${BASICFILTERS_TESTS8} - otbEuclideanDistanceWithMissingValue) + add_test(bfTvEuclideanDistanceMetricWithMissingValue ${BASICFILTERS_TESTS8} + otbEuclideanDistanceMetricWithMissingValue) # ------- otb::FlexibleDistanceWithMissingValue ---------------------------- @@ -3052,8 +3052,8 @@ otbLabelizeNeighborhoodConnectedImageFilterNew.cxx otbLabelizeNeighborhoodConnectedImageFilter.cxx otbLabelizeConfidenceConnectedImageFilterNew.cxx otbLabelizeConfidenceConnectedImageFilter.cxx -otbEuclideanDistanceWithMissingValueNew.cxx -otbEuclideanDistanceWithMissingValue.cxx +otbEuclideanDistanceMetricWithMissingValueNew.cxx +otbEuclideanDistanceMetricWithMissingValue.cxx otbConvolutionImageFilterNew.cxx otbConvolutionImageFilter.cxx otbScalarToRainbowRGBPixelFunctorNew.cxx diff --git a/Testing/Code/BasicFilters/otbBasicFiltersTests8.cxx b/Testing/Code/BasicFilters/otbBasicFiltersTests8.cxx index 5c08aa5393..d2c2e6ad75 100644 --- a/Testing/Code/BasicFilters/otbBasicFiltersTests8.cxx +++ b/Testing/Code/BasicFilters/otbBasicFiltersTests8.cxx @@ -30,8 +30,8 @@ void RegisterTests() REGISTER_TEST(otbLabelizeNeighborhoodConnectedImageFilter); REGISTER_TEST(otbLabelizeConfidenceConnectedImageFilterNew); REGISTER_TEST(otbLabelizeConfidenceConnectedImageFilter); - REGISTER_TEST(otbEuclideanDistanceWithMissingValueNew); - REGISTER_TEST(otbEuclideanDistanceWithMissingValue); + REGISTER_TEST(otbEuclideanDistanceMetricWithMissingValueNew); + REGISTER_TEST(otbEuclideanDistanceMetricWithMissingValue); REGISTER_TEST(otbConvolutionImageFilterNew); REGISTER_TEST(otbConvolutionImageFilter); REGISTER_TEST(otbScalarToRainbowRGBPixelFunctorNew); diff --git a/Testing/Code/BasicFilters/otbBoxAndWhiskerImageFilter.cxx b/Testing/Code/BasicFilters/otbBoxAndWhiskerImageFilter.cxx index fd900b2a16..cbefce7920 100644 --- a/Testing/Code/BasicFilters/otbBoxAndWhiskerImageFilter.cxx +++ b/Testing/Code/BasicFilters/otbBoxAndWhiskerImageFilter.cxx @@ -22,7 +22,7 @@ #include "otbImageFileReader.h" #include "otbImageFileWriter.h" #include "otbVectorImage.h" -#include "otbEuclideanDistanceWithMissingValuePow2.h" +#include "otbEuclideanDistanceMetricWithMissingValuePow2.h" #include "itkImageRegionConstIterator.h" #include "itkImageRegionIterator.h" @@ -59,7 +59,7 @@ int otbBoxAndWhiskerImageFilter(int argc, char * argv[]) reader->UpdateOutputInformation(); writer->SetFileName(outputFilename); - typedef otb::Statistics::EuclideanDistanceWithMissingValuePow2<ImageType::PixelType> OutlierType; + typedef otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2<ImageType::PixelType> OutlierType; filter->SetInput(reader->GetOutput()); filter->Update(); diff --git a/Testing/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.cxx b/Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValue.cxx similarity index 87% rename from Testing/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.cxx rename to Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValue.cxx index a70e838141..f556a8eb04 100644 --- a/Testing/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.cxx +++ b/Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValue.cxx @@ -21,13 +21,13 @@ #include <iostream> #include <cstdlib> #include "itkVariableLengthVector.h" -#include "otbEuclideanDistanceWithMissingValue.h" +#include "otbEuclideanDistanceMetricWithMissingValue.h" -int otbEuclideanDistanceWithMissingValue(int argc, char * argv[]) +int otbEuclideanDistanceMetricWithMissingValue(int argc, char * argv[]) { typedef itk::VariableLengthVector<double> VectorType; - typedef otb::Statistics::EuclideanDistanceWithMissingValue<VectorType> DistanceType; + typedef otb::Statistics::EuclideanDistanceMetricWithMissingValue<VectorType> DistanceType; DistanceType::Pointer dist = DistanceType::New(); diff --git a/Testing/Code/BasicFilters/otbEuclideanDistanceWithMissingValueNew.cxx b/Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValueNew.cxx similarity index 80% rename from Testing/Code/BasicFilters/otbEuclideanDistanceWithMissingValueNew.cxx rename to Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValueNew.cxx index 7325443b23..4e4a2c3ecc 100644 --- a/Testing/Code/BasicFilters/otbEuclideanDistanceWithMissingValueNew.cxx +++ b/Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValueNew.cxx @@ -21,13 +21,13 @@ #include <iostream> #include <cstdlib> #include "itkVariableLengthVector.h" -#include "otbEuclideanDistanceWithMissingValue.h" +#include "otbEuclideanDistanceMetricWithMissingValue.h" -int otbEuclideanDistanceWithMissingValueNew(int argc, char * argv[]) +int otbEuclideanDistanceMetricWithMissingValueNew(int argc, char * argv[]) { typedef itk::VariableLengthVector<double> VectorType; - typedef otb::Statistics::EuclideanDistanceWithMissingValue<VectorType> DistanceType; + typedef otb::Statistics::EuclideanDistanceMetricWithMissingValue<VectorType> DistanceType; DistanceType::Pointer dist = DistanceType::New(); diff --git a/Testing/Code/FeatureExtraction/otbKeyPointSetsMatchingFilterNew.cxx b/Testing/Code/FeatureExtraction/otbKeyPointSetsMatchingFilterNew.cxx index dae63f23a6..2ead8fdde0 100644 --- a/Testing/Code/FeatureExtraction/otbKeyPointSetsMatchingFilterNew.cxx +++ b/Testing/Code/FeatureExtraction/otbKeyPointSetsMatchingFilterNew.cxx @@ -26,10 +26,10 @@ int otbKeyPointSetsMatchingFilterNew(int argc, char * argv[]) typedef itk::VariableLengthVector<RealType> RealVectorType; typedef itk::PointSet<RealVectorType, Dimension> PointSetType; - typedef otb::KeyPointSetsMatchingFilter<PointSetType> EuclideanDistanceMatchingFilterType; + typedef otb::KeyPointSetsMatchingFilter<PointSetType> EuclideanDistanceMetricMatchingFilterType; // Instantiating object - EuclideanDistanceMatchingFilterType::Pointer filter = EuclideanDistanceMatchingFilterType::New(); + EuclideanDistanceMetricMatchingFilterType::Pointer filter = EuclideanDistanceMetricMatchingFilterType::New(); std::cout << filter << std::endl; diff --git a/Testing/Code/Projections/otbGenericRSTransformGenericTest.cxx b/Testing/Code/Projections/otbGenericRSTransformGenericTest.cxx index 8c663cc578..bfd5747761 100644 --- a/Testing/Code/Projections/otbGenericRSTransformGenericTest.cxx +++ b/Testing/Code/Projections/otbGenericRSTransformGenericTest.cxx @@ -27,7 +27,7 @@ typedef otb::Image<unsigned short> ImageType; typedef otb::ImageFileReader<ImageType> ReaderType; typedef ImageType::PointType PointType; typedef otb::GenericRSTransform<> TransformType; -typedef itk::Statistics::EuclideanDistanceMetric<PointType> PointEuclideanDistanceType; +typedef itk::Statistics::EuclideanDistanceMetric<PointType> PointEuclideanDistanceMetricType; typedef otb::GeographicalDistance<PointType> GeographicalDistanceType; int otbGenericRSTransformGenericTest(int argc, char * argv[]) @@ -187,7 +187,7 @@ int otbGenericRSTransformGenericTest(int argc, char * argv[]) std::cout<<std::endl; // Build metrics - PointEuclideanDistanceType::Pointer physDistance = PointEuclideanDistanceType::New(); + PointEuclideanDistanceMetricType::Pointer physDistance = PointEuclideanDistanceMetricType::New(); GeographicalDistanceType::Pointer geoDistance = GeographicalDistanceType::New(); // Check precision on output diff --git a/Testing/Code/UtilitiesAdapters/otbRPCSolverAdapterTest.cxx b/Testing/Code/UtilitiesAdapters/otbRPCSolverAdapterTest.cxx index 708d3d91bb..5f4af28fbf 100644 --- a/Testing/Code/UtilitiesAdapters/otbRPCSolverAdapterTest.cxx +++ b/Testing/Code/UtilitiesAdapters/otbRPCSolverAdapterTest.cxx @@ -31,7 +31,7 @@ typedef otb::GenericRSTransform<> RSTranformType; typedef otb::RPCSolverAdapter::Point2DType Point2DType; typedef otb::RPCSolverAdapter::Point3DType Point3DType; typedef otb::GenericRSTransform<double,3,3> RSTranform3dType; -typedef itk::Statistics::EuclideanDistanceMetric<Point2DType> EuclideanDistanceType; +typedef itk::Statistics::EuclideanDistanceMetric<Point2DType> EuclideanDistanceMetricType; typedef otb::GeographicalDistance<Point2DType> GeoDistanceType; int otbRPCSolverAdapterTest(int argc, char* argv[]) @@ -125,7 +125,7 @@ int otbRPCSolverAdapterTest(int argc, char* argv[]) rpcInvTransform->SetOutputKeywordList(rpcKwl); rpcInvTransform->InstanciateTransform(); - EuclideanDistanceType::Pointer euclideanDistance = EuclideanDistanceType::New(); + EuclideanDistanceMetricType::Pointer euclideanDistanceMetric = EuclideanDistanceMetricType::New(); GeoDistanceType::Pointer geoDistance = GeoDistanceType::New(); bool fail = false; @@ -160,7 +160,7 @@ int otbRPCSolverAdapterTest(int argc, char* argv[]) // Check inverse transform imgPoint = rpcInvTransform->TransformPoint(groundPoint2dRef); - double imgRes = euclideanDistance->Evaluate(imgPoint,it->first); + double imgRes = euclideanDistanceMetric->Evaluate(imgPoint,it->first); if(imgRes>imgTol) { -- GitLab