Public Member Functions | Protected Member Functions | Private Attributes | List of all members
rtabmap::CompressionThread Class Reference

#include <Compression.h>

Inheritance diagram for rtabmap::CompressionThread:
Inheritance graph
[legend]

Public Member Functions

 CompressionThread (const cv::Mat &mat, const std::string &format="")
 
 CompressionThread (const cv::Mat &bytes, bool isImage)
 
const cv::Mat & getCompressedData () const
 
cv::Mat & getUncompressedData ()
 
- Public Member Functions inherited from UThread
Handle getThreadHandle () const
 
unsigned long getThreadId () const
 
bool isCreating () const
 
bool isIdle () const
 
bool isKilled () const
 
bool isRunning () const
 
void join (bool killFirst=false)
 
void kill ()
 
void setAffinity (int cpu=0)
 
void setPriority (Priority priority)
 
void start ()
 
 UThread (Priority priority=kPNormal)
 
virtual ~UThread ()
 
- Public Member Functions inherited from UThreadC< void >
int Create (Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const
 
int Create (Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const
 
int Create (unsigned long &ThreadId, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const
 
int Create (unsigned long &ThreadId, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const
 
virtual ~UThreadC ()
 
virtual ~UThreadC ()
 

Protected Member Functions

virtual void mainLoop ()
 
- Protected Member Functions inherited from UThreadC< void >
 UThreadC ()
 
 UThreadC ()
 

Private Attributes

cv::Mat compressedData_
 
bool compressMode_
 
std::string format_
 
bool image_
 
cv::Mat uncompressedData_
 

Additional Inherited Members

- Public Types inherited from UThread
enum  Priority {
  kPLow, kPBelowNormal, kPNormal, kPAboveNormal,
  kPRealTime
}
 
- Public Types inherited from UThreadC< void >
typedef THREAD_HANDLE Handle
 
typedef THREAD_HANDLE Handle
 
typedef void(* Handler) ()
 
typedef void(* Handler) ()
 
- Static Public Member Functions inherited from UThread
static unsigned long currentThreadId ()
 
- Static Public Member Functions inherited from UThreadC< void >
static int Create (const Handler &Function, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false)
 
static int Create (const Handler &Function, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false)
 
static int Detach (Handle H)
 
static int Detach (const Handle &H)
 
static int Join (const Handle &H)
 
static int Join (Handle H)
 
static int Kill (Handle H)
 
static int Kill (const Handle &H)
 
- Static Protected Member Functions inherited from UThreadC< void >
static void Exit ()
 
static void Exit ()
 
static Handle Self ()
 
static int Self ()
 
static void TestCancel ()
 
static void TestCancel ()
 

Detailed Description

Compress image or data

Example compression: cv::Mat image;// an image CompressionThread ct(image); ct.start(); ct.join(); std::vector<unsigned char> bytes = ct.getCompressedData();

Example uncompression std::vector<unsigned char> bytes;// a compressed image CompressionThread ct(bytes); ct.start(); ct.join(); cv::Mat image = ct.getUncompressedData();

Definition at line 55 of file Compression.h.

Constructor & Destructor Documentation

rtabmap::CompressionThread::CompressionThread ( const cv::Mat &  mat,
const std::string &  format = "" 
)

Definition at line 38 of file Compression.cpp.

rtabmap::CompressionThread::CompressionThread ( const cv::Mat &  bytes,
bool  isImage 
)

Definition at line 47 of file Compression.cpp.

Member Function Documentation

const cv::Mat& rtabmap::CompressionThread::getCompressedData ( ) const
inline

Definition at line 61 of file Compression.h.

cv::Mat& rtabmap::CompressionThread::getUncompressedData ( )
inline

Definition at line 62 of file Compression.h.

void rtabmap::CompressionThread::mainLoop ( )
protectedvirtual

Pure virtual method mainLoop(). The inner loop of the thread. This method is called repetitively until the thread is killed. Note that if kill() is called in mainLoopBegin(), mainLoop() is not called, terminating immediately the thread.

See also
mainLoop()
kill()

Implements UThread.

Definition at line 52 of file Compression.cpp.

Member Data Documentation

cv::Mat rtabmap::CompressionThread::compressedData_
private

Definition at line 66 of file Compression.h.

bool rtabmap::CompressionThread::compressMode_
private

Definition at line 70 of file Compression.h.

std::string rtabmap::CompressionThread::format_
private

Definition at line 68 of file Compression.h.

bool rtabmap::CompressionThread::image_
private

Definition at line 69 of file Compression.h.

cv::Mat rtabmap::CompressionThread::uncompressedData_
private

Definition at line 67 of file Compression.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Wed Jun 5 2019 22:43:42