
modifié : include/Attributes/AreaAttributes.hpp modifié : include/Attributes/AreaAttributes.tpp modifié : include/Attributes/AverageAttributes.hpp modifié : include/Attributes/AverageAttributes.tpp modifié : include/Attributes/MoIAttributes.hpp modifié : include/Attributes/MoIAttributes.tpp modifié : include/Attributes/SDAttributes.hpp modifié : include/Attributes/SDAttributes.tpp modifié : include/Attributes/WeightAttributes.hpp modifié : include/Attributes/WeightAttributes.tpp modifié : include/Attributes/XYAttributes.hpp modifié : include/Attributes/XYAttributes.tpp modifié : include/CompAttribute.hpp modifié : include/CompAttribute.tpp modifié : include/triskeleDealThreads.tpp modifié : src/Appli/Option.cpp modifié : src/IImage.cpp modifié : src/apGenerator.cpp
64 lines
2.0 KiB
C++
64 lines
2.0 KiB
C++
#ifndef _OTB_TRISKELE_COMP_ATTRIBUTE_HPP
|
|
#define _OTB_TRISKELE_COMP_ATTRIBUTE_HPP
|
|
|
|
#include <vector>
|
|
|
|
#include "triskeleDebug.hpp"
|
|
#include "triskeleBase.hpp"
|
|
#include "Tree.hpp"
|
|
#include "AttributeProfiles.hpp"
|
|
|
|
namespace otb {
|
|
namespace triskele {
|
|
|
|
template<typename AttrT>
|
|
class CompAttribute {
|
|
public:
|
|
static inline vector<AttrT> getScaledThresholds (const vector<double> &thresholds, const AttrT &maxValue);
|
|
static inline vector<AttrT> getConvertedThresholds (const vector<double> &thresholds);
|
|
|
|
inline CompAttribute (const Tree &tree);
|
|
inline ~CompAttribute ();
|
|
|
|
inline void updateTranscient ();
|
|
inline const AttrT *getValues () const;
|
|
inline AttrT *getValues ();
|
|
inline AttrT getMaxValue () const;
|
|
|
|
template<typename PixelT>
|
|
inline void cut (vector<vector<PixelT> > &allBands, const AttributeProfiles<PixelT> &attributeProfiles,
|
|
const AttrT &pixelAttrValue, const vector<AttrT> &thresholds) const;
|
|
|
|
template<typename PixelT>
|
|
inline void cutOnPos (vector<vector<PixelT> > &allBands, const AttributeProfiles<PixelT> &attributeProfiles,
|
|
const DimImg &pixelId, const AttrT &pixelAttrValue, const vector<AttrT> &thresholds) const;
|
|
|
|
virtual inline ostream &print (ostream &out) const { print (out, ""); return out; }
|
|
|
|
protected:
|
|
const Tree &tree;
|
|
DimNodeId leafCount;
|
|
vector<AttrT> values;
|
|
|
|
inline void free ();
|
|
inline void book (const DimImg &leafCount);
|
|
|
|
template<typename CumpFunctPSE>
|
|
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
|