2016-05-17 03:04:11 +12:00
|
|
|
#pragma once
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
#ifndef T_RASTER_INCLUDED
|
|
|
|
#define T_RASTER_INCLUDED
|
|
|
|
|
|
|
|
#include "tutil.h"
|
|
|
|
#include "tgeometry.h"
|
|
|
|
#include "tpixel.h"
|
|
|
|
#include "tpixelgr.h"
|
|
|
|
#include "tsmartpointer.h"
|
|
|
|
#include "tbigmemorymanager.h"
|
|
|
|
|
|
|
|
#undef DVAPI
|
|
|
|
#undef DVVAR
|
|
|
|
#ifdef TRASTER_EXPORTS
|
|
|
|
#define DVAPI DV_EXPORT_API
|
|
|
|
#define DVVAR DV_EXPORT_VAR
|
|
|
|
#else
|
|
|
|
#define DVAPI DV_IMPORT_API
|
|
|
|
#define DVVAR DV_IMPORT_VAR
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
class DVAPI TRasterType {
|
|
|
|
int m_id;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
/*
|
2016-03-19 06:57:51 +13:00
|
|
|
public:
|
2016-06-15 18:43:10 +12:00
|
|
|
enum Type {
|
|
|
|
None,
|
|
|
|
BW,
|
|
|
|
WB,
|
|
|
|
RGBM32, // LPIXEL, matte channel considered
|
|
|
|
RGBM64, // SPIXEL, matte channel considered
|
|
|
|
CM8, // color-mapped, 8 bits
|
|
|
|
GR8, // grey tones, 8 bits
|
|
|
|
CM16, // color-mapped, 16 bits
|
|
|
|
GR16, // grey tones, 16 bits
|
|
|
|
RGB555,
|
|
|
|
RGB565,
|
|
|
|
CM24, // cmapped, 8+8+8 bits (ink, paint, ramp), +8 bits spare
|
|
|
|
(MSB)
|
|
|
|
CM16S12,
|
|
|
|
CM16S8 // cmapped, 16 bits, standard SGI 256-color colormap
|
|
|
|
// ....
|
|
|
|
};
|
2016-03-19 06:57:51 +13:00
|
|
|
*/
|
|
|
|
|
|
|
|
public:
|
2016-06-15 18:43:10 +12:00
|
|
|
TRasterType(int id) : m_id(id){};
|
|
|
|
int getId() const { return m_id; };
|
|
|
|
bool operator==(TRasterType a) { return m_id == a.m_id; };
|
|
|
|
bool operator!=(TRasterType a) { return m_id != a.m_id; };
|
2016-03-19 06:57:51 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
|
|
|
|
// forward declaration
|
|
|
|
template <class T>
|
|
|
|
class TRasterPT;
|
|
|
|
class TRaster;
|
|
|
|
typedef TSmartPointerT<TRaster> TRasterP;
|
|
|
|
|
2017-05-19 22:20:33 +12:00
|
|
|
//------------------------------------------------------------
|
|
|
|
|
|
|
|
//
|
|
|
|
// Smart Pointer a TRaster
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
template class DVAPI TSmartPointerT<TRaster>;
|
|
|
|
#endif
|
|
|
|
|
2016-03-19 06:57:51 +13:00
|
|
|
//=========================================================
|
|
|
|
/*!This class stores bitmap images. */
|
2016-06-15 18:43:10 +12:00
|
|
|
class DVAPI TRaster : public TSmartObject {
|
|
|
|
DECLARE_CLASS_CODE
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
protected:
|
2016-06-15 18:43:10 +12:00
|
|
|
int m_pixelSize;
|
|
|
|
int m_lx, m_ly;
|
|
|
|
int m_wrap;
|
|
|
|
int m_lockCount;
|
|
|
|
TRaster *m_parent; // nel caso di sotto-raster
|
|
|
|
UCHAR *m_buffer;
|
|
|
|
bool m_bufferOwner;
|
|
|
|
// i costruttori sono qui per centralizzare la gestione della memoria
|
|
|
|
// e' comunque impossibile fare new TRaster perche' e' una classe astratta
|
|
|
|
// (clone, extract)
|
|
|
|
|
|
|
|
// crea il buffer associato (NON fa addRef())
|
|
|
|
TRaster(int lx, int ly, int pixelSize);
|
|
|
|
|
|
|
|
// si attacca ad un buffer pre-esistente (NON fa addRef() - neanche a parent)
|
|
|
|
TRaster(int lx, int ly, int pixelSize, int wrap, UCHAR *buffer,
|
|
|
|
TRaster *parent, bool bufferOwner = false);
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
private:
|
2016-06-15 18:43:10 +12:00
|
|
|
static TAtomicVar m_totalMemory;
|
|
|
|
TThread::Mutex m_mutex;
|
|
|
|
// not implemented
|
|
|
|
TRaster(const TRaster &);
|
|
|
|
TRaster &operator=(const TRaster &);
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
public:
|
|
|
|
#ifdef _DEBUG
|
2016-06-15 18:43:10 +12:00
|
|
|
bool m_cashed;
|
|
|
|
static unsigned long getTotalMemoryInKB();
|
2016-03-19 06:57:51 +13:00
|
|
|
#endif
|
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
virtual ~TRaster();
|
|
|
|
|
|
|
|
// accessors
|
|
|
|
// TRasterType getType() const {return m_type;};
|
|
|
|
int getLx() const { return m_lx; };
|
|
|
|
int getLy() const { return m_ly; };
|
|
|
|
TDimension getSize() const { return TDimension(m_lx, m_ly); };
|
|
|
|
|
|
|
|
//! Returns the length of a row in pixel.
|
2020-11-12 16:36:21 +13:00
|
|
|
int getWrap() const { return m_wrap; };
|
2016-06-15 18:43:10 +12:00
|
|
|
|
|
|
|
TPointD getCenterD() const { return TPointD(0.5 * m_lx, 0.5 * m_ly); };
|
|
|
|
TPoint getCenter() const { return TPoint(m_lx / 2, m_ly / 2); };
|
|
|
|
TRect getBounds() const { return TRect(0, 0, m_lx - 1, m_ly - 1); };
|
|
|
|
int getPixelSize() const { return m_pixelSize; };
|
|
|
|
|
|
|
|
int getRowSize() const { return m_pixelSize * m_lx; };
|
|
|
|
// in bytes
|
|
|
|
|
|
|
|
// when the bigMemoryManager is active, remapping can change buffers...need to
|
|
|
|
// to lock/unlock them o use them.
|
|
|
|
|
|
|
|
void lock() {
|
|
|
|
if (!TBigMemoryManager::instance()->isActive()) return;
|
|
|
|
TThread::MutexLocker sl(&m_mutex);
|
|
|
|
if (m_parent)
|
|
|
|
m_parent->lock();
|
|
|
|
else
|
|
|
|
++m_lockCount;
|
|
|
|
}
|
|
|
|
void unlock() {
|
|
|
|
if (!TBigMemoryManager::instance()->isActive()) return;
|
|
|
|
TThread::MutexLocker sl(&m_mutex);
|
|
|
|
if (m_parent)
|
|
|
|
m_parent->unlock();
|
|
|
|
else {
|
|
|
|
assert(m_lockCount > 0);
|
|
|
|
--m_lockCount;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void beginRemapping();
|
|
|
|
void endRemapping();
|
|
|
|
//! Returns a pointer to the image buffer.
|
|
|
|
// WARNING!!!!! before getting the buffer with getRawData(),
|
|
|
|
// you have to lock the raster with'lock method, and unlock
|
|
|
|
// it when you've done with the buffer
|
|
|
|
const UCHAR *getRawData() const { return m_buffer; };
|
|
|
|
|
|
|
|
UCHAR *getRawData() { return m_buffer; };
|
|
|
|
//! Returns a pointer to the image buffer positioned in the (x,y) coords.
|
|
|
|
const UCHAR *getRawData(int x, int y) const {
|
|
|
|
assert(0 <= x && x < m_lx && 0 <= y && y < m_ly);
|
|
|
|
return m_buffer + (y * m_wrap + x) * m_pixelSize;
|
|
|
|
};
|
|
|
|
UCHAR *getRawData(int x, int y) {
|
|
|
|
assert(0 <= x && x < m_lx && 0 <= y && y < m_ly);
|
|
|
|
return m_buffer + (y * m_wrap + x) * m_pixelSize;
|
|
|
|
};
|
|
|
|
bool isEmpty() const { return getSize() == TDimension(); };
|
|
|
|
|
|
|
|
TRasterP getParent() { return m_parent; }
|
|
|
|
// creazione di TRaster derivati
|
|
|
|
|
|
|
|
// devono essere virtuali puri perche' il nuovo raster creato deve essere del
|
|
|
|
// tipo giusto
|
|
|
|
virtual TRasterP clone() const = 0;
|
|
|
|
virtual TRasterP extract(TRect &rect) = 0;
|
|
|
|
virtual TRasterP create() const = 0;
|
|
|
|
virtual TRasterP create(int lx, int ly) const = 0;
|
|
|
|
|
|
|
|
// definita in termini di extract(rect); non lo posso fare subito perche'
|
|
|
|
// manca il
|
|
|
|
// costruttore di copia di TRasterP
|
|
|
|
inline virtual TRasterP extract(int x0, int y0, int x1, int y1);
|
|
|
|
|
|
|
|
// operazioni sui pixel
|
|
|
|
|
|
|
|
// Copia il contenuto di src (spostato di offset) nel raster corrente.
|
|
|
|
// Il tipo deve essere lo stesso
|
|
|
|
// In caso di dimensione diversa l'area copiata e' l'intersezione dei due
|
|
|
|
// getBounds()
|
|
|
|
// e i due raster sono allineati in basso a sinistra (src[0,0] -> dst[offset])
|
|
|
|
/*!Copies the content of the source raster in the current raster.
|
|
|
|
*/
|
|
|
|
void copy(const TRasterP &src, const TPoint &offset = TPoint());
|
|
|
|
|
|
|
|
void xMirror();
|
|
|
|
void yMirror();
|
|
|
|
void rotate180();
|
|
|
|
void rotate90();
|
|
|
|
|
|
|
|
void clear();
|
|
|
|
void clearOutside(const TRect &rect);
|
|
|
|
|
|
|
|
friend class TBigMemoryManager;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
protected:
|
2016-06-15 18:43:10 +12:00
|
|
|
void fillRawData(const UCHAR *pixel);
|
|
|
|
void fillRawDataOutside(const TRect &rect, const UCHAR *pixel);
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
private:
|
2016-06-15 18:43:10 +12:00
|
|
|
void remap(UCHAR *newLocation);
|
2016-03-19 06:57:51 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
//------------------------------------------------------------
|
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
inline void detach(TRasterP &r) {
|
|
|
|
if (!r || r->getRefCount() == 1) return;
|
|
|
|
TRasterP tmp(r->clone());
|
|
|
|
r = tmp;
|
2016-03-19 06:57:51 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
|
|
|
|
// forward declaration
|
|
|
|
template <class T>
|
|
|
|
class TRasterT;
|
|
|
|
|
|
|
|
//
|
|
|
|
// TRasterPT<Pixel>:
|
|
|
|
//
|
|
|
|
// Smart Pointer to TRasterT<Pixel>
|
|
|
|
//
|
|
|
|
|
|
|
|
//!\include raster_ex1.cpp
|
|
|
|
//! \include rasterpt_ex1.cpp
|
|
|
|
// class TRasterPT<T>
|
|
|
|
template <class T>
|
2016-06-29 18:17:12 +12:00
|
|
|
class TRasterPT final : public TSmartPointerT<TRasterT<T>> {
|
2016-03-19 06:57:51 +13:00
|
|
|
public:
|
2016-06-15 18:43:10 +12:00
|
|
|
typedef T Pixel;
|
|
|
|
typedef TRasterT<T> Raster;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
TRasterPT(){};
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
TRasterPT(int lx, int ly) { create(lx, ly); };
|
|
|
|
TRasterPT(const TDimension &d) { create(d.lx, d.ly); };
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
inline TRasterPT(const TRasterP &src);
|
|
|
|
inline TRasterPT(int lx, int ly, int wrap, T *buffer,
|
|
|
|
bool bufferOwner = false);
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
~TRasterPT(){};
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
void create(int lx, int ly);
|
|
|
|
void create(const TDimension &d) { create(d.lx, d.ly); };
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
inline void detach();
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
operator TRasterP() const;
|
2016-03-19 06:57:51 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
|
|
|
|
//
|
|
|
|
// TRasterT<Pixel>
|
|
|
|
//
|
|
|
|
// e' la classe concreta che discende da TRaster
|
|
|
|
|
|
|
|
template <class T>
|
2016-06-15 18:43:10 +12:00
|
|
|
class TRasterT : public TRaster {
|
2016-03-19 06:57:51 +13:00
|
|
|
protected:
|
2016-06-15 18:43:10 +12:00
|
|
|
// Constructors are protected to prevent direct allocation of TRasterT
|
|
|
|
// instances.
|
|
|
|
// Users must adopt the TRasterPT smart pointer syntax instead.
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
// Buffer Allocation
|
|
|
|
TRasterT(int lx, int ly) : TRaster(lx, ly, sizeof(T)) {}
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
// Buffer Attachment
|
|
|
|
TRasterT(int lx, int ly, int wrap, T *buffer, TRasterT<T> *parent,
|
|
|
|
bool bufferOwner = false)
|
|
|
|
: TRaster(lx, ly, sizeof(T), wrap, reinterpret_cast<UCHAR *>(buffer),
|
|
|
|
parent, bufferOwner) {}
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
public:
|
2016-06-15 18:43:10 +12:00
|
|
|
typedef T Pixel;
|
|
|
|
|
|
|
|
~TRasterT(){};
|
|
|
|
|
|
|
|
// accessors
|
|
|
|
// WARNING!!!!! before getting the buffer with pixels(int y),
|
|
|
|
// you have to lock the raster with'lock method, and unlock
|
|
|
|
// it when you've done with the buffer
|
|
|
|
|
|
|
|
const T *pixels(int y = 0) const {
|
|
|
|
assert(0 <= y && y < getLy());
|
|
|
|
return reinterpret_cast<T *>(m_buffer) + getWrap() * y;
|
|
|
|
};
|
|
|
|
T *pixels(int y = 0) {
|
|
|
|
assert(0 <= y && y < getLy());
|
|
|
|
return reinterpret_cast<T *>(m_buffer) + getWrap() * y;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Derived rasters creation
|
|
|
|
|
2016-06-19 20:06:29 +12:00
|
|
|
TRasterP clone() const override {
|
2016-06-15 18:43:10 +12:00
|
|
|
TRasterP dst = TRasterPT<T>(m_lx, m_ly);
|
|
|
|
TRasterP src(const_cast<TRaster *>((const TRaster *)this));
|
|
|
|
dst->copy(src);
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
2016-06-19 20:06:29 +12:00
|
|
|
TRasterP create() const override { return TRasterPT<T>(m_lx, m_ly); }
|
2016-06-15 18:43:10 +12:00
|
|
|
|
2016-06-20 14:23:05 +12:00
|
|
|
TRasterP create(int lx, int ly) const override {
|
|
|
|
return TRasterPT<T>(lx, ly);
|
|
|
|
}
|
2016-06-15 18:43:10 +12:00
|
|
|
|
|
|
|
//!\include raster_ex2.cpp
|
2016-06-19 20:06:29 +12:00
|
|
|
TRasterP extract(int x0, int y0, int x1, int y1) override {
|
2016-06-15 18:43:10 +12:00
|
|
|
TRect rect(x0, y0, x1, y1);
|
|
|
|
return extract(rect);
|
|
|
|
};
|
|
|
|
|
2016-06-19 20:06:29 +12:00
|
|
|
TRasterP extract(TRect &rect) override {
|
2016-06-15 18:43:10 +12:00
|
|
|
if (isEmpty() || getBounds().overlaps(rect) == false) return TRasterP();
|
|
|
|
rect = getBounds() * rect;
|
|
|
|
// addRef();
|
|
|
|
return TRasterP(new TRasterT<T>(rect.getLx(), rect.getLy(), m_wrap,
|
|
|
|
pixels(rect.y0) + rect.x0, this));
|
|
|
|
};
|
|
|
|
|
|
|
|
TRasterPT<T> extractT(TRect &rect);
|
|
|
|
|
|
|
|
TRasterPT<T> extractT(int x0, int y0, int x1, int y1) {
|
|
|
|
TRect rect(x0, y0, x1, y1);
|
|
|
|
return extractT(rect);
|
|
|
|
};
|
|
|
|
|
|
|
|
friend class TRasterPT<T>;
|
|
|
|
|
|
|
|
// Pixel Operations
|
|
|
|
void fill(const T &a) { fillRawData(reinterpret_cast<const UCHAR *>(&a)); }
|
|
|
|
|
|
|
|
void fillOutside(const TRect &rect, const T &a) {
|
|
|
|
fillRawDataOutside(rect, reinterpret_cast<const UCHAR *>(&a));
|
|
|
|
}
|
2016-03-19 06:57:51 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
inline TRasterP TRaster::extract(int x0, int y0, int x1, int y1) {
|
|
|
|
TRect rect(x0, y0, x1, y1);
|
|
|
|
return extract(rect);
|
2016-03-19 06:57:51 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
template <class T>
|
2016-06-15 18:43:10 +12:00
|
|
|
TRasterPT<T> TRasterT<T>::extractT(TRect &rect) {
|
|
|
|
if (isEmpty() || getBounds().overlaps(rect) == false) {
|
|
|
|
return TRasterPT<T>();
|
|
|
|
}
|
|
|
|
rect = getBounds() * rect;
|
|
|
|
// addRef();
|
|
|
|
return TRasterPT<T>(new TRasterT<T>(rect.getLx(), rect.getLy(), m_wrap,
|
|
|
|
pixels(rect.y0) + rect.x0, this));
|
2016-03-19 06:57:51 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
//
|
|
|
|
// metodi inline di TRasterPT
|
2016-06-15 18:43:10 +12:00
|
|
|
// (n.b. se non si fanno esplicitament "inline" NT si confonde con dll
|
2021-07-08 13:39:28 +12:00
|
|
|
// export/import)
|
2016-03-19 06:57:51 +13:00
|
|
|
//
|
|
|
|
|
|
|
|
template <class T>
|
2016-06-15 18:43:10 +12:00
|
|
|
inline TRasterPT<T>::TRasterPT(const TRasterP &src) {
|
|
|
|
TSmartPointerT<TRasterT<T>>::m_pointer =
|
|
|
|
dynamic_cast<TRasterT<T> *>(src.getPointer());
|
|
|
|
if (TSmartPointerT<TRasterT<T>>::m_pointer)
|
|
|
|
TSmartPointerT<TRasterT<T>>::m_pointer->addRef();
|
2016-03-19 06:57:51 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
template <class T>
|
2016-06-15 18:43:10 +12:00
|
|
|
inline void TRasterPT<T>::create(int lx, int ly) {
|
|
|
|
TRasterT<T> *raster = new TRasterT<T>(lx, ly);
|
|
|
|
*this = TRasterPT<T>(raster);
|
2016-03-19 06:57:51 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
template <class T>
|
2016-06-15 18:43:10 +12:00
|
|
|
inline void TRasterPT<T>::detach() {
|
|
|
|
if (!TSmartPointerT<TRasterT<T>>::m_pointer ||
|
|
|
|
TSmartPointerT<TRasterT<T>>::m_pointer->getRefCount() == 1)
|
|
|
|
return;
|
|
|
|
*this = TRasterPT(TSmartPointerT<TRasterT<T>>::m_pointer->clone());
|
|
|
|
// uso l'operator di assign per aggiornare correttamente
|
|
|
|
// i reference counts del vecchio e del nuovo raster
|
2016-03-19 06:57:51 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
template <class T>
|
2016-06-15 18:43:10 +12:00
|
|
|
inline TRasterPT<T>::operator TRasterP() const {
|
|
|
|
return TRasterP(TSmartPointerT<TRasterT<T>>::m_pointer);
|
2016-03-19 06:57:51 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
template <class T>
|
2016-06-15 18:43:10 +12:00
|
|
|
inline TRasterPT<T>::TRasterPT(int lx, int ly, int wrap, T *buffer,
|
|
|
|
bool bufferOwner) {
|
|
|
|
TSmartPointerT<TRasterT<T>>::m_pointer =
|
|
|
|
new TRasterT<T>(lx, ly, wrap, buffer, 0, bufferOwner);
|
|
|
|
TSmartPointerT<TRasterT<T>>::m_pointer->addRef();
|
2016-03-19 06:57:51 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-04-15 17:11:23 +12:00
|
|
|
#ifdef _WIN32
|
2016-03-19 06:57:51 +13:00
|
|
|
// su NT e' necessario per evitare un warning nelle classi
|
|
|
|
// esportate che si riferiscono a TRaster32P/TRaster64P
|
|
|
|
// su IRIX non compila perche' non riesce ad instanziare le
|
|
|
|
// funzioni online (!!!)
|
|
|
|
|
|
|
|
template class DVAPI TSmartPointerT<TRasterT<TPixel32>>;
|
|
|
|
template class DVAPI TRasterPT<TPixel32>;
|
|
|
|
|
|
|
|
template class DVAPI TSmartPointerT<TRasterT<TPixel64>>;
|
|
|
|
template class DVAPI TRasterPT<TPixel64>;
|
|
|
|
|
|
|
|
template class DVAPI TSmartPointerT<TRasterT<TPixelGR8>>;
|
|
|
|
template class DVAPI TRasterPT<TPixelGR8>;
|
|
|
|
|
|
|
|
template class DVAPI TSmartPointerT<TRasterT<TPixelGR16>>;
|
|
|
|
template class DVAPI TRasterPT<TPixelGR16>;
|
|
|
|
|
|
|
|
template class DVAPI TSmartPointerT<TRasterT<TPixelGRD>>;
|
|
|
|
template class DVAPI TRasterPT<TPixelGRD>;
|
|
|
|
|
|
|
|
template class DVAPI TSmartPointerT<TRasterT<TPixelCY>>;
|
|
|
|
template class DVAPI TRasterPT<TPixelCY>;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef TRasterPT<TPixel32> TRaster32P;
|
|
|
|
typedef TRasterPT<TPixel64> TRaster64P;
|
|
|
|
typedef TRasterPT<TPixelGR8> TRasterGR8P;
|
|
|
|
typedef TRasterPT<TPixelGR16> TRasterGR16P;
|
|
|
|
typedef TRasterPT<TPixelGRD> TRasterGRDP;
|
|
|
|
typedef TRasterPT<TPixelCY> TRasterYUV422P;
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
|
2016-07-14 00:05:06 +12:00
|
|
|
// functions
|
|
|
|
|
|
|
|
// trastercentroid.cpp
|
|
|
|
TPoint computeCentroid(const TRaster32P &r);
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
|
2016-03-19 06:57:51 +13:00
|
|
|
//=========================================================
|
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
#endif //__T_RASTER_INCLUDED
|