AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxIO::Image Class Reference

Class to represent Images. More...

#include <Image.h>

+ Inheritance diagram for agxIO::Image:

Public Types

enum  ImageDataMode { ROW_MAJOR , COLUMN_MAJOR }
 Specify row/column mode. More...
 

Public Member Functions

 Image ()
 
unsigned int getChannels () const
 
unsigned char * getData ()
 
const unsigned char * getData () const
 
unsigned int getHeight () const
 
int getImageDataMode () const
 
unsigned int getWidth () const
 
void setImage (const unsigned int &width, const unsigned int &height, const unsigned int &channels, const int &mode, unsigned char *data)
 Sets the image.
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 

Protected Member Functions

virtual ~Image ()
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

unsigned int m_channels
 
unsigned char * m_data
 
unsigned int m_height
 
int m_imageDataMode
 
unsigned int m_width
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 

Detailed Description

Class to represent Images.

Definition at line 32 of file Image.h.

Member Enumeration Documentation

◆ ImageDataMode

Specify row/column mode.

Enumerator
ROW_MAJOR 

Pixel data is stored by row.

COLUMN_MAJOR 

Pixel data is stored by column.

Definition at line 37 of file Image.h.

Constructor & Destructor Documentation

◆ Image()

agxIO::Image::Image ( )

◆ ~Image()

virtual agxIO::Image::~Image ( )
protectedvirtual

Member Function Documentation

◆ getChannels()

unsigned int agxIO::Image::getChannels ( ) const

◆ getData() [1/2]

◆ getData() [2/2]

const unsigned char * agxIO::Image::getData ( ) const

◆ getHeight()

unsigned int agxIO::Image::getHeight ( ) const
Returns
Height of the image

◆ getImageDataMode()

int agxIO::Image::getImageDataMode ( ) const

◆ getWidth()

◆ setImage()

void agxIO::Image::setImage ( const unsigned int &  width,
const unsigned int &  height,
const unsigned int &  channels,
const int &  mode,
unsigned char *  data 
)

Sets the image.

The image takes responsibility for the data pointer.

Member Data Documentation

◆ m_channels

unsigned int agxIO::Image::m_channels
protected

Definition at line 76 of file Image.h.

◆ m_data

unsigned char* agxIO::Image::m_data
protected

Definition at line 78 of file Image.h.

◆ m_height

unsigned int agxIO::Image::m_height
protected

Definition at line 75 of file Image.h.

◆ m_imageDataMode

int agxIO::Image::m_imageDataMode
protected

Definition at line 80 of file Image.h.

◆ m_width

unsigned int agxIO::Image::m_width
protected

Definition at line 74 of file Image.h.


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