Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cx::NetworkHandler Class Reference

#include <cxNetworkHandler.h>

Inheritance diagram for cx::NetworkHandler:

Signals

void connected ()
 
void disconnected ()
 
void transform (QString devicename, Transform3D transform, double timestamp)
 
void image (ImagePtr image)
 
void commandRespons (QString devicename, QString xml)
 
void string_message (QString message)
 
void probedefinition (QString devicename, ProbeDefinitionPtr definition)
 

Public Member Functions

 NetworkHandler (igtlioLogicPointer logic)
 
 ~NetworkHandler ()
 
igtlioSessionPointer requestConnectToServer (std::string serverHost, int serverPort=-1, IGTLIO_SYNCHRONIZATION_TYPE sync=IGTLIO_BLOCKING, double timeout_s=5)
 
void disconnectFromServer ()
 
void clearTimestampSynchronization ()
 

Protected Member Functions

void connectToConnectionEvents ()
 
void connectToDeviceEvents ()
 
void processImageAndEmitProbeDefinition (ImagePtr cximage, QString deviceName)
 
bool emitProbeDefinitionIfChanged (QString deviceName)
 
bool convertZeroesInsideSectorToOnes (ImagePtr cximage, int threshold=0, int newValue=1)
 
bool createMask ()
 
double synchronizedTimestamp (double receivedTimestampSec)
 
bool verifyTimestamp (double &timestampMS)
 Synchronize with system clock: Calculate a fixed offset, and apply this to all timestamps. More...
 

Protected Attributes

igtlioLogicPointer mLogic
 
igtlioSessionPointer mSession
 
QTimer * mTimer
 
ProbeDefinitionFromStringMessagesPtr mProbeDefinitionFromStringMessages
 
bool mGotTimeOffset
 
bool mGotMoreThanOneImage
 
double mTimestampOffsetMS
 
ProbeDefinitionPtr mProbeDefinition
 
bool mZeroesInImage
 
vtkImageDataPtr mUSMask
 
int mSkippedImages
 

Detailed Description

Definition at line 31 of file cxNetworkHandler.h.

Constructor & Destructor Documentation

cx::NetworkHandler::NetworkHandler ( igtlioLogicPointer  logic)

Definition at line 38 of file cxNetworkHandler.cpp.

cx::NetworkHandler::~NetworkHandler ( )

Definition at line 61 of file cxNetworkHandler.cpp.

Member Function Documentation

void cx::NetworkHandler::clearTimestampSynchronization ( )

Definition at line 84 of file cxNetworkHandler.cpp.

void cx::NetworkHandler::commandRespons ( QString  devicename,
QString  xml 
)
signal
void cx::NetworkHandler::connected ( )
signal
void cx::NetworkHandler::connectToConnectionEvents ( )
protected

Definition at line 303 of file cxNetworkHandler.cpp.

void cx::NetworkHandler::connectToDeviceEvents ( )
protected

Definition at line 315 of file cxNetworkHandler.cpp.

bool cx::NetworkHandler::convertZeroesInsideSectorToOnes ( ImagePtr  cximage,
int  threshold = 0,
int  newValue = 1 
)
protected

Definition at line 364 of file cxNetworkHandler.cpp.

bool cx::NetworkHandler::createMask ( )
protected

Definition at line 396 of file cxNetworkHandler.cpp.

void cx::NetworkHandler::disconnected ( )
signal
void cx::NetworkHandler::disconnectFromServer ( )

Definition at line 72 of file cxNetworkHandler.cpp.

bool cx::NetworkHandler::emitProbeDefinitionIfChanged ( QString  deviceName)
protected

Definition at line 353 of file cxNetworkHandler.cpp.

void cx::NetworkHandler::image ( ImagePtr  image)
signal
void cx::NetworkHandler::probedefinition ( QString  devicename,
ProbeDefinitionPtr  definition 
)
signal
void cx::NetworkHandler::processImageAndEmitProbeDefinition ( ImagePtr  cximage,
QString  deviceName 
)
protected

Definition at line 328 of file cxNetworkHandler.cpp.

igtlioSessionPointer cx::NetworkHandler::requestConnectToServer ( std::string  serverHost,
int  serverPort = -1,
IGTLIO_SYNCHRONIZATION_TYPE  sync = IGTLIO_BLOCKING,
double  timeout_s = 5 
)

Definition at line 66 of file cxNetworkHandler.cpp.

void cx::NetworkHandler::string_message ( QString  message)
signal
double cx::NetworkHandler::synchronizedTimestamp ( double  receivedTimestampSec)
protected

Definition at line 90 of file cxNetworkHandler.cpp.

void cx::NetworkHandler::transform ( QString  devicename,
Transform3D  transform,
double  timestamp 
)
signal
bool cx::NetworkHandler::verifyTimestamp ( double &  timestampMS)
protected

Synchronize with system clock: Calculate a fixed offset, and apply this to all timestamps.

Definition at line 107 of file cxNetworkHandler.cpp.

Member Data Documentation

bool cx::NetworkHandler::mGotMoreThanOneImage
protected

Definition at line 79 of file cxNetworkHandler.h.

bool cx::NetworkHandler::mGotTimeOffset
protected

Definition at line 78 of file cxNetworkHandler.h.

igtlioLogicPointer cx::NetworkHandler::mLogic
protected

Definition at line 73 of file cxNetworkHandler.h.

ProbeDefinitionPtr cx::NetworkHandler::mProbeDefinition
protected

Definition at line 82 of file cxNetworkHandler.h.

ProbeDefinitionFromStringMessagesPtr cx::NetworkHandler::mProbeDefinitionFromStringMessages
protected

Definition at line 76 of file cxNetworkHandler.h.

igtlioSessionPointer cx::NetworkHandler::mSession
protected

Definition at line 74 of file cxNetworkHandler.h.

int cx::NetworkHandler::mSkippedImages
protected

Definition at line 85 of file cxNetworkHandler.h.

QTimer* cx::NetworkHandler::mTimer
protected

Definition at line 75 of file cxNetworkHandler.h.

double cx::NetworkHandler::mTimestampOffsetMS
protected

Definition at line 80 of file cxNetworkHandler.h.

vtkImageDataPtr cx::NetworkHandler::mUSMask
protected

Definition at line 84 of file cxNetworkHandler.h.

bool cx::NetworkHandler::mZeroesInImage
protected

Definition at line 83 of file cxNetworkHandler.h.


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