Raytrix Light Field SDK  5.0
Rx::CRxImageFormat Class Reference

Detailed Description

Image format descriptor.

Public Types

typedef int TInt4[4]
 Typedef for a int[4]. More...
 

Public Member Functions

RX_CUDA_EXP CRxImageFormat ()
 Default constructor. More...
 
RX_CUDA_EXP CRxImageFormat (int iWidth, int iHeight, Interop::Runtime28::EPixelType::ID ePixelType, Interop::Runtime28::EDataType::ID eDataType)
 Default constructor. More...
 
RX_CUDA_EXP CRxImageFormat (int iWidthPX, int iHeightPX)
 Constructor. Defines only the width and the height. More...
 
RX_CUDA_EXP ~CRxImageFormat ()
 Destructor. More...
 
float GetAspectRatio () const
 Gets the aspect ratio of this format. This is height / width. 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 IsValid () const
 Query if this object is valid. 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...
 
void SetROIDefinition (const TInt4 &piROIDefinition)
 Sets the ROI definition. More...
 
CRxString ToString () const
 Convert this CRxImageFormat into a string representation. More...
 

Static Public Member Functions

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

Public Attributes

Interop::Runtime28::EDataType::ID m_eDataType
 The data type. More...
 
Interop::Runtime28::EPixelType::ID m_ePixelType
 The pixel type. More...
 
int m_iHeight
 The height. More...
 
int m_iWidth
 The width. More...
 
TInt4 m_piROI
 If this image format describes an image that is taken from a ROI of a larger area (e.g. a camera sensor), these 4 values describe the ROI: More...
 

Member Typedef Documentation

◆ TInt4

typedef int Rx::CRxImageFormat::TInt4[4]

Typedef for a int[4].

Constructor & Destructor Documentation

◆ CRxImageFormat() [1/3]

RX_CUDA_EXP Rx::CRxImageFormat::CRxImageFormat ( )
inline

Default constructor.

◆ CRxImageFormat() [2/3]

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.

◆ CRxImageFormat() [3/3]

RX_CUDA_EXP Rx::CRxImageFormat::CRxImageFormat ( int  iWidth,
int  iHeight,
Interop::Runtime28::EPixelType::ID  ePixelType,
Interop::Runtime28::EDataType::ID  eDataType 
)
inline

Default constructor.

◆ ~CRxImageFormat()

RX_CUDA_EXP Rx::CRxImageFormat::~CRxImageFormat ( )
inline

Destructor.

Member Function Documentation

◆ GetAspectRatio()

float Rx::CRxImageFormat::GetAspectRatio ( ) const
inline

Gets the aspect ratio of this format. This is height / width.

Returns
The aspect ratio.

◆ GetBitDepth()

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.

◆ GetByteCount()

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.

◆ GetBytesPerChannel()

RX_CUDA_EXP int Rx::CRxImageFormat::GetBytesPerChannel ( ) const
inline

Gets the bytes per channel.

Returns
The bytes per channel.

◆ GetBytesPerPixel()

RX_CUDA_EXP int Rx::CRxImageFormat::GetBytesPerPixel ( ) const
inline

Gets the bytes per pixel.

Returns
The bytes per pixel.

◆ GetComponentCount()

RX_CUDA_EXP int Rx::CRxImageFormat::GetComponentCount ( ) const
inline

Gets the component count.

Returns
The component count.

◆ GetPixelCount()

RX_CUDA_EXP unsigned Rx::CRxImageFormat::GetPixelCount ( ) const
inline

Gets the pixel count.

Returns
The pixel count.

◆ HasCustomDataType()

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.

◆ IsBayerPixelType()

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.

◆ IsOfType()

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
TPixThe pixel type.
Returns
True if this image format is of the given pixel type, false if not.

◆ IsValid()

RX_CUDA_EXP bool Rx::CRxImageFormat::IsValid ( ) const
inline

Query if this object is valid.

Returns
True if valid, false if not.

◆ operator!=()

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.

◆ operator==()

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.

◆ Reset()

RX_CUDA_EXP void Rx::CRxImageFormat::Reset ( )
inline

Resets this CRxImageFormat.

◆ SetROIDefinition()

void Rx::CRxImageFormat::SetROIDefinition ( const TInt4 piROIDefinition)
inline

Sets the ROI definition.

Parameters
piROIDefinitionThe ROI definition.

◆ ToString() [1/3]

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

Convert this CRxImageFormat into a string representation.

Returns
This CRxImageFormat as a string.

◆ ToString() [2/3]

static CRxString Rx::CRxImageFormat::ToString ( 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.

◆ ToString() [3/3]

static CRxString Rx::CRxImageFormat::ToString ( 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.

Member Data Documentation

◆ m_eDataType

Interop::Runtime28::EDataType::ID Rx::CRxImageFormat::m_eDataType

The data type.

◆ m_ePixelType

Interop::Runtime28::EPixelType::ID Rx::CRxImageFormat::m_ePixelType

The pixel type.

◆ m_iHeight

int Rx::CRxImageFormat::m_iHeight

The height.

◆ m_iWidth

int Rx::CRxImageFormat::m_iWidth

The width.

◆ m_piROI

TInt4 Rx::CRxImageFormat::m_piROI

If this image format describes an image that is taken from a ROI of a larger area (e.g. a camera sensor), these 4 values describe the ROI:

  • (ROI[0], ROI[1]) is the pixel offset from the top left corner of the larger area to the top left corner of the image.
  • (ROI[2], ROI[3]) is the pixel offset from the bottom right corner of the larger area to the bottom right corner of the image.