#ifndef _OTB_TRISKELE_TREE_STATS_HPP #define _OTB_TRISKELE_TREE_STATS_HPP #include #include #include #include #include #include #include #include #include "ArrayTree/triskeleArrayTreeBase.hpp" namespace otb { namespace triskele { using namespace otb::triskele::arrayTree; using namespace std; namespace ba = boost::accumulators; typedef ba::accumulator_set > TreeStatsDim; typedef ba::accumulator_set > TreeStatsDouble; enum statsIdxType { buildTreeStats, areaStats, averageStats, xyStats, moiStats, sdStats, filteringStats, copyImageStats, readStats, writeStats, allStats, statsIdxTypeCount }; class TreeStats { public : //void reset (); inline void addDim (const treeType &type, const DimImg& leafCount, const DimImg& compCount); inline void addTime (const statsIdxType &type, const double &duration); ostream &printDim (ostream &out); ostream &printTime (ostream &out); private : ostream &printDim (ostream &out, const TreeStatsDim stats[], const string &msg); TreeStatsDim leavesStats[treeTypeCount], compStats[treeTypeCount]; TreeStatsDouble timeStats[statsIdxTypeCount]; }; static TreeStats globalTreeStats; #include "TreeStats.tpp" } // triskele } // otb #endif // _OTB_TRISKELE_TREE_HPP