#ifndef _OTB_TRISKELE_COMP_ATTRIBUTE_HPP #define _OTB_TRISKELE_COMP_ATTRIBUTE_HPP #include #include "triskeleDebug.hpp" #include "triskeleBase.hpp" #include "Tree.hpp" #include "AttributeProfiles.hpp" namespace otb { namespace triskele { template class CompAttribute { public: inline CompAttribute (const Tree &tree); inline ~CompAttribute (); inline void updateTranscient (); inline const AttrT *getValues () const; inline AttrT *getValues (); inline AttrT getMaxValue () const; virtual inline ostream &print (ostream &out) const { print (out, ""); } protected: const Tree &tree; DimNodeId leafCount; vector values; inline void free (); inline void book (const DimImg &leafCount); ostream &print (ostream &out, const string &msg) const; friend ostream &operator << (ostream& out, const CompAttribute &ca) { return ca.print (out); } }; } // triskele } // otb #include "Attributes/WeightAttributes.hpp" namespace otb { namespace triskele { template class CompAttributeC : public CompAttribute { public: inline CompAttributeC (const Tree &tree); inline ~CompAttributeC (); static inline vector getScaledThresholds (const vector &thresholds, const AttrT &maxValue); template inline void cut (vector > &allBands, const AttributeProfiles &attributeProfiles, const AttrT &pixelAttrValue, const vector &thresholds) const; template inline void cutOnPos (vector > &allBands, const AttributeProfiles &attributeProfiles, const DimImg &pixelId, const AttrT &pixelAttrValue, const vector &thresholds) const; protected: template inline void computeSameCompLevel (const CumpFunctPSE &cumpFunctPSE /* cumpFunctPSE (DimImg parentId)*/) const; }; #include "CompAttribute.tpp" } // triskele } // otb #endif // _OTB_TRISKELE_COMP_ATTRIBUTE_HPP