#ifndef _OTB_TRISKELE_AREA_ATTRIBUTES_TPP #define _OTB_TRISKELE_AREA_ATTRIBUTES_TPP using namespace boost::chrono; inline AreaAttributes::AreaAttributes (const Tree &tree) : CompAttribute (tree) { compute (); } inline AreaAttributes::~AreaAttributes () { } template inline void AreaAttributes::cut (vector > &allBands, const AttributeProfiles &attributeProfiles, const vector &thresholds) const { auto start = high_resolution_clock::now (); CompAttribute::cut (allBands, attributeProfiles, 1, thresholds); globalTreeStats.addTime (filteringStats, duration_cast > (high_resolution_clock::now ()-start).count ()); } inline void AreaAttributes::compute () { auto start = high_resolution_clock::now (); computeSameCompLevel ([this] (const DimImg &parentId) { DimImg area = 0; tree.forEachChildTI (parentId, [this, &area] (const bool &isLeaf, const DimImg &childId) { area += isLeaf ? 1 : CompAttribute::values [childId]; }); CompAttribute::values [parentId] = area; }); globalTreeStats.addTime (areaStats, duration_cast > (high_resolution_clock::now ()-start).count ()); } #endif // _OTB_TRISKELE_AREA_ATTRIBUTES_TPP