diff --git a/Code/OBIA/otbStatisticsAttributesLabelMapFilter.txx b/Code/OBIA/otbStatisticsAttributesLabelMapFilter.txx index 2518a7c9a58d3ec73b5afee192a61b59ca7d9525..031045545d503f176222d1542bd800c886f7956e 100644 --- a/Code/OBIA/otbStatisticsAttributesLabelMapFilter.txx +++ b/Code/OBIA/otbStatisticsAttributesLabelMapFilter.txx @@ -188,7 +188,7 @@ StatisticsAttributesLabelObjectFunctor<TLabelObject, TFeatureImage> if (!m_ReducedAttributeSet) { - double elongation = 0; + double elongation = std::numeric_limits<double>::quiet_NaN(); if (sum != 0) { // Normalize using the total mass @@ -257,6 +257,11 @@ StatisticsAttributesLabelObjectFunctor<TLabelObject, TFeatureImage> } } + + oss.str(""); + oss << "STATS::" << m_FeatureName << "::Elongation"; + lo->SetAttribute(oss.str().c_str(), (double) elongation); + oss.str(""); oss << "STATS::" << m_FeatureName << "::Minimum"; lo->SetAttribute(oss.str().c_str(), (double) min);