18 #ifndef PRTX_ITEXTURE_H_ 19 #define PRTX_ITEXTURE_H_ 21 #include "prtx/prtx.h" 23 #include "prtx/Attributable.h" 24 #include "prtx/Content.h" 27 # pragma warning(push) 28 # pragma warning(disable : 4275 4251) 98 static uint8_t getBytesPerPixel(
PixelFormat format);
103 static uint8_t getChannelCount(
PixelFormat format);
113 template<
typename S>
static S getFormatAsString(
PixelFormat format);
119 static PixelFormat getFormatFromString(
const wchar_t*
string);
130 virtual bool isValid()
const = 0;
135 virtual const uint8_t* getBuffer()
const = 0;
139 virtual size_t getBufferSize()
const = 0;
144 virtual uint32_t getWidth()
const = 0;
148 virtual uint32_t getHeight()
const = 0;
157 virtual const std::wstring& getWarnings()
const = 0;
161 template<> PRTX_EXPORTS_API std::wstring Texture::getFormatAsString<std::wstring>(PixelFormat format);
162 template<> PRTX_EXPORTS_API std::string Texture::getFormatAsString<std::string>(PixelFormat format);
197 virtual void setBool (
const std::wstring& key,
Bool val);
198 virtual void setInt (
const std::wstring& key, int32_t val);
199 virtual void setFloat (
const std::wstring& key,
double val);
200 virtual void setString (
const std::wstring& key,
const std::wstring& val);
202 virtual void setBoolArray (
const std::wstring& key,
const std::vector<Bool>& val);
203 virtual void setIntArray (
const std::wstring& key,
const std::vector<int>& val);
204 virtual void setFloatArray (
const std::wstring& key,
const std::vector<double>& val);
205 virtual void setStringArray (
const std::wstring& key,
const WStringVector& val);
207 virtual void setBlindData (
const std::wstring& key,
void* val);
218 # pragma warning(pop) static const std::wstring METADATA_KEY_NODATAVALUE
metadata attribute "noDataValue"
Definition: Texture.h:84
uint8_t Bool
uint8_t based Bool type
Definition: Types.h:30
std::shared_ptr< Texture > TexturePtr
shared Texture pointer
Definition: Texture.h:37
static const std::wstring METADATA_KEY_HEIGHT
metadata attribute "height" (PT_INT), corresponds to getHeight()
Definition: Texture.h:78
Definition: /Attributable.h:37
std::vector< TexturePtr > TexturePtrVector
vector of shared Texture pointers
Definition: Texture.h:39
static const std::wstring METADATA_KEY_DEPTH
(deprecated) metadata attribute "depth" (PT_INT), corresponds to getBytesPerPixel() ...
Definition: Texture.h:90
static const std::wstring METADATA_KEY_OFFSET
metadata attribute "offset"
Definition: Texture.h:82
Definition: /Attributable.h:139
The Procedural Runtime eXtension namespace. The prtx namespace contains the tools to extend the Proce...
Definition: AnnotationBuilder.h:35
std::shared_ptr< URI > URIPtr
shared pointer implementation of prtx::URI
Definition: URI.h:37
static const std::wstring METADATA_KEY_UNIT
metadata attribute "unit"
Definition: Texture.h:86
static const std::wstring METADATA_KEY_WIDTH
metadata attribute "width" (PT_INT), corresponds to getWidth()
Definition: Texture.h:77
static const std::wstring METADATA_KEY_PROJECTIONREF
metadata attribute "projectionRef"
Definition: Texture.h:87
static const std::wstring METADATA_KEY_BYTESPERPIXEL
metadata attribute "bytesPerPixel" (PT_INT), corresponds to getBytesPerPixel()
Definition: Texture.h:79
Definition: Texture.h:169
static const std::wstring METADATA_KEY_FORMAT
metadata attribute "format" (PT_STRING), i.e. PixelFormat as wstring
Definition: Texture.h:80
static const std::wstring METADATA_KEY_GEOTRANSFORM
metadata attribute "geoTransform", see GDALDataset::GetGeoTransform() documentation ...
Definition: Texture.h:85
static const double METADATA_NODATAVALUE_NONE
sentinel value for the METADATA_KEY_NODATAVALUE attribute = "there is *no* noDataValue").
Definition: Texture.h:92
std::vector< std::wstring > WStringVector
vector of std::wstring
Definition: Types.h:35
static const std::wstring METADATA_KEY_SCALE
metadata attribute "scale"
Definition: Texture.h:83
PixelFormat
Definition: Texture.h:69