#ifndef _OTB_TRISKELE_ATTRIBUTE_PROFILES_TPP #define _OTB_TRISKELE_ATTRIBUTE_PROFILES_TPP template inline AttributeProfiles::AttributeProfiles (const Tree &tree) : tree (tree), leafCount (0), values () { updateTranscient (); } template inline AttributeProfiles::~AttributeProfiles () { free (); } template inline void AttributeProfiles::updateTranscient () { book (tree.getLeafCount ()); } template inline PixelT * AttributeProfiles::getValues () { return &values[0]; } template inline const PixelT * AttributeProfiles::getValues () const { return &values[0]; } template inline void AttributeProfiles::free () { values = vector (); } template inline void AttributeProfiles::book (const DimImg &leafCount) { this->leafCount = leafCount; // XXX max : leafCount*2-1 values.resize (leafCount*2); } // ======================================== template ostream & AttributeProfiles::print (ostream &out) const { const Size doubleSize (tree.getSize().width, 2*tree.getSize ().height); out << "AP" << endl << printMap (&values[0], doubleSize, tree.getNodeCount ()) << endl << endl; } #endif // _OTB_TRISKELE_ATTRIBUTE_PROFILES_TPP