MMCore 10.1.1
Public Member Functions | Public Attributes | List of all members
CircularBuffer Class Reference

Public Member Functions

 CircularBuffer (unsigned int memorySizeMB)
 
unsigned GetMemorySizeMB () const
 
bool Initialize (unsigned channels, unsigned int xSize, unsigned int ySize, unsigned int pixDepth)
 
unsigned long GetSize () const
 
unsigned long GetFreeSize () const
 
unsigned long GetRemainingImageCount () const
 
unsigned int Width () const
 
unsigned int Height () const
 
unsigned int Depth () const
 
bool InsertImage (const unsigned char *pixArray, unsigned int width, unsigned int height, unsigned int byteDepth, const Metadata *pMd) throw (CMMError)
 
bool InsertMultiChannel (const unsigned char *pixArray, unsigned int numChannels, unsigned int width, unsigned int height, unsigned int byteDepth, const Metadata *pMd) throw (CMMError)
 
bool InsertImage (const unsigned char *pixArray, unsigned int width, unsigned int height, unsigned int byteDepth, unsigned int nComponents, const Metadata *pMd) throw (CMMError)
 
bool InsertMultiChannel (const unsigned char *pixArray, unsigned int numChannels, unsigned int width, unsigned int height, unsigned int byteDepth, unsigned int nComponents, const Metadata *pMd) throw (CMMError)
 
const unsigned char * GetTopImage () const
 
const unsigned char * GetNextImage ()
 
const mm::ImgBufferGetTopImageBuffer (unsigned channel) const
 
const mm::ImgBufferGetNthFromTopImageBuffer (unsigned long n) const
 
const mm::ImgBufferGetNthFromTopImageBuffer (long n, unsigned channel) const
 
const mm::ImgBufferGetNextImageBuffer (unsigned channel)
 
void Clear ()
 
bool Overflow ()
 

Public Attributes

MMThreadLock g_bufferLock
 
MMThreadLock g_insertLock
 

Member Function Documentation

◆ InsertImage() [1/2]

bool CircularBuffer::InsertImage ( const unsigned char *  pixArray,
unsigned int  width,
unsigned int  height,
unsigned int  byteDepth,
const Metadata *  pMd 
)
throw (CMMError
)

Inserts a single image in the buffer.

◆ InsertImage() [2/2]

bool CircularBuffer::InsertImage ( const unsigned char *  pixArray,
unsigned int  width,
unsigned int  height,
unsigned int  byteDepth,
unsigned int  nComponents,
const Metadata *  pMd 
)
throw (CMMError
)

Inserts a single image, possibly with multiple components, in the buffer.

◆ InsertMultiChannel() [1/2]

bool CircularBuffer::InsertMultiChannel ( const unsigned char *  pixArray,
unsigned int  numChannels,
unsigned int  width,
unsigned int  height,
unsigned int  byteDepth,
const Metadata *  pMd 
)
throw (CMMError
)

Inserts a single image, possibly with multiple channels, but with 1 component, in the buffer.

◆ InsertMultiChannel() [2/2]

bool CircularBuffer::InsertMultiChannel ( const unsigned char *  pixArray,
unsigned int  numChannels,
unsigned int  width,
unsigned int  height,
unsigned int  byteDepth,
unsigned int  nComponents,
const Metadata *  pMd 
)
throw (CMMError
)

Inserts a multi-channel frame in the buffer.


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