QTrk
Functions

Queue API functions available to LabVIEW. More...

Functions

CDLL_EXPORT int qtrk_get_queue_len (QueuedTracker *qtrk, int *maxQueueLen, ErrorCluster *e)
 
CDLL_EXPORT void DLL_CALLCONV qtrk_queue_u16 (QueuedTracker *qtrk, ErrorCluster *error, LVArray2D< ushort > **data, const LocalizationJob *jobInfo)
 
CDLL_EXPORT void DLL_CALLCONV qtrk_queue_u8 (QueuedTracker *qtrk, ErrorCluster *error, LVArray2D< uchar > **data, const LocalizationJob *jobInfo)
 
CDLL_EXPORT void DLL_CALLCONV qtrk_queue_float (QueuedTracker *qtrk, ErrorCluster *error, LVArray2D< float > **data, const LocalizationJob *jobInfo)
 
CDLL_EXPORT void DLL_CALLCONV qtrk_queue_pitchedmem (QueuedTracker *qtrk, uchar *data, int pitch, uint pdt, const LocalizationJob *jobInfo)
 
CDLL_EXPORT void DLL_CALLCONV qtrk_queue_array (QueuedTracker *qtrk, ErrorCluster *error, LVArray2D< uchar > **data, uint pdt, const LocalizationJob *jobInfo)
 
CDLL_EXPORT uint DLL_CALLCONV qtrk_queue_frame (QueuedTracker *qtrk, uchar *image, int pitch, int w, int h, uint pdt, ROIPosition *pos, int numROI, const LocalizationJob *pJobInfo, QueueFrameFlags flags, ErrorCluster *e)
 

Detailed Description

Queue API functions available to LabVIEW.

Use to queue images to be handled by the tracker.

Function Documentation

§ qtrk_get_queue_len()

CDLL_EXPORT int qtrk_get_queue_len ( QueuedTracker qtrk,
int *  maxQueueLen,
ErrorCluster e 
)

Definition at line 382 of file lv_queuetrk_api.cpp.

383 {
384  if (ValidateTracker(qtrk, e, "fullqueue"))
385  return qtrk->GetQueueLength(maxQueueLen);
386  return 0;
387 }
bool ValidateTracker(QueuedTracker *tracker, ErrorCluster *e, const char *funcname)
Verify the referenced tracker is a valid QueuedTracker instance.
virtual int GetQueueLength(int *maxQueueLen=0)=0
Get the lengths of the queue of jobs to be handled.

§ qtrk_queue_array()

CDLL_EXPORT void DLL_CALLCONV qtrk_queue_array ( QueuedTracker qtrk,
ErrorCluster error,
LVArray2D< uchar > **  data,
uint  pdt,
const LocalizationJob jobInfo 
)

Definition at line 306 of file lv_queuetrk_api.cpp.

307 {
308  uint pitch;
309 
310  if (pdt == QTrkFloat)
311  pitch = sizeof(float);
312  else if(pdt == QTrkU16)
313  pitch = 2;
314  else pitch = 1;
315 
316  if (!CheckImageInput(qtrk, data, error))
317  return;
318 
319  pitch *= (*data)->dimSizes[1]; // LVArray2D<uchar> type works for ushort and float as well
320 // dbgprintf("zlutindex: %d, zlutplane: %d\n", zlutIndex,zlutPlane);
321  qtrk_queue_pitchedmem(qtrk, (*data)->elem, pitch, pdt, jobInfo);
322 }
64 bit float
Definition: qtrk_c_api.h:37
16 bit unsigned int
Definition: qtrk_c_api.h:36
unsigned int uint
Definition: std_incl.h:127
bool CheckImageInput(QueuedTracker *qtrk, LVArray2D< T > **data, ErrorCluster *error)
CDLL_EXPORT void qtrk_queue_pitchedmem(QueuedTracker *qtrk, uchar *data, int pitch, uint pdt, const LocalizationJob *jobInfo)

§ qtrk_queue_float()

CDLL_EXPORT void DLL_CALLCONV qtrk_queue_float ( QueuedTracker qtrk,
ErrorCluster error,
LVArray2D< float > **  data,
const LocalizationJob jobInfo 
)

Definition at line 292 of file lv_queuetrk_api.cpp.

293 {
294  if (CheckImageInput(qtrk, data, error))
295  {
296  qtrk->ScheduleLocalization( (uchar*) (*data)->elem, sizeof(float)*(*data)->dimSizes[1], QTrkFloat, jobInfo);
297  }
298 }
64 bit float
Definition: qtrk_c_api.h:37
bool CheckImageInput(QueuedTracker *qtrk, LVArray2D< T > **data, ErrorCluster *error)
virtual void ScheduleLocalization(void *data, int pitch, QTRK_PixelDataType pdt, const LocalizationJob *jobInfo)=0
Add a job to the queue to be processed. A job entails running the required algorithms on a single reg...
unsigned char uchar
Definition: std_incl.h:130

§ qtrk_queue_frame()

CDLL_EXPORT uint DLL_CALLCONV qtrk_queue_frame ( QueuedTracker qtrk,
uchar image,
int  pitch,
int  w,
int  h,
uint  pdt,
ROIPosition pos,
int  numROI,
const LocalizationJob pJobInfo,
QueueFrameFlags  flags,
ErrorCluster e 
)

Definition at line 336 of file lv_queuetrk_api.cpp.

338 {
339  LocalizationJob jobInfo = *pJobInfo;
340  int nQueued;
341  if ( (nQueued=qtrk->ScheduleFrame(image, pitch, w,h, pos, numROI, (QTRK_PixelDataType)pdt, &jobInfo)) != numROI) {
342  ArgumentErrorMsg(e, SPrintf( "Not all ROIs (%d out of %d) were queued. Check image borders vs ROIs.", nQueued, numROI));
343  }
344  return jobInfo.timestamp;
345 }
virtual int ScheduleFrame(void *imgptr, int pitch, int width, int height, ROIPosition *positions, int numROI, QTRK_PixelDataType pdt, const LocalizationJob *jobInfo)
Schedule an entire frame at once, allowing for further optimizations.
uint timestamp
Time stamp of the frame.
Definition: qtrk_c_api.h:57
void ArgumentErrorMsg(ErrorCluster *e, const std::string &msg)
QTRK_PixelDataType
Flags indicating the data type of image data.
Definition: qtrk_c_api.h:33
Structure for region of interest metadata.
Definition: qtrk_c_api.h:49
std::string SPrintf(const char *fmt,...)
Definition: utils.cpp:132

§ qtrk_queue_pitchedmem()

CDLL_EXPORT void DLL_CALLCONV qtrk_queue_pitchedmem ( QueuedTracker qtrk,
uchar data,
int  pitch,
uint  pdt,
const LocalizationJob jobInfo 
)

Definition at line 301 of file lv_queuetrk_api.cpp.

302 {
303  qtrk->ScheduleLocalization(data, pitch, (QTRK_PixelDataType)pdt, jobInfo);
304 }
virtual void ScheduleLocalization(void *data, int pitch, QTRK_PixelDataType pdt, const LocalizationJob *jobInfo)=0
Add a job to the queue to be processed. A job entails running the required algorithms on a single reg...
QTRK_PixelDataType
Flags indicating the data type of image data.
Definition: qtrk_c_api.h:33

§ qtrk_queue_u16()

CDLL_EXPORT void DLL_CALLCONV qtrk_queue_u16 ( QueuedTracker qtrk,
ErrorCluster error,
LVArray2D< ushort > **  data,
const LocalizationJob jobInfo 
)

Definition at line 272 of file lv_queuetrk_api.cpp.

273 {
274  if (CheckImageInput(qtrk, data, error))
275  {
276  qtrk->ScheduleLocalization( (uchar*)(*data)->elem, sizeof(ushort)*(*data)->dimSizes[1], QTrkU16, jobInfo);
277  }
278 }
16 bit unsigned int
Definition: qtrk_c_api.h:36
bool CheckImageInput(QueuedTracker *qtrk, LVArray2D< T > **data, ErrorCluster *error)
unsigned short ushort
Definition: std_incl.h:128
virtual void ScheduleLocalization(void *data, int pitch, QTRK_PixelDataType pdt, const LocalizationJob *jobInfo)=0
Add a job to the queue to be processed. A job entails running the required algorithms on a single reg...
unsigned char uchar
Definition: std_incl.h:130

§ qtrk_queue_u8()

CDLL_EXPORT void DLL_CALLCONV qtrk_queue_u8 ( QueuedTracker qtrk,
ErrorCluster error,
LVArray2D< uchar > **  data,
const LocalizationJob jobInfo 
)

Definition at line 280 of file lv_queuetrk_api.cpp.

281 {
282  if (CheckImageInput(qtrk, data, error))
283  {
284 #ifdef _DEBUG
285  //dbgprintf("Job: 8bit image, frame %d, bead %d\n", jobInfo->frame, jobInfo->zlutIndex);
286 #endif
287 
288  qtrk->ScheduleLocalization( (*data)->elem, sizeof(uchar)*(*data)->dimSizes[1], QTrkU8, jobInfo);
289  }
290 }
bool CheckImageInput(QueuedTracker *qtrk, LVArray2D< T > **data, ErrorCluster *error)
8 bit unsigned int
Definition: qtrk_c_api.h:35
virtual void ScheduleLocalization(void *data, int pitch, QTRK_PixelDataType pdt, const LocalizationJob *jobInfo)=0
Add a job to the queue to be processed. A job entails running the required algorithms on a single reg...
unsigned char uchar
Definition: std_incl.h:130