#ifndef _OTB_TRISKELE_TREE_BUILDER_HPP #define _OTB_TRISKELE_TREE_BUILDER_HPP #include "triskeleBase.hpp" #include "Tree.hpp" namespace otb { namespace triskele { class TreeBuilder { public: static inline void buildTree (Tree &tree, TreeBuilder &builder); static inline void buildTree (Tree &tree, TreeBuilder &&builder); virtual inline void buildTree (Tree &tree); protected: // Used to set the attributes below with the tree inline void setTreeSize (Tree &tree, const Size &size); inline void getTranscient (Tree &tree); inline DimImg getCompCount () const; inline void setNodeCount (Tree &tree, DimNodeId nodeCount); // Attributes corresponding to the tree, used to make the construction easier DimImg leafCount; DimNodeId nodeCount; /*! Pointers on the parents of each leafs / nodes */ DimImg *leafParents, *compParents; /*! Pointers on the children and count how many children a parents have */ DimNodeId *children, *childrenStart; // XXX compWeights ??? }; #include "TreeBuilder.tpp" } // triskele } // otb #endif // _OTB_TRISKELE_TREE_BUILDER_HPP