
modifié : include/ArrayTree/ArrayTreeBuilder.tpp modifié : include/ArrayTree/Border.hpp modifié : include/ArrayTree/GraphWalker.tpp modifié : include/ArrayTree/Leader.hpp modifié : include/ArrayTree/Leader.tpp modifié : include/ArrayTree/Weight.hpp modifié : include/ArrayTree/Weight.tpp modifié : include/ArrayTree/triskeleArrayTreeBase.hpp modifié : include/ArrayTree/triskeleArrayTreeBase.tpp modifié : include/IImage.hpp modifié : include/IImage.tpp modifié : include/Tree.hpp modifié : include/Tree.tpp modifié : include/TreeBuilder.hpp modifié : include/XMLTree/XMLTreeBuilder.hpp modifié : include/triskeleBase.hpp modifié : include/triskeleDealThreads.hpp modifié : include/triskeleDealThreads.tpp modifié : include/triskeleDebug.hpp modifié : include/triskeleGdalGetType.hpp nouveau fichier : src/IImage.cpp modifié : src/QuadTree/QuadTreeBuilder.cpp modifié : src/Tree.cpp modifié : src/testMain.cpp modifié : src/triskeleDebug.cpp
78 lines
2.4 KiB
C++
78 lines
2.4 KiB
C++
#ifndef _OTB_TRISKELE_BASE_HPP
|
|
#define _OTB_TRISKELE_BASE_HPP
|
|
|
|
#include <iostream>
|
|
#include <iomanip>
|
|
#include <algorithm>
|
|
#include <functional>
|
|
#include <cstdint>
|
|
|
|
#define DimImg_MAX UINT32_MAX
|
|
|
|
namespace triskele {
|
|
|
|
/*! Image band type */
|
|
typedef uint16_t DimChanel; // hyperspectral > 256
|
|
|
|
/*! Image size type */
|
|
typedef uint32_t DimSideImg;
|
|
|
|
/*! Number of pixels */
|
|
typedef uint32_t DimImg;
|
|
|
|
/*! Number of nodes */
|
|
typedef uint32_t DimNodeId;
|
|
|
|
/*! Compte le nombre de bits utilisés pour chaque nombre : bitCount[nombre] = nombre de bits*/
|
|
extern int bitCount[];
|
|
|
|
struct Point {
|
|
DimSideImg x, y;
|
|
inline Point ();
|
|
inline Point (const DimSideImg &abs, const DimSideImg &ord);
|
|
};
|
|
inline bool operator== (const Point &p1, const Point &p2);
|
|
inline std::ostream &operator << (std::ostream &out, const Point &p);
|
|
extern Point NullPoint;
|
|
|
|
struct Size {
|
|
DimSideImg width, height;
|
|
inline Size ();
|
|
inline Size (const DimSideImg &w, const DimSideImg &h);
|
|
};
|
|
inline bool operator== (const Size &s1, const Size &s2);
|
|
inline std::ostream &operator << (std::ostream &out, const Size &s);
|
|
extern Size NullSize;
|
|
|
|
inline DimImg pointToId (const Size &size, const Point &p);
|
|
inline Point idToPoint (const Size &size, const DimImg &id);
|
|
|
|
struct Rect {
|
|
DimSideImg x, y, width, height;
|
|
inline Rect ();
|
|
inline Rect (const Rect &rect);
|
|
inline Rect (const Point &orig, const Size &size);
|
|
inline Rect (const DimSideImg &abs, const DimSideImg &ord, const DimSideImg &w, const DimSideImg &h);
|
|
};
|
|
inline bool operator== (const Rect &r1, const Rect &r2);
|
|
inline std::ostream &operator << (std::ostream &out, const Rect &r);
|
|
extern Rect NullRect;
|
|
|
|
/*! Convertit un point d'un tableau (on peut imaginer une image à 2 dimension) en un index */
|
|
inline DimImg point2idx (const Size &size, const Point &p);
|
|
|
|
/*! Convertit un index d'un tableau (on peut imaginer une image à 2 dimension) en point correspondant à des coordonnées */
|
|
inline Point idx2point (const Size &size, const DimImg &idx);
|
|
|
|
static const DimSideImg printMapMaxSide = 20;
|
|
|
|
/*! Affiche le contenu d'un tableau en spécifiant sa taille */
|
|
template <typename DimImg>
|
|
inline std::ostream &printMap (std::ostream &out, const DimImg *map, const Size &size, DimNodeId maxValues);
|
|
|
|
#include "triskeleBase.tpp"
|
|
|
|
} // namespace triskele
|
|
|
|
#endif // _OTB_TRISKELE_BASE_HPP
|