#ifndef _OTB_TRISKELE_AREA_ATTRIBUTES_TPP #define _OTB_TRISKELE_AREA_ATTRIBUTES_TPP inline AreaAttributes::AreaAttributes (const Tree &tree) : CompAttributeC (tree) { compute (); } inline AreaAttributes::~AreaAttributes () { } 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