triskele/include/CompAttribute.hpp
Git Merciol 3d46f792d6 modifié : include/ArrayTree/ArrayTreeBuilder.hpp
modifié :         include/ArrayTree/ArrayTreeBuilder.tpp
	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/XYAttributes.hpp
	modifié :         include/Attributes/XYAttributes.tpp
	modifié :         include/CompAttribute.hpp
	modifié :         include/CompAttribute.tpp
	modifié :         include/IImage.hpp
	modifié :         include/IImage.tpp
	modifié :         include/Tree.hpp
	modifié :         include/Tree.tpp
	modifié :         src/Tree.cpp
	modifié :         src/testMain.cpp
2018-02-19 19:28:52 +01:00

72 lines
2.0 KiB
C++

#ifndef _OTB_TRISKELE_COMP_ATTRIBUTE_HPP
#define _OTB_TRISKELE_COMP_ATTRIBUTE_HPP
#include <vector>
#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 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>
struct ThresholdsChanel {
AttrT threshold;
DimChanel chanel;
ThresholdsChanel (const AttrT &threshold, const DimChanel &chanel) : threshold (threshold), chanel (chanel) {}
};
template<typename AttrT>
class CompAttributeC : public CompAttribute<AttrT> {
public:
inline CompAttributeC (const Tree &tree);
inline ~CompAttributeC ();
template<typename PixelT>
inline void cut (vector<vector<PixelT> > allBands, const AttributeProfiles<PixelT> &attributeProfiles,
const AttrT &pixelAttrValue, const vector<const ThresholdsChanel<AttrT> > &selection);
template<typename PixelT>
inline void cutOnPos (vector<vector<PixelT> > allBands, const AttributeProfiles<PixelT> &attributeProfiles,
const DimImg &pixelId, const AttrT &pixelAttrValue, const vector<const ThresholdsChanel<AttrT> > &selection);
protected:
template<typename CumpFunctPSE>
inline void computeSameCompLevel (const CumpFunctPSE &cumpFunctPSE /* cumpFunctPSE (DimImg parentId)*/);
};
#include "CompAttribute.tpp"
} // triskele
} // otb
#endif // _OTB_TRISKELE_COMP_ATTRIBUTE_HPP