#ifndef _OTB_TRISKELE_AREA_ATTRIBUTES_TPP #define _OTB_TRISKELE_AREA_ATTRIBUTES_TPP inline AreaAttributes::AreaAttributes (const Tree &tree) : CompAttributeC (tree) { compute (); } inline AreaAttributes::~AreaAttributes () { } template inline void AreaAttributes::cut (vector > &allBands, const AttributeProfiles &attributeProfiles, const vector &thresholds) const { CompAttributeC::cut (allBands, attributeProfiles, 1, thresholds); } inline void AreaAttributes::compute () { 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; }); } #endif // _OTB_TRISKELE_AREA_ATTRIBUTES_TPP