ArcGIS Procedural Runtime  3.2.10650
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
prtx::Texture Class Referenceabstract

#include <Texture.h>

Inheritance diagram for prtx::Texture:
[legend]

Public Types

enum  PixelFormat {
  GREY8 = 1,
  GREY16 = 2,
  RGB8 = 3,
  RGBA8 = 4,
  FLOAT32 = 5
}
 
- Public Types inherited from prtx::Attributable
using PrimitiveType = uint8_t
 

Public Member Functions

virtual const uint8_t * getBuffer () const =0
 
virtual size_t getBufferSize () const =0
 
virtual PixelFormat getFormat () const =0
 
virtual uint32_t getHeight () const =0
 
virtual prtx::URIPtr getURI () const =0
 
virtual const std::wstring & getWarnings () const =0
 
virtual uint32_t getWidth () const =0
 
virtual bool isValid () const =0
 
- Public Member Functions inherited from prtx::Attributable
virtual void * getBlindData (const std::wstring &key) const =0
 
virtual Bool getBool (const std::wstring &key) const =0
 
virtual const BoolVectorgetBoolArray (const std::wstring &key) const =0
 
virtual double getFloat (const std::wstring &key) const =0
 
virtual const DoubleVectorgetFloatArray (const std::wstring &key) const =0
 
virtual int32_t getInt (const std::wstring &key) const =0
 
virtual const Int32VectorgetIntArray (const std::wstring &key) const =0
 
virtual const WStringVectorgetKeys () const =0
 
virtual const std::wstring & getString (const std::wstring &key) const =0
 
virtual const WStringVectorgetStringArray (const std::wstring &key) const =0
 
virtual PrimitiveType getType (const std::wstring &key) const =0
 
virtual bool hasKey (const std::wstring &key) const =0
 
- Public Member Functions inherited from prtx::ComparableContent
virtual bool compare (const ComparableContent &rhs) const =0
 
virtual bool operator!= (const ComparableContent &rhs) const =0
 
virtual bool operator< (const ComparableContent &rhs) const =0
 
virtual bool operator== (const ComparableContent &rhs) const =0
 
- Public Member Functions inherited from prtx::Content
 Content (const Content &)=delete
 
Contentoperator= (const Content &)=delete
 

Static Public Member Functions

static uint8_t getBytesPerPixel (PixelFormat format)
 
static uint8_t getChannelCount (PixelFormat format)
 
template<typename S >
static S getFormatAsString (PixelFormat format)
 
static PixelFormat getFormatFromString (const wchar_t *string)
 
static bool hasAlpha (PixelFormat format)
 

Static Public Attributes

static const std::wstring METADATA_KEY_BYTESPERPIXEL
 metadata attribute "bytesPerPixel" (PT_INT), corresponds to getBytesPerPixel()
 
static const std::wstring METADATA_KEY_DEPTH
 (deprecated) metadata attribute "depth" (PT_INT), corresponds to getBytesPerPixel()
 
static const std::wstring METADATA_KEY_FORMAT
 metadata attribute "format" (PT_STRING), i.e. PixelFormat as wstring
 
static const std::wstring METADATA_KEY_GEOTRANSFORM
 metadata attribute "geoTransform", see GDALDataset::GetGeoTransform() documentation
 
static const std::wstring METADATA_KEY_HEIGHT
 metadata attribute "height" (PT_INT), corresponds to getHeight()
 
static const std::wstring METADATA_KEY_NODATAVALUE
 metadata attribute "noDataValue"
 
static const std::wstring METADATA_KEY_OFFSET
 metadata attribute "offset"
 
static const std::wstring METADATA_KEY_PROJECTIONREF
 metadata attribute "projectionRef"
 
static const std::wstring METADATA_KEY_SCALE
 metadata attribute "scale"
 
static const std::wstring METADATA_KEY_UNIT
 metadata attribute "unit"
 
static const std::wstring METADATA_KEY_WIDTH
 metadata attribute "width" (PT_INT), corresponds to getWidth()
 
static const double METADATA_NODATAVALUE_NONE
 sentinel value for the METADATA_KEY_NODATAVALUE attribute = "there is *no* noDataValue").
 
- Static Public Attributes inherited from prtx::Attributable
static constexpr PrimitiveType PT_BLIND_DATA = prt::Attributable::PT_BLIND_DATA
 
static constexpr PrimitiveType PT_BLIND_DATA_ARRAY = prt::Attributable::PT_BLIND_DATA_ARRAY
 
static constexpr PrimitiveType PT_BOOL = prt::Attributable::PT_BOOL
 
static constexpr PrimitiveType PT_BOOL_ARRAY = prt::Attributable::PT_BOOL_ARRAY
 
static constexpr PrimitiveType PT_COUNT = prt::Attributable::PT_COUNT
 
static constexpr PrimitiveType PT_FLOAT = prt::Attributable::PT_FLOAT
 
static constexpr PrimitiveType PT_FLOAT_ARRAY = prt::Attributable::PT_FLOAT_ARRAY
 
static constexpr PrimitiveType PT_INT = prt::Attributable::PT_INT
 
static constexpr PrimitiveType PT_INT_ARRAY = prt::Attributable::PT_INT_ARRAY
 
static constexpr PrimitiveType PT_STRING = prt::Attributable::PT_STRING
 
static constexpr PrimitiveType PT_STRING_ARRAY = prt::Attributable::PT_STRING_ARRAY
 
static constexpr PrimitiveType PT_UNDEFINED = prt::Attributable::PT_UNDEFINED
 

Detailed Description

The read-only Texture class allows for Texture access. Every texture supports the essential attributes

Some textures also support some geo-referencing attributes:

Member Enumeration Documentation

◆ PixelFormat

Supported pixel formats.

Enumerator
GREY8 

1 band, 1 byte per pixel, type UInt8, little-endian

GREY16 

1 band, 2 bytes per pixel, type UInt16, little-endian

RGB8 

3 bands, 3 bytes per pixel, type UInt8, little-endian

RGBA8 

4 bands, 4 bytes per pixel, type Uint8, little-endian

FLOAT32 

1 band, 4 bytes per pixel, type Float32, little-endian

Member Function Documentation

◆ getBuffer()

virtual const uint8_t* prtx::Texture::getBuffer ( ) const
pure virtual
Returns
pointer to the pixel buffer.

◆ getBufferSize()

virtual size_t prtx::Texture::getBufferSize ( ) const
pure virtual
Returns
size of pixel buffer in bytes.

◆ getBytesPerPixel()

static uint8_t prtx::Texture::getBytesPerPixel ( PixelFormat  format)
static
Parameters
formatPixelFormat to query.
Returns
number of bytes per pixel used by the format.

◆ getChannelCount()

static uint8_t prtx::Texture::getChannelCount ( PixelFormat  format)
static
Parameters
formatPixelFormat to query.
Returns
number of channels provided in by the format.

◆ getFormat()

virtual PixelFormat prtx::Texture::getFormat ( ) const
pure virtual
Returns
PixelFormat.

◆ getFormatAsString()

template<typename S >
static S prtx::Texture::getFormatAsString ( PixelFormat  format)
static
Parameters
formatPixelFormat to query.
Returns
string representation (i.e. enum value as string) of the format.

◆ getFormatFromString()

static PixelFormat prtx::Texture::getFormatFromString ( const wchar_t *  string)
static

Throws an exception if string is invalid.

Parameters
stringPixelFormat as string (i.e. enum value as string).
Returns
PixelFormat.

◆ getHeight()

virtual uint32_t prtx::Texture::getHeight ( ) const
pure virtual
Returns
height in pixels.

◆ getURI()

virtual prtx::URIPtr prtx::Texture::getURI ( ) const
pure virtual
Returns
the absolute name (URI) of the texture.

◆ getWarnings()

virtual const std::wstring& prtx::Texture::getWarnings ( ) const
pure virtual
Returns
warnings which occurred during loading of the texture.

◆ getWidth()

virtual uint32_t prtx::Texture::getWidth ( ) const
pure virtual
Returns
width in pixels.

◆ hasAlpha()

static bool prtx::Texture::hasAlpha ( PixelFormat  format)
static
Parameters
formatPixelFormat to query.
Returns
true if the format has an alpha channel, false if not.

◆ isValid()

virtual bool prtx::Texture::isValid ( ) const
pure virtual
Returns
true if the texture represents a valid texture (valid URI/Name and valid data), false otherwise.

The documentation for this class was generated from the following file: