CustusX  15.4.0-beta
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::ImageReceiverThread Class Reference

Base class for receiving images from a video stream. More...

#include <cxImageReceiverThread.h>

Inheritance diagram for cx::ImageReceiverThread:

Public Slots

void initialize ()
 
void shutdown ()
 

Signals

void imageReceived ()
 
void sonixStatusReceived ()
 
void fps (QString, double)
 
void finished ()
 

Public Member Functions

 ImageReceiverThread (StreamerServicePtr streamerInterface, QObject *parent=NULL)
 
virtual ~ImageReceiverThread ()
 
virtual ImagePtr getLastImageMessage ()
 
virtual ProbeDefinitionPtr getLastSonixStatusMessage ()
 
virtual QString hostDescription () const
 

Protected Member Functions

void addImageToQueue (ImagePtr imgMsg)
 
void addSonixStatusToQueue (ProbeDefinitionPtr msg)
 add the message to a thread-safe queue More...
 
void calibrateTimeStamp (ImagePtr imgMsg)
 Calibrate the time stamps of the incoming message based on the computer clock. Calibration is based on an average of several of the last messages. The calibration is updated every 20-30 sec. More...
 

Detailed Description

Base class for receiving images from a video stream.

Subclass to implement for a specific protocol. Supported messages:

  • Image : contains vtkImageData, timestamp, uid, all else is discarded.
  • ProbeData : contains sector and image definition, temporal cal is discarded.
Date
Oct 11, 2012
Author
Christian Askeland, SINTEF

Definition at line 76 of file cxImageReceiverThread.h.

Constructor & Destructor Documentation

cx::ImageReceiverThread::ImageReceiverThread ( StreamerServicePtr  streamerInterface,
QObject *  parent = NULL 
)

-----------------------------------------------------—


Definition at line 63 of file cxImageReceiverThread.cpp.

virtual cx::ImageReceiverThread::~ImageReceiverThread ( )
inlinevirtual

Definition at line 81 of file cxImageReceiverThread.h.

Member Function Documentation

void cx::ImageReceiverThread::addImageToQueue ( ImagePtr  imgMsg)
protected

Add the message to a thread-safe queue. Tests if the time stamps of image messages should be calibrated based on the computer clock. Time stamps only need to be synched if set on another computer that is not synched, e.g. the Ultrasonix scanner

Parameters
[in]imgMsgIncoming image message

Definition at line 134 of file cxImageReceiverThread.cpp.

void cx::ImageReceiverThread::addSonixStatusToQueue ( ProbeDefinitionPtr  msg)
protected

add the message to a thread-safe queue

Definition at line 154 of file cxImageReceiverThread.cpp.

void cx::ImageReceiverThread::calibrateTimeStamp ( ImagePtr  imgMsg)
protected

Calibrate the time stamps of the incoming message based on the computer clock. Calibration is based on an average of several of the last messages. The calibration is updated every 20-30 sec.

Definition at line 188 of file cxImageReceiverThread.cpp.

void cx::ImageReceiverThread::finished ( )
signal
void cx::ImageReceiverThread::fps ( QString  ,
double   
)
signal
ImagePtr cx::ImageReceiverThread::getLastImageMessage ( )
virtual

Definition at line 162 of file cxImageReceiverThread.cpp.

ProbeDefinitionPtr cx::ImageReceiverThread::getLastSonixStatusMessage ( )
virtual

Definition at line 178 of file cxImageReceiverThread.cpp.

QString cx::ImageReceiverThread::hostDescription ( ) const
virtual

Definition at line 250 of file cxImageReceiverThread.cpp.

void cx::ImageReceiverThread::imageReceived ( )
signal
void cx::ImageReceiverThread::initialize ( )
slot

Definition at line 73 of file cxImageReceiverThread.cpp.

void cx::ImageReceiverThread::shutdown ( )
slot

Definition at line 109 of file cxImageReceiverThread.cpp.

void cx::ImageReceiverThread::sonixStatusReceived ( )
signal

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