modifié : include/Attributes/AreaAttributes.hpp

modifié :         include/Attributes/AreaAttributes.tpp
	modifié :         include/Attributes/WeightAttributes.hpp
	modifié :         src/testMain.cpp
This commit is contained in:
Git Merciol 2018-02-18 20:22:24 +01:00
parent 9a76443603
commit 9e41428cc7
4 changed files with 19 additions and 7 deletions

View File

@ -7,10 +7,13 @@
namespace otb { namespace otb {
namespace triskele { namespace triskele {
class AreaAttributes : public CompAttribute<double> { template<typename WeightT>
class AreaAttributes : public CompAttributeC<double> {
public: public:
inline AreaAttributes (const Tree &tree); inline AreaAttributes (const Tree &tree, const WeightAttributes<WeightT> &weightAttributes, const unsigned int &treeCoreCount);
inline ~AreaAttributes (); inline ~AreaAttributes ();
protected:
inline void compute (const WeightAttributes<WeightT> &weightAttributes);
}; };
#include "AreaAttributes.tpp" #include "AreaAttributes.tpp"

View File

@ -1,13 +1,22 @@
#ifndef _OTB_TRISKELE_AREA_ATTRIBUTES_TPP #ifndef _OTB_TRISKELE_AREA_ATTRIBUTES_TPP
#define _OTB_TRISKELE_AREA_ATTRIBUTES_TPP #define _OTB_TRISKELE_AREA_ATTRIBUTES_TPP
template<typename WeightT>
inline inline
AreaAttributes::AreaAttributes (const Tree &tree) AreaAttributes<WeightT>::AreaAttributes (const Tree &tree, const WeightAttributes<WeightT> &weightAttributes, const unsigned int &treeCoreCount)
: CompAttribute<double> (tree) { : CompAttributeC<double> (tree, treeCoreCount) {
compute (weightAttributes);
} }
template<typename WeightT>
inline inline
AreaAttributes::~AreaAttributes () { AreaAttributes<WeightT>::~AreaAttributes () {
}
template<typename WeightT>
inline void
AreaAttributes<WeightT>::compute (const WeightAttributes<WeightT> &weightAttributes) {
// XXX
} }
#endif // _OTB_TRISKELE_AREA_ATTRIBUTES_TPP #endif // _OTB_TRISKELE_AREA_ATTRIBUTES_TPP

View File

@ -1,8 +1,8 @@
#include "CompAttribute.hpp"
#ifndef _OTB_TRISKELE_WEIGHT_ATTRIBUTES_HPP #ifndef _OTB_TRISKELE_WEIGHT_ATTRIBUTES_HPP
#define _OTB_TRISKELE_WEIGHT_ATTRIBUTES_HPP #define _OTB_TRISKELE_WEIGHT_ATTRIBUTES_HPP
#include "triskeleBase.hpp" #include "triskeleBase.hpp"
#include "CompAttribute.hpp"
namespace otb { namespace otb {
namespace triskele { namespace triskele {

View File

@ -43,7 +43,7 @@ void prog (const Option &option) {
AttributeProfiles<PixelT> attributeProfiles (tree); AttributeProfiles<PixelT> attributeProfiles (tree);
atb.setAttributProfiles (attributeProfiles, raster); atb.setAttributProfiles (attributeProfiles, raster);
AreaAttributes areaAttributes (tree); // XXX <DimImg> option.treeCoreCount AreaAttributes<PixelT> areaAttributes (tree, weightAttributes, option.treeCoreCount);
// AverageAttributs<PixelT> averageAttributs (tree, raster); // AverageAttributs<PixelT> averageAttributs (tree, raster);
// SDAttributs sdAttributs (tree, areaAttributs); // XXX<double> // SDAttributs sdAttributs (tree, areaAttributs); // XXX<double>
// XYAttributs xyAttributs (tree, areaAttributs); // XXX<double> // XYAttributs xyAttributs (tree, areaAttributs); // XXX<double>