#ifndef _OTB_TRISKELE_XY_ATTRIBUTES_HPP #define _OTB_TRISKELE_XY_ATTRIBUTES_HPP #include #include "triskeleBase.hpp" #include "CompAttribute.hpp" #include "Attributes/AreaAttributes.hpp" namespace otb { namespace triskele { using namespace ::triskele; /*! Fonction non monotonne. */ struct AverageXY { double x, y; inline AverageXY () : x(0), y(0) {} friend ostream &operator << (ostream& out, const AverageXY &xy) { return out << "(" << xy.x << ", " << xy.y << ")"; return out; } operator DimImg () const { return (DimImg) (x*y); } }; class XYAttributes : public CompAttribute { public: inline XYAttributes (const Tree &tree, const AreaAttributes &areaAttributes); inline ~XYAttributes (); virtual inline ostream &print (ostream &out) const { CompAttribute::print (out, "xy"); return out; } protected: inline void compute (const AreaAttributes &areaAttributes); }; #include "XYAttributes.tpp" } // triskele } // otb #endif // _OTB_TRISKELE_XY_ATTRIBUTES_HPP