PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
Macros | Functions | Variables
PlusServerRemoteControl.cxx File Reference

Client to remote control PlusServer through OpenIGTLink. More...

#include "PlusConfigure.h"
#include "igtlCommon.h"
#include "igtlTrackingDataMessage.h"
#include "igtl_header.h"
#include "vtkPlusGetTransformCommand.h"
#include "vtkPlusOpenIGTLinkClient.h"
#include "vtkPlusReconstructVolumeCommand.h"
#include "vtkPlusRequestIdsCommand.h"
#include "vtkPlusSaveConfigCommand.h"
#include "vtkPlusSendTextCommand.h"
#include "vtkPlusStartStopRecordingCommand.h"
#include "vtkPlusUpdateTransformCommand.h"
#include "vtkPlusVersionCommand.h"
#include "vtkPlusIgtlMessageFactory.h"
#include <vtkNew.h>
#include "vtksys/CommandLineArguments.hxx"
#include "vtksys/Process.h"
#include "vtkXMLUtilities.h"
#include "igtlTransformMessage.h"
#include <csignal>
#include <cstdlib>
#include <cstdio>
Include dependency graph for PlusServerRemoteControl.cxx:

Go to the source code of this file.

Macros

#define RETURN_IF_FAIL(cmd)   if (cmd!=PLUS_SUCCESS) { return PLUS_FAIL; };
 

Functions

PlusStatus ExecuteGetChannelIds (vtkPlusOpenIGTLinkClient *client, int commandId)
 
PlusStatus ExecuteGetDeviceIds (vtkPlusOpenIGTLinkClient *client, const std::string &deviceType, int commandId)
 
PlusStatus ExecuteGetPoint (vtkPlusOpenIGTLinkClient *client, const std::string &inputFilename)
 
PlusStatus ExecuteGetSnapshotReconstruction (vtkPlusOpenIGTLinkClient *client, const std::string &deviceId, const std::string &outputFilename, const std::string &outputImageName, int commandId)
 
PlusStatus ExecuteGetTransform (vtkPlusOpenIGTLinkClient *client, const std::string &transformName, int commandId)
 
PlusStatus ExecuteReconstructFromFile (vtkPlusOpenIGTLinkClient *client, const std::string &deviceId, const std::string &inputFilename, const std::string &outputFilename, const std::string &outputImageName, int commandId)
 
PlusStatus ExecuteResumeAcquisition (vtkPlusOpenIGTLinkClient *client, const std::string &deviceId, int commandId)
 
PlusStatus ExecuteResumeReconstruction (vtkPlusOpenIGTLinkClient *client, const std::string &deviceId, int commandId)
 
PlusStatus ExecuteSaveConfig (vtkPlusOpenIGTLinkClient *client, const std::string &outputFilename, int commandId)
 
PlusStatus ExecuteSendText (vtkPlusOpenIGTLinkClient *client, const std::string &deviceId, const std::string &text, bool responseExpected, int commandId)
 
PlusStatus ExecuteStartAcquisition (vtkPlusOpenIGTLinkClient *client, const std::string &deviceId, std::string outputFilename, bool enableCompression, int commandId)
 
PlusStatus ExecuteStartReconstruction (vtkPlusOpenIGTLinkClient *client, const std::string &deviceId, int commandId)
 
PlusStatus ExecuteStartTDATA (vtkPlusOpenIGTLinkClient *client, int commandId)
 
PlusStatus ExecuteStopAcquisition (vtkPlusOpenIGTLinkClient *client, const std::string &deviceId, std::string outputFilename, int commandId)
 
PlusStatus ExecuteStopReconstruction (vtkPlusOpenIGTLinkClient *client, const std::string &deviceId, const std::string &outputFilename, const std::string &outputImageName, int commandId)
 
PlusStatus ExecuteStopTDATA (vtkPlusOpenIGTLinkClient *client, int commandId)
 
PlusStatus ExecuteSuspendAcquisition (vtkPlusOpenIGTLinkClient *client, const std::string &deviceId, int commandId)
 
PlusStatus ExecuteSuspendReconstruction (vtkPlusOpenIGTLinkClient *client, const std::string &deviceId, int commandId)
 
PlusStatus ExecuteUpdateTransform (vtkPlusOpenIGTLinkClient *client, const std::string &transformName, const std::string &transformValue, const std::string &transformError, const std::string &transformDate, const std::string &transformPersistent, int commandId)
 
PlusStatus ExecuteVersion (vtkPlusOpenIGTLinkClient *client, int commandId)
 
int main (int argc, char **argv)
 
void PrintCommand (vtkPlusCommand *command)
 
PlusStatus ReceiveAndPrintReply (vtkPlusOpenIGTLinkClient *client, bool &didTimeout, std::string &outContent, std::string &outErrorMessage, igtl::MessageBase::MetaDataMap &parameters, int timeoutSec=30)
 
PlusStatus RunTests (vtkPlusOpenIGTLinkClient *client)
 
void SignalInterruptHandler (int s)
 
PlusStatus StartPlusServerProcess (const std::string &configFile, vtksysProcess *&processPtr)
 
void StopPlusServerProcess (vtksysProcess *&processPtr)
 
 vtkStandardNewMacro (vtkPlusOpenIGTLinkClientWithTransformLogging)
 

Variables

static bool StopClientRequested = false
 

Detailed Description

Client to remote control PlusServer through OpenIGTLink.

Definition in file PlusServerRemoteControl.cxx.

Macro Definition Documentation

◆ RETURN_IF_FAIL

#define RETURN_IF_FAIL (   cmd)    if (cmd!=PLUS_SUCCESS) { return PLUS_FAIL; };

Definition at line 566 of file PlusServerRemoteControl.cxx.

Function Documentation

◆ ExecuteGetChannelIds()

PlusStatus ExecuteGetChannelIds ( vtkPlusOpenIGTLinkClient client,
int  commandId 
)

Definition at line 352 of file PlusServerRemoteControl.cxx.

◆ ExecuteGetDeviceIds()

PlusStatus ExecuteGetDeviceIds ( vtkPlusOpenIGTLinkClient client,
const std::string &  deviceType,
int  commandId 
)

Definition at line 362 of file PlusServerRemoteControl.cxx.

◆ ExecuteGetPoint()

PlusStatus ExecuteGetPoint ( vtkPlusOpenIGTLinkClient client,
const std::string &  inputFilename 
)

Definition at line 423 of file PlusServerRemoteControl.cxx.

◆ ExecuteGetSnapshotReconstruction()

PlusStatus ExecuteGetSnapshotReconstruction ( vtkPlusOpenIGTLinkClient client,
const std::string &  deviceId,
const std::string &  outputFilename,
const std::string &  outputImageName,
int  commandId 
)

Definition at line 249 of file PlusServerRemoteControl.cxx.

◆ ExecuteGetTransform()

PlusStatus ExecuteGetTransform ( vtkPlusOpenIGTLinkClient client,
const std::string &  transformName,
int  commandId 
)

Definition at line 412 of file PlusServerRemoteControl.cxx.

◆ ExecuteReconstructFromFile()

PlusStatus ExecuteReconstructFromFile ( vtkPlusOpenIGTLinkClient client,
const std::string &  deviceId,
const std::string &  inputFilename,
const std::string &  outputFilename,
const std::string &  outputImageName,
int  commandId 
)

Definition at line 180 of file PlusServerRemoteControl.cxx.

◆ ExecuteResumeAcquisition()

PlusStatus ExecuteResumeAcquisition ( vtkPlusOpenIGTLinkClient client,
const std::string &  deviceId,
int  commandId 
)

Definition at line 166 of file PlusServerRemoteControl.cxx.

◆ ExecuteResumeReconstruction()

PlusStatus ExecuteResumeReconstruction ( vtkPlusOpenIGTLinkClient client,
const std::string &  deviceId,
int  commandId 
)

Definition at line 235 of file PlusServerRemoteControl.cxx.

◆ ExecuteSaveConfig()

PlusStatus ExecuteSaveConfig ( vtkPlusOpenIGTLinkClient client,
const std::string &  outputFilename,
int  commandId 
)

Definition at line 434 of file PlusServerRemoteControl.cxx.

◆ ExecuteSendText()

PlusStatus ExecuteSendText ( vtkPlusOpenIGTLinkClient client,
const std::string &  deviceId,
const std::string &  text,
bool  responseExpected,
int  commandId 
)

Definition at line 466 of file PlusServerRemoteControl.cxx.

◆ ExecuteStartAcquisition()

PlusStatus ExecuteStartAcquisition ( vtkPlusOpenIGTLinkClient client,
const std::string &  deviceId,
std::string  outputFilename,
bool  enableCompression,
int  commandId 
)

Definition at line 121 of file PlusServerRemoteControl.cxx.

◆ ExecuteStartReconstruction()

PlusStatus ExecuteStartReconstruction ( vtkPlusOpenIGTLinkClient client,
const std::string &  deviceId,
int  commandId 
)

Definition at line 207 of file PlusServerRemoteControl.cxx.

◆ ExecuteStartTDATA()

PlusStatus ExecuteStartTDATA ( vtkPlusOpenIGTLinkClient client,
int  commandId 
)

Definition at line 445 of file PlusServerRemoteControl.cxx.

◆ ExecuteStopAcquisition()

PlusStatus ExecuteStopAcquisition ( vtkPlusOpenIGTLinkClient client,
const std::string &  deviceId,
std::string  outputFilename,
int  commandId 
)

Definition at line 137 of file PlusServerRemoteControl.cxx.

◆ ExecuteStopReconstruction()

PlusStatus ExecuteStopReconstruction ( vtkPlusOpenIGTLinkClient client,
const std::string &  deviceId,
const std::string &  outputFilename,
const std::string &  outputImageName,
int  commandId 
)

Definition at line 271 of file PlusServerRemoteControl.cxx.

◆ ExecuteStopTDATA()

PlusStatus ExecuteStopTDATA ( vtkPlusOpenIGTLinkClient client,
int  commandId 
)

Definition at line 456 of file PlusServerRemoteControl.cxx.

◆ ExecuteSuspendAcquisition()

PlusStatus ExecuteSuspendAcquisition ( vtkPlusOpenIGTLinkClient client,
const std::string &  deviceId,
int  commandId 
)

Definition at line 152 of file PlusServerRemoteControl.cxx.

◆ ExecuteSuspendReconstruction()

PlusStatus ExecuteSuspendReconstruction ( vtkPlusOpenIGTLinkClient client,
const std::string &  deviceId,
int  commandId 
)

Definition at line 221 of file PlusServerRemoteControl.cxx.

◆ ExecuteUpdateTransform()

PlusStatus ExecuteUpdateTransform ( vtkPlusOpenIGTLinkClient client,
const std::string &  transformName,
const std::string &  transformValue,
const std::string &  transformError,
const std::string &  transformDate,
const std::string &  transformPersistent,
int  commandId 
)

Definition at line 373 of file PlusServerRemoteControl.cxx.

◆ ExecuteVersion()

PlusStatus ExecuteVersion ( vtkPlusOpenIGTLinkClient client,
int  commandId 
)

Definition at line 342 of file PlusServerRemoteControl.cxx.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 743 of file PlusServerRemoteControl.cxx.

◆ PrintCommand()

void PrintCommand ( vtkPlusCommand command)

Definition at line 110 of file PlusServerRemoteControl.cxx.

◆ ReceiveAndPrintReply()

PlusStatus ReceiveAndPrintReply ( vtkPlusOpenIGTLinkClient client,
bool &  didTimeout,
std::string &  outContent,
std::string &  outErrorMessage,
igtl::MessageBase::MetaDataMap &  parameters,
int  timeoutSec = 30 
)

Definition at line 479 of file PlusServerRemoteControl.cxx.

◆ RunTests()

PlusStatus RunTests ( vtkPlusOpenIGTLinkClient client)

Definition at line 569 of file PlusServerRemoteControl.cxx.

◆ SignalInterruptHandler()

void SignalInterruptHandler ( int  s)

Definition at line 737 of file PlusServerRemoteControl.cxx.

◆ StartPlusServerProcess()

PlusStatus StartPlusServerProcess ( const std::string &  configFile,
vtksysProcess *&  processPtr 
)

Definition at line 515 of file PlusServerRemoteControl.cxx.

◆ StopPlusServerProcess()

void StopPlusServerProcess ( vtksysProcess *&  processPtr)

Definition at line 556 of file PlusServerRemoteControl.cxx.

◆ vtkStandardNewMacro()

vtkStandardNewMacro ( vtkPlusOpenIGTLinkClientWithTransformLogging  )

Variable Documentation

◆ StopClientRequested

bool StopClientRequested = false
static

Definition at line 47 of file PlusServerRemoteControl.cxx.