NorMIT-nav  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

◆ NetworkHandler()

cx::NetworkHandler::NetworkHandler ( igtlioLogicPointer  logic)

Definition at line 38 of file cxNetworkHandler.cpp.

◆ ~NetworkHandler()

cx::NetworkHandler::~NetworkHandler ( )

Definition at line 61 of file cxNetworkHandler.cpp.

Member Function Documentation

◆ clearTimestampSynchronization()

void cx::NetworkHandler::clearTimestampSynchronization ( )

Definition at line 84 of file cxNetworkHandler.cpp.

◆ commandRespons

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

◆ connected

void cx::NetworkHandler::connected ( )
signal

◆ connectToConnectionEvents()

void cx::NetworkHandler::connectToConnectionEvents ( )
protected

Definition at line 303 of file cxNetworkHandler.cpp.

◆ connectToDeviceEvents()

void cx::NetworkHandler::connectToDeviceEvents ( )
protected

Definition at line 315 of file cxNetworkHandler.cpp.

◆ convertZeroesInsideSectorToOnes()

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

Definition at line 364 of file cxNetworkHandler.cpp.

◆ createMask()

bool cx::NetworkHandler::createMask ( )
protected

Definition at line 396 of file cxNetworkHandler.cpp.

◆ disconnected

void cx::NetworkHandler::disconnected ( )
signal

◆ disconnectFromServer()

void cx::NetworkHandler::disconnectFromServer ( )

Definition at line 72 of file cxNetworkHandler.cpp.

◆ emitProbeDefinitionIfChanged()

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

Definition at line 353 of file cxNetworkHandler.cpp.

◆ image

void cx::NetworkHandler::image ( ImagePtr  image)
signal

◆ probedefinition

void cx::NetworkHandler::probedefinition ( QString  devicename,
ProbeDefinitionPtr  definition 
)
signal

◆ processImageAndEmitProbeDefinition()

void cx::NetworkHandler::processImageAndEmitProbeDefinition ( ImagePtr  cximage,
QString  deviceName 
)
protected

Definition at line 328 of file cxNetworkHandler.cpp.

◆ requestConnectToServer()

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.

◆ string_message

void cx::NetworkHandler::string_message ( QString  message)
signal

◆ synchronizedTimestamp()

double cx::NetworkHandler::synchronizedTimestamp ( double  receivedTimestampSec)
protected

Definition at line 90 of file cxNetworkHandler.cpp.

◆ transform

void cx::NetworkHandler::transform ( QString  devicename,
Transform3D  transform,
double  timestamp 
)
signal

◆ verifyTimestamp()

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

◆ mGotMoreThanOneImage

bool cx::NetworkHandler::mGotMoreThanOneImage
protected

Definition at line 79 of file cxNetworkHandler.h.

◆ mGotTimeOffset

bool cx::NetworkHandler::mGotTimeOffset
protected

Definition at line 78 of file cxNetworkHandler.h.

◆ mLogic

igtlioLogicPointer cx::NetworkHandler::mLogic
protected

Definition at line 73 of file cxNetworkHandler.h.

◆ mProbeDefinition

ProbeDefinitionPtr cx::NetworkHandler::mProbeDefinition
protected

Definition at line 82 of file cxNetworkHandler.h.

◆ mProbeDefinitionFromStringMessages

ProbeDefinitionFromStringMessagesPtr cx::NetworkHandler::mProbeDefinitionFromStringMessages
protected

Definition at line 76 of file cxNetworkHandler.h.

◆ mSession

igtlioSessionPointer cx::NetworkHandler::mSession
protected

Definition at line 74 of file cxNetworkHandler.h.

◆ mSkippedImages

int cx::NetworkHandler::mSkippedImages
protected

Definition at line 85 of file cxNetworkHandler.h.

◆ mTimer

QTimer* cx::NetworkHandler::mTimer
protected

Definition at line 75 of file cxNetworkHandler.h.

◆ mTimestampOffsetMS

double cx::NetworkHandler::mTimestampOffsetMS
protected

Definition at line 80 of file cxNetworkHandler.h.

◆ mUSMask

vtkImageDataPtr cx::NetworkHandler::mUSMask
protected

Definition at line 84 of file cxNetworkHandler.h.

◆ mZeroesInImage

bool cx::NetworkHandler::mZeroesInImage
protected

Definition at line 83 of file cxNetworkHandler.h.


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