triskele/include/CompAttribute.hpp
Git Merciol 300bfd965d modifié : MakefileNoOTB
modifié :         include/Appli/Option.hpp
	modifié :         include/ArrayTree/ArrayTreeBuilder.hpp
	modifié :         include/ArrayTree/ArrayTreeBuilder.tpp
	modifié :         include/AttributeProfiles.hpp
	modifié :         include/AttributeProfiles.tpp
	modifié :         include/Attributes/AreaAttributes.hpp
	modifié :         include/Attributes/AreaAttributes.tpp
	modifié :         include/Attributes/MoIAttributes.hpp
	modifié :         include/Attributes/MoIAttributes.tpp
	modifié :         include/Attributes/SDAttributes.hpp
	modifié :         include/Attributes/SDAttributes.tpp
	modifié :         include/CompAttribute.hpp
	modifié :         include/CompAttribute.tpp
	modifié :         src/Appli/Option.cpp
	modifié :         src/testMain.cpp
2018-02-20 16:39:24 +01:00

69 lines
1.9 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:
inline CompAttribute (const Tree &tree);
inline ~CompAttribute ();
inline void updateTranscient ();
inline const AttrT *getValues () const;
inline AttrT *getValues ();
inline AttrT getMaxValue () const;
inline void printValues (const string &msg) const;
protected:
const Tree &tree;
DimNodeId leafCount;
AttrT *values;
inline void free ();
inline void book (const DimImg &leafCount);
};
} // triskele
} // otb
#include "Attributes/WeightAttributes.hpp"
namespace otb {
namespace triskele {
template<typename AttrT>
class CompAttributeC : public CompAttribute<AttrT> {
public:
inline CompAttributeC (const Tree &tree);
inline ~CompAttributeC ();
static inline vector<AttrT> getScaledThresholds (const vector<double> &thresholds, const AttrT &maxValue);
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;
protected:
template<typename CumpFunctPSE>
inline void computeSameCompLevel (const CumpFunctPSE &cumpFunctPSE /* cumpFunctPSE (DimImg parentId)*/) const;
};
#include "CompAttribute.tpp"
} // triskele
} // otb
#endif // _OTB_TRISKELE_COMP_ATTRIBUTE_HPP