#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: static inline vector getScaledThresholds (const vector &thresholds, const AttrT &maxValue); static inline vector getConvertedThresholds (const vector &thresholds); inline CompAttribute (const Tree &tree, const bool &decr = false); inline ~CompAttribute (); inline void updateTranscient (); inline const AttrT *getValues () const; inline AttrT *getValues (); inline AttrT getMaxValue () const; inline bool getDecr () const; 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; virtual inline ostream &print (ostream &out) const { print (out, ""); return out; } protected: const Tree &tree; DimNodeId leafCount; vector values; bool decr; inline void free (); inline void book (const DimImg &leafCount); template inline void computeSameCompLevel (const CumpFunctPSE &cumpFunctPSE /* cumpFunctPSE (DimImg parentId)*/) const; ostream &print (ostream &out, const string &msg) const; friend ostream &operator << (ostream& out, const CompAttribute &ca) { return ca.print (out); return out; } }; } // triskele } // otb #include "Attributes/WeightAttributes.hpp" namespace otb { namespace triskele { #include "CompAttribute.tpp" } // triskele } // otb #endif // _OTB_TRISKELE_COMP_ATTRIBUTE_HPP