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/WeightAttributes.hpp modifié : include/Attributes/WeightAttributes.tpp modifié : include/Tree.hpp modifié : include/Tree.tpp modifié : include/triskeleBase.tpp modifié : src/Tree.cpp modifié : src/XMLTree/XMLTreeBuilder.cpp modifié : src/testMain.cpp
This commit is contained in:
parent
9e41428cc7
commit
869eda6449
@ -50,6 +50,7 @@ ArrayTreeBuilder<WeightT, PixelT>::buildTree (Tree &tree, WeightAttributes<Weigh
|
|||||||
break;
|
break;
|
||||||
// XXX msg
|
// XXX msg
|
||||||
}
|
}
|
||||||
|
weightAttributes.setWeightBounds (tree);
|
||||||
leaders.free ();
|
leaders.free ();
|
||||||
newCompId = nullptr;
|
newCompId = nullptr;
|
||||||
buildChildren ();
|
buildChildren ();
|
||||||
|
@ -14,6 +14,7 @@ namespace otb {
|
|||||||
|
|
||||||
inline void updateTranscient ();
|
inline void updateTranscient ();
|
||||||
inline PixelT *getValues ();
|
inline PixelT *getValues ();
|
||||||
|
inline void printValues () const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const Tree &tree;
|
const Tree &tree;
|
||||||
|
@ -28,6 +28,14 @@ AttributeProfiles<PixelT>::getValues () {
|
|||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename PixelT>
|
||||||
|
inline void
|
||||||
|
AttributeProfiles<PixelT>::printValues () const {
|
||||||
|
cout << "AP" << endl;
|
||||||
|
const Size doubleSize (tree.getSize().width, 2*tree.getSize ().height);
|
||||||
|
printMap (cout, values, doubleSize, tree.getNodeCount ()) << endl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
template<typename PixelT>
|
template<typename PixelT>
|
||||||
inline void
|
inline void
|
||||||
AttributeProfiles<PixelT>::free () {
|
AttributeProfiles<PixelT>::free () {
|
||||||
|
@ -7,13 +7,12 @@
|
|||||||
namespace otb {
|
namespace otb {
|
||||||
namespace triskele {
|
namespace triskele {
|
||||||
|
|
||||||
template<typename WeightT>
|
class AreaAttributes : public CompAttributeC<DimImg> {
|
||||||
class AreaAttributes : public CompAttributeC<double> {
|
|
||||||
public:
|
public:
|
||||||
inline AreaAttributes (const Tree &tree, const WeightAttributes<WeightT> &weightAttributes, const unsigned int &treeCoreCount);
|
inline AreaAttributes (const Tree &tree, const unsigned int &treeCoreCount);
|
||||||
inline ~AreaAttributes ();
|
inline ~AreaAttributes ();
|
||||||
protected:
|
protected:
|
||||||
inline void compute (const WeightAttributes<WeightT> &weightAttributes);
|
inline void compute ();
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "AreaAttributes.tpp"
|
#include "AreaAttributes.tpp"
|
||||||
|
@ -1,22 +1,25 @@
|
|||||||
#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<WeightT>::AreaAttributes (const Tree &tree, const WeightAttributes<WeightT> &weightAttributes, const unsigned int &treeCoreCount)
|
AreaAttributes::AreaAttributes (const Tree &tree, const unsigned int &treeCoreCount)
|
||||||
: CompAttributeC<double> (tree, treeCoreCount) {
|
: CompAttributeC<DimImg> (tree, treeCoreCount) {
|
||||||
compute (weightAttributes);
|
compute ();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename WeightT>
|
|
||||||
inline
|
inline
|
||||||
AreaAttributes<WeightT>::~AreaAttributes () {
|
AreaAttributes::~AreaAttributes () {
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename WeightT>
|
|
||||||
inline void
|
inline void
|
||||||
AreaAttributes<WeightT>::compute (const WeightAttributes<WeightT> &weightAttributes) {
|
AreaAttributes::compute () {
|
||||||
// XXX
|
computeSameCompLevel ([this] (const DimImg &parentId) {
|
||||||
|
DimImg area = 0;
|
||||||
|
tree.forEachChildTI (parentId, [this, &area] (const bool &isLeaf, const DimImg &childId) {
|
||||||
|
area += isLeaf ? 1 : CompAttribute<DimImg>::values [childId];
|
||||||
|
});
|
||||||
|
CompAttribute<DimImg>::values [parentId] = area;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _OTB_TRISKELE_AREA_ATTRIBUTES_TPP
|
#endif // _OTB_TRISKELE_AREA_ATTRIBUTES_TPP
|
||||||
|
@ -13,6 +13,8 @@ namespace otb {
|
|||||||
public:
|
public:
|
||||||
inline WeightAttributes (const Tree &tree);
|
inline WeightAttributes (const Tree &tree);
|
||||||
inline ~WeightAttributes ();
|
inline ~WeightAttributes ();
|
||||||
|
|
||||||
|
inline void setWeightBounds (Tree &tree);
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "WeightAttributes.tpp"
|
#include "WeightAttributes.tpp"
|
||||||
|
@ -12,4 +12,31 @@ inline
|
|||||||
WeightAttributes<WeightT>::~WeightAttributes () {
|
WeightAttributes<WeightT>::~WeightAttributes () {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename WeightT>
|
||||||
|
inline void
|
||||||
|
WeightAttributes<WeightT>::setWeightBounds (Tree &tree) {
|
||||||
|
vector<DimImg> &weightBounds (tree.getWeightBounds ());
|
||||||
|
DimImg rootId = tree.getCompRoot ();
|
||||||
|
|
||||||
|
DimImg stepsCard = 0;
|
||||||
|
WeightT curLevel = CompAttribute<WeightT>::values [0];
|
||||||
|
for (DimImg compId = 1; compId <= rootId; ++compId) {
|
||||||
|
if (CompAttribute<WeightT>::values [compId] == curLevel)
|
||||||
|
continue;
|
||||||
|
++stepsCard;
|
||||||
|
curLevel = CompAttribute<WeightT>::values [compId];
|
||||||
|
}
|
||||||
|
weightBounds.clear ();
|
||||||
|
weightBounds.reserve (stepsCard+1);
|
||||||
|
weightBounds.push_back (0);
|
||||||
|
curLevel = CompAttribute<WeightT>::values [0];
|
||||||
|
for (DimImg compId = 1; compId <= rootId; ++compId) {
|
||||||
|
if (CompAttribute<WeightT>::values [compId] == curLevel)
|
||||||
|
continue;
|
||||||
|
weightBounds.push_back (compId);
|
||||||
|
curLevel = CompAttribute<WeightT>::values [compId];
|
||||||
|
}
|
||||||
|
weightBounds.push_back (rootId+1);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // _OTB_TRISKELE_WEIGHT_ATTRIBUTES_TPP
|
#endif // _OTB_TRISKELE_WEIGHT_ATTRIBUTES_TPP
|
||||||
|
@ -30,13 +30,19 @@ namespace otb {
|
|||||||
Size size;
|
Size size;
|
||||||
|
|
||||||
/*! Number of pixels / leaf */
|
/*! Number of pixels / leaf */
|
||||||
DimNodeId leafCount, nodeCount;
|
DimImg leafCount;
|
||||||
|
/*! number of node */
|
||||||
|
DimNodeId nodeCount; /* nodeCount = leafCount+compCount */
|
||||||
|
|
||||||
/*! Pointers on the parents of each leafs / nodes */
|
/*! Pointers on the parents of each leafs / nodes */
|
||||||
DimNodeId *leafParents, *compParents;
|
DimImg *leafParents, *compParents;
|
||||||
|
|
||||||
/*! Pointers on the children and count how many children a parents have */
|
/*! Pointers on the children and count how many children a parents have */
|
||||||
DimNodeId *children, *childCount;
|
DimImg *childCount;
|
||||||
|
DimNodeId *children;
|
||||||
|
|
||||||
|
/*! Pointers of same weight in parents (+1 : last is root)*/
|
||||||
|
vector<DimImg> weightBounds;
|
||||||
|
|
||||||
/*! State of the tree */
|
/*! State of the tree */
|
||||||
State state;
|
State state;
|
||||||
@ -68,26 +74,34 @@ namespace otb {
|
|||||||
inline Size getSize () const;
|
inline Size getSize () const;
|
||||||
|
|
||||||
// Getters for tree structure
|
// Getters for tree structure
|
||||||
inline DimNodeId getRoot () const;
|
inline const DimImg &getLeafCount () const;
|
||||||
inline DimNodeId getAbsRoot () const;
|
inline const DimNodeId &getNodeCount () const;
|
||||||
inline DimNodeId getCompCount () const;
|
inline DimImg getCompCount () const;
|
||||||
|
inline DimNodeId getNodeRoot () const;
|
||||||
|
inline DimImg getCompRoot () const;
|
||||||
|
|
||||||
inline const DimNodeId &getParent (const DimNodeId &idx) const;
|
inline const DimImg &getParent (const DimNodeId &nodeId) const;
|
||||||
inline const DimNodeId &getLeafParent (const DimNodeId &idx) const;
|
inline const DimImg &getLeafParent (const DimImg &leafId) const;
|
||||||
inline const DimNodeId &getCompParent (const DimNodeId &idx) const;
|
inline const DimImg &getCompParent (const DimImg &compId) const;
|
||||||
inline const DimNodeId &getChildrenCount (const DimImg &idx) const;
|
|
||||||
inline const DimSideImg &getLeafCount () const;
|
inline const DimImg &getChildrenCount (const DimImg &CompId) const;
|
||||||
inline const DimSideImg &getNodeCount () const;
|
inline const DimNodeId &getChildren (const DimImg &childId) const;
|
||||||
|
inline const DimNodeId *getChildren () const; // XXX a virer ?
|
||||||
|
|
||||||
|
inline const vector<DimImg> &getWeightBounds () const;
|
||||||
|
inline vector<DimImg> &getWeightBounds ();
|
||||||
|
|
||||||
// Functions to apply to specific entities
|
// Functions to apply to specific entities
|
||||||
template<typename FuncToApply>
|
template<typename FuncToApply>
|
||||||
void forEachLeaf (const FuncToApply &f /* f (DimNodeId leafId) */) const;
|
void forEachLeaf (const FuncToApply &f /* f (DimImg leafId) */) const;
|
||||||
|
|
||||||
template<typename FuncToApply>
|
template<typename FuncToApply>
|
||||||
inline void forEachComp (const FuncToApply &f /* f (DimNodeId compId) */) const;
|
inline void forEachComp (const FuncToApply &f /* f (DimImg compId) */) const;
|
||||||
|
|
||||||
template<typename FuncToApply>
|
template<typename FuncToApply>
|
||||||
inline void forEachChild (const DimNodeId &parentId, const FuncToApply &f /* f (DimNodeId childId) */) const;
|
inline void forEachChild (const DimNodeId &parentId, const FuncToApply &f /* f (DimNodeId childId) */) const;
|
||||||
|
template<typename FuncToApply>
|
||||||
|
inline void forEachChildTI (const DimNodeId &parentId, const FuncToApply &f /* f (bool isLeaf, DimImg childId) */) const;
|
||||||
|
|
||||||
#ifdef ENABLE_LOG
|
#ifdef ENABLE_LOG
|
||||||
// Print info about the tree
|
// Print info about the tree
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef _OTB_TRISKELE_TREE_TPP
|
#ifndef _OTB_TRISKELE_TREE_TPP
|
||||||
#define _OTB_TRISKELE_TREE_TPP
|
#define _OTB_TRISKELE_TREE_TPP
|
||||||
|
|
||||||
|
// ========================================
|
||||||
inline DimNodeId *
|
inline DimNodeId *
|
||||||
Tree::getChildCount () {
|
Tree::getChildCount () {
|
||||||
return childCount;
|
return childCount;
|
||||||
@ -25,56 +26,74 @@ Tree::getSize () const {
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline DimNodeId
|
|
||||||
Tree::getRoot () const {
|
|
||||||
return nodeCount-1;
|
|
||||||
}
|
|
||||||
inline DimNodeId
|
|
||||||
Tree::getAbsRoot () const {
|
|
||||||
return nodeCount-1+leafCount;
|
|
||||||
}
|
|
||||||
inline DimNodeId
|
|
||||||
Tree::getCompCount () const {
|
|
||||||
return nodeCount-leafCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const DimNodeId &
|
|
||||||
Tree::getParent (const DimNodeId &idx) const {
|
|
||||||
return leafParents[idx];
|
|
||||||
}
|
|
||||||
inline const DimNodeId &
|
|
||||||
Tree::getLeafParent (const DimNodeId &idx) const {
|
|
||||||
return leafParents[idx];
|
|
||||||
}
|
|
||||||
inline const DimNodeId &
|
|
||||||
Tree::getCompParent (const DimNodeId &idx) const {
|
|
||||||
return compParents[idx];
|
|
||||||
}
|
|
||||||
inline const DimNodeId &
|
|
||||||
Tree::getChildrenCount (const DimImg &idx) const {
|
|
||||||
return childCount[idx];
|
|
||||||
}
|
|
||||||
inline const DimSideImg &
|
inline const DimSideImg &
|
||||||
Tree::getLeafCount () const {
|
Tree::getLeafCount () const {
|
||||||
return leafCount;
|
return leafCount;
|
||||||
}
|
}
|
||||||
inline const DimSideImg &
|
inline const DimNodeId &
|
||||||
Tree::getNodeCount () const {
|
Tree::getNodeCount () const {
|
||||||
return nodeCount;
|
return nodeCount;
|
||||||
}
|
}
|
||||||
|
inline DimImg
|
||||||
|
Tree::getCompCount () const {
|
||||||
|
return (DimImg) (nodeCount-leafCount);
|
||||||
|
}
|
||||||
|
inline DimNodeId
|
||||||
|
Tree::getNodeRoot () const {
|
||||||
|
return nodeCount-1;
|
||||||
|
}
|
||||||
|
inline DimImg
|
||||||
|
Tree::getCompRoot () const {
|
||||||
|
return (DimImg) (nodeCount-1-leafCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const DimImg &
|
||||||
|
Tree::getParent (const DimNodeId &nodeId) const {
|
||||||
|
return leafParents[nodeId];
|
||||||
|
}
|
||||||
|
inline const DimImg &
|
||||||
|
Tree::getLeafParent (const DimImg &leafId) const {
|
||||||
|
return leafParents[leafId];
|
||||||
|
}
|
||||||
|
inline const DimImg &
|
||||||
|
Tree::getCompParent (const DimImg &compId) const {
|
||||||
|
return compParents[compId];
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const DimImg &
|
||||||
|
Tree::getChildrenCount (const DimImg &compId) const {
|
||||||
|
return childCount[compId];
|
||||||
|
}
|
||||||
|
inline const DimNodeId &
|
||||||
|
Tree::getChildren (const DimImg &childId) const {
|
||||||
|
return children[childId];
|
||||||
|
}
|
||||||
|
inline const DimNodeId *
|
||||||
|
Tree::getChildren () const {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const vector<DimImg> &
|
||||||
|
Tree::getWeightBounds () const {
|
||||||
|
return weightBounds;
|
||||||
|
}
|
||||||
|
inline vector<DimImg> &
|
||||||
|
Tree::getWeightBounds () {
|
||||||
|
return weightBounds;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========================================
|
||||||
template<typename FuncToApply>
|
template<typename FuncToApply>
|
||||||
inline void
|
inline void
|
||||||
Tree::forEachLeaf (const FuncToApply &f /* f (DimNodeId leafId) */) const {
|
Tree::forEachLeaf (const FuncToApply &f /* f (DimImg leafId) */) const {
|
||||||
for (DimNodeId leafId = 0; leafId < leafCount; ++leafId)
|
for (DimImg leafId = 0; leafId < leafCount; ++leafId)
|
||||||
f (leafId);
|
f (leafId);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename FuncToApply>
|
template<typename FuncToApply>
|
||||||
inline void
|
inline void
|
||||||
Tree::forEachComp (const FuncToApply &f /* f (DimNodeId compId) */) const {
|
Tree::forEachComp (const FuncToApply &f /* f (DimImg compId) */) const {
|
||||||
DimNodeId compCount = nodeCount - leafCount;
|
const DimNodeId compCount = getCompCount ();
|
||||||
for (DimNodeId compId = 0; compId < compCount; ++compId)
|
for (DimNodeId compId = 0; compId < compCount; ++compId)
|
||||||
f (compId);
|
f (compId);
|
||||||
}
|
}
|
||||||
@ -86,5 +105,15 @@ Tree::forEachChild (const DimNodeId &parentId, const FuncToApply &f /* f (DimNod
|
|||||||
for (DimNodeId childId = minChild; childId < maxChild; ++childId)
|
for (DimNodeId childId = minChild; childId < maxChild; ++childId)
|
||||||
f (children[childId]);
|
f (children[childId]);
|
||||||
}
|
}
|
||||||
|
template<typename FuncToApply>
|
||||||
|
inline void
|
||||||
|
Tree::forEachChildTI (const DimNodeId &parentId, const FuncToApply &f /* f (bool isLeaf, DimImg childId) */) const {
|
||||||
|
DimNodeId minChild = childCount[parentId], maxChild = childCount[parentId+1];
|
||||||
|
for (DimNodeId childId = minChild; childId < maxChild; ++childId) {
|
||||||
|
const DimNodeId &child (getChildren (childId));
|
||||||
|
const bool isLeaf = child < leafCount;
|
||||||
|
f (isLeaf, isLeaf ? (DimImg) child : (DimImg) (child-leafCount));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif // _OTB_TRISKELE_TREE_TPP
|
#endif // _OTB_TRISKELE_TREE_TPP
|
||||||
|
@ -108,9 +108,9 @@ idx2point (const Size &size, const DimImg &idx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename DimImg>
|
template <typename T>
|
||||||
inline std::ostream &
|
inline std::ostream &
|
||||||
printMap (std::ostream &out, const DimImg *map, const Size &size, DimNodeId maxValues) {
|
printMap (std::ostream &out, const T *map, const Size &size, DimNodeId maxValues) {
|
||||||
if (size.width > printMapMaxSide || size.height > printMapMaxSide) {
|
if (size.width > printMapMaxSide || size.height > printMapMaxSide) {
|
||||||
return out << "map too big to print!" << std::endl;
|
return out << "map too big to print!" << std::endl;
|
||||||
}
|
}
|
||||||
@ -121,9 +121,9 @@ printMap (std::ostream &out, const DimImg *map, const Size &size, DimNodeId maxV
|
|||||||
if (!maxValues)
|
if (!maxValues)
|
||||||
return out;
|
return out;
|
||||||
if (*map == DimImg_MAX)
|
if (*map == DimImg_MAX)
|
||||||
out << " M";
|
out << " M ";
|
||||||
else
|
else
|
||||||
out << std::setw(3) << *map;
|
out << std::setw(3) << ((double) *map) << " ";
|
||||||
}
|
}
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ Tree::clear () {
|
|||||||
fill_n (children, (leafCount-1)*2, 0);
|
fill_n (children, (leafCount-1)*2, 0);
|
||||||
fill_n (childCount, leafCount+1, 0);
|
fill_n (childCount, leafCount+1, 0);
|
||||||
#endif
|
#endif
|
||||||
|
weightBounds.resize (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -57,6 +58,7 @@ Tree::free () {
|
|||||||
if (childCount)
|
if (childCount)
|
||||||
delete[] childCount;
|
delete[] childCount;
|
||||||
children = childCount = nullptr;
|
children = childCount = nullptr;
|
||||||
|
weightBounds.resize (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -81,7 +81,7 @@ XMLTreeBuilder::exportToFile (const Tree &tree, const std::string &fileName) {
|
|||||||
treeNode->SetAttribute ("height", tree.getSize ().height);
|
treeNode->SetAttribute ("height", tree.getSize ().height);
|
||||||
|
|
||||||
// Construct the tree
|
// Construct the tree
|
||||||
writeNodeChildren (tree, tree.getAbsRoot (), treeNode);
|
writeNodeChildren (tree, tree.getNodeRoot (), treeNode);
|
||||||
doc.SaveFile (fileName.c_str ());
|
doc.SaveFile (fileName.c_str ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,9 @@
|
|||||||
#include "Attributes/WeightAttributes.hpp"
|
#include "Attributes/WeightAttributes.hpp"
|
||||||
#include "AttributeProfiles.hpp"
|
#include "AttributeProfiles.hpp"
|
||||||
#include "Attributes/AreaAttributes.hpp"
|
#include "Attributes/AreaAttributes.hpp"
|
||||||
|
#include "Attributes/AverageAttributes.hpp"
|
||||||
|
#include "Attributes/SDAttributes.hpp"
|
||||||
|
#include "Attributes/XYAttributes.hpp"
|
||||||
|
|
||||||
//using namespace triskele;
|
//using namespace triskele;
|
||||||
using namespace otb::triskele;
|
using namespace otb::triskele;
|
||||||
@ -32,25 +35,30 @@ void prog (const Option &option) {
|
|||||||
Raster<PixelT> raster;
|
Raster<PixelT> raster;
|
||||||
option.inputImage.readBand (raster, option.chanel, option.topLeft, option.size);
|
option.inputImage.readBand (raster, option.chanel, option.topLeft, option.size);
|
||||||
|
|
||||||
Border border;
|
Border border; // default = no border
|
||||||
GraphWalker graphWalker (raster.getSize (), border);
|
GraphWalker graphWalker (raster.getSize (), border);
|
||||||
ArrayTreeBuilder<PixelT, PixelT> atb (option.treeCoreCount, raster, graphWalker, TreeType::MAX);
|
ArrayTreeBuilder<PixelT, PixelT> atb (option.treeCoreCount, raster, graphWalker, TreeType::MAX);
|
||||||
Tree tree;
|
Tree tree;
|
||||||
WeightAttributes<PixelT> weightAttributes (tree);
|
WeightAttributes<PixelT> weightAttributes (tree);
|
||||||
atb.buildTree (tree, weightAttributes);
|
atb.buildTree (tree, weightAttributes);
|
||||||
|
weightAttributes.printValues ("weight");
|
||||||
|
|
||||||
// XXX buildAttr
|
|
||||||
AttributeProfiles<PixelT> attributeProfiles (tree);
|
AttributeProfiles<PixelT> attributeProfiles (tree);
|
||||||
atb.setAttributProfiles (attributeProfiles, raster);
|
atb.setAttributProfiles (attributeProfiles, raster);
|
||||||
|
attributeProfiles.printValues ();
|
||||||
|
|
||||||
AreaAttributes<PixelT> areaAttributes (tree, weightAttributes, option.treeCoreCount);
|
AreaAttributes areaAttributes (tree, option.treeCoreCount);
|
||||||
// AverageAttributs<PixelT> averageAttributs (tree, raster);
|
areaAttributes.printValues ("area");
|
||||||
// SDAttributs sdAttributs (tree, areaAttributs); // XXX<double>
|
AverageAttributes averageAttributes (tree, raster, areaAttributes, option.treeCoreCount);
|
||||||
// XYAttributs xyAttributs (tree, areaAttributs); // XXX<double>
|
averageAttributes.printValues ("average");
|
||||||
// MoIAttributs moiAttributs (tree, xyAttributs); // XXX<double>
|
SDAttributes sdAttributes (tree, areaAttributes, option.treeCoreCount);
|
||||||
|
sdAttributes.printValues ("sd");
|
||||||
|
XYAttributes xyAttributes (tree, areaAttributes, option.treeCoreCount);
|
||||||
|
//xyAttributes.printValues ("XY"); // pb print de complexe
|
||||||
|
// MoIAttributes moiAttributes (tree, xyAttributes); // XXX<double>
|
||||||
|
|
||||||
// XXX cut
|
// XXX cut
|
||||||
// attribut.cut (out, attributProfiles, threshold)
|
// attribute.cut (out, attributProfiles, threshold)
|
||||||
|
|
||||||
// XXX write
|
// XXX write
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user