Raytrix Light Field SDK  4.0
Logo
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Rx::CRxImageFormat Class Reference

Detailed Description

Image format descriptor.

Public Member Functions

RX_CUDA_EXP CRxImageFormat ()
 Default constructor. More...
 
RX_CUDA_EXP CRxImageFormat (int iWidthPX, int iHeightPX)
 Constructor. Defines only the width and the height. More...
 
RX_CUDA_EXP CRxImageFormat (int iWidth, int iHeight, Interop::Runtime28::EPixelType::ID ePixelType, Interop::Runtime28::EDataType::ID eDataType)
 Default constructor. More...
 
 CRxImageFormat (const Interop::Runtime28::IImage *pxImg)
 Constructor that creates an image format that is equal to the image format of the given image interface. More...
 
RX_CUDA_EXP ~CRxImageFormat ()
 Destructor. More...
 
RX_CUDA_EXP int GetBitDepth () const
 Gets the bit depth. This is the number of bits per channel. More...
 
RX_CUDA_EXP unsigned GetByteCount () const
 Gets the total number of bytes allocated by images that are of this image format. More...
 
RX_CUDA_EXP int GetBytesPerChannel () const
 Gets the bytes per channel. More...
 
RX_CUDA_EXP int GetBytesPerPixel () const
 Gets the bytes per pixel. More...
 
RX_CUDA_EXP int GetComponentCount () const
 Gets the component count. More...
 
RX_CUDA_EXP unsigned GetPixelCount () const
 Gets the pixel count. More...
 
RX_CUDA_EXP bool HasCustomDataType () const
 Returns true if the data type of this image format is one of the custom (non primitive) data types. More...
 
RX_CUDA_EXP bool IsBayerPixelType () const
 Query if this CRxImageFormat is bayer pixel type. More...
 
template<class TPix >
RX_CUDA_EXP bool IsOfType () const
 Test whether format is of particular pixel type. More...
 
RX_CUDA_EXP bool operator!= (const CRxImageFormat &xFormat) const
 Inequality operator. More...
 
RX_CUDA_EXP bool operator== (const CRxImageFormat &xFormat) const
 Equality operator. More...
 
RX_CUDA_EXP void Reset ()
 Resets this CRxImageFormat. More...
 
CRxString ToString () const
 Convert this CRxImageFormat into a string representation. More...
 

Static Public Member Functions

static CRxString DataType2String (Interop::Runtime28::EDataType::ID eDataType)
 Converts the given data type to a string. More...
 
static CRxString PixelType2String (Interop::Runtime28::EPixelType::ID ePixelType)
 Converts the given pixel type to a string. More...
 

Public Attributes

Interop::Runtime28::EDataType::ID m_eDataType
 
Interop::Runtime28::EPixelType::ID m_ePixelType
 
int m_iHeight
 
int m_iWidth
 

Constructor & Destructor Documentation

RX_CUDA_EXP Rx::CRxImageFormat::CRxImageFormat ( )
inline

Default constructor.

RX_CUDA_EXP Rx::CRxImageFormat::CRxImageFormat ( int  iWidthPX,
int  iHeightPX 
)
inline

Constructor. Defines only the width and the height.

Parameters
iWidthPXThe width in pixels.
iHeightPXThe height in pixels.
RX_CUDA_EXP Rx::CRxImageFormat::CRxImageFormat ( int  iWidth,
int  iHeight,
Interop::Runtime28::EPixelType::ID  ePixelType,
Interop::Runtime28::EDataType::ID  eDataType 
)
inline

Default constructor.

Rx::CRxImageFormat::CRxImageFormat ( const Interop::Runtime28::IImage pxImg)
inline

Constructor that creates an image format that is equal to the image format of the given image interface.

Parameters
pxImgThe image interface pointer.
RX_CUDA_EXP Rx::CRxImageFormat::~CRxImageFormat ( )
inline

Destructor.

Member Function Documentation

static CRxString Rx::CRxImageFormat::DataType2String ( Interop::Runtime28::EDataType::ID  eDataType)
inlinestatic

Converts the given data type to a string.

Parameters
eDataTypeThe data type.
Returns
The data type as a string.
RX_CUDA_EXP int Rx::CRxImageFormat::GetBitDepth ( ) const
inline

Gets the bit depth. This is the number of bits per channel.

Returns
The bit depth.
RX_CUDA_EXP unsigned Rx::CRxImageFormat::GetByteCount ( ) const
inline

Gets the total number of bytes allocated by images that are of this image format.

Returns
The number of byte.
RX_CUDA_EXP int Rx::CRxImageFormat::GetBytesPerChannel ( ) const
inline

Gets the bytes per channel.

Returns
The bytes per channel.
RX_CUDA_EXP int Rx::CRxImageFormat::GetBytesPerPixel ( ) const
inline

Gets the bytes per pixel.

Returns
The bytes per pixel.
RX_CUDA_EXP int Rx::CRxImageFormat::GetComponentCount ( ) const
inline

Gets the component count.

Returns
The component count.
RX_CUDA_EXP unsigned Rx::CRxImageFormat::GetPixelCount ( ) const
inline

Gets the pixel count.

Returns
The pixel count.
RX_CUDA_EXP bool Rx::CRxImageFormat::HasCustomDataType ( ) const
inline

Returns true if the data type of this image format is one of the custom (non primitive) data types.

Returns
True if the data type is custom, false if not.
RX_CUDA_EXP bool Rx::CRxImageFormat::IsBayerPixelType ( ) const
inline

Query if this CRxImageFormat is bayer pixel type.

Returns
True if bayer pixel type, false if not.
template<class TPix >
RX_CUDA_EXP bool Rx::CRxImageFormat::IsOfType ( ) const
inline

Test whether format is of particular pixel type.

This function uses the static function IsOfType() of the pixel types to check whether the given template parameter pixel type matches the pixel and data types of this instance.

Template Parameters
TPixType of the pix.
Returns
True if of type< t pix>, false if not.
RX_CUDA_EXP bool Rx::CRxImageFormat::operator!= ( const CRxImageFormat xFormat) const
inline

Inequality operator.

Parameters
xFormatDescribes the format to use.
Returns
True if the parameters are not considered equivalent.
RX_CUDA_EXP bool Rx::CRxImageFormat::operator== ( const CRxImageFormat xFormat) const
inline

Equality operator.

Parameters
xFormatDescribes the format to use.
Returns
True if the parameters are considered equivalent.
static CRxString Rx::CRxImageFormat::PixelType2String ( Interop::Runtime28::EPixelType::ID  ePixelType)
inlinestatic

Converts the given pixel type to a string.

Parameters
ePixelTypeThe pixel type.
Returns
The pixel type as a string.
RX_CUDA_EXP void Rx::CRxImageFormat::Reset ( )
inline

Resets this CRxImageFormat.

CRxString Rx::CRxImageFormat::ToString ( ) const
inline

Convert this CRxImageFormat into a string representation.

Returns
This CRxImageFormat as a std::string.

Member Data Documentation

Interop::Runtime28::EDataType::ID Rx::CRxImageFormat::m_eDataType
Interop::Runtime28::EPixelType::ID Rx::CRxImageFormat::m_ePixelType
int Rx::CRxImageFormat::m_iHeight
int Rx::CRxImageFormat::m_iWidth