43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#ifndef _OTB_TRISKELE_ATTRIBUTE_PROFILES_HPP
|
|
#define _OTB_TRISKELE_ATTRIBUTE_PROFILES_HPP
|
|
|
|
#include "Tree.hpp"
|
|
|
|
namespace otb {
|
|
namespace triskele {
|
|
|
|
template<typename PixelT>
|
|
class AttributeProfiles {
|
|
public:
|
|
inline AttributeProfiles (const Tree &tree);
|
|
inline ~AttributeProfiles ();
|
|
|
|
inline void updateTranscient ();
|
|
inline PixelT *getValues ();
|
|
inline const PixelT *getValues () const;
|
|
|
|
template<typename WeightT>
|
|
inline void setValues (const PixelT defaultValue, const WeightT *weights);
|
|
|
|
template<typename WeightT>
|
|
inline void setValues (const PixelT *pixels, const WeightT *weights);
|
|
|
|
protected:
|
|
const Tree &tree;
|
|
DimNodeId leafCount;
|
|
vector<PixelT> values;
|
|
|
|
inline void free ();
|
|
inline void book (const DimImg &leafCount);
|
|
|
|
ostream &print (ostream &out) const;
|
|
friend ostream &operator << (ostream& out, const AttributeProfiles &ap) { return ap.print (out); }
|
|
};
|
|
|
|
|
|
#include "AttributeProfiles.tpp"
|
|
} // triskele
|
|
} // otb
|
|
|
|
#endif // _OTB_TRISKELE_ATTRIBUTE_PROFILES_HPP
|