PlusServer is an application that runs Plus functions and sends acquired data to remote clients through OpenIGTLink connection. Typical example is to use Plus for acquiring tracked ultrasound image slices and send them for real-time visualization to 3D Slicer.
The server supports continuous data acquisition and sending and also on-request starting/stopping of recording, volume reconstruction, updating of transforms, saving of the modified device set configuration file, etc. Requests are received through OpenIGTLink commands. See more details at PlusServer commands .
Usage
The most convenient way to launch PlusServer is using PlusServerLauncher. After installing the Plus Applications package, the Plus Server Launcher can be found from the start menu. See more details at PlusServerLauncher application .
Visualization of acquired data
To visualize the images and transforms broadcasted by the PlusServer use an application such as 3D Slicer:
- Install and start 3D Slicer
- Create a new connection in the OpenIGTLinkIF module: client, default port name (18944), and set it Active
- Go to the Transforms module to see the transforms
- Choose an input image in the slice viewer window to see the live image
Command-line usage
PlusServer can be also started from the command-line. The list of available command-line parameters are printed if the –help parameter is specified.
Launch the command-line-only version of PlusServer (no graphical user interface):
PlusServer --config-file=PlusServer.xml
--config-file=opt Configuration file name
--connect Automatically connect after the
application is started
--device-set-configuration-dir=opt Device set configuration directory path
--help Print this help.
--verbose=opt Verbose level (1=error only, 2=warning,
3=info, 4=debug)
Configuration settings
-
PlusOpenIGTLinkServer
-
ListeningPort Port number where the server listens for incoming connections. Typical value is 18944.
-
OutputChannelId Name of the channel to get the data from. Must match the
Id
attribute value of one of the OutputChannel
elements in a device.
-
MaxNumberOfIgtlMessagesToSend Maximum number of messages to send to clients at each update.
Default = "100"
-
MaxTimeSpentWithProcessingMs Maximum time spent with sending messages to clients at each update.
Default = "50"
-
MissingInputGracePeriodSec This value defines for how long after initiating connection a the server should not report missing inputs as error. After the grace period expires, the server will report missing inputs as errors or warnings.
Default = "0"
-
SendValidTransformsOnly If
TRUE
then only valid transforms will be sent. If FALSE
then invalid messages are sent, too (if a transform is invalid then an identity matrix will be sent).
Default = "TRUE"
-
SendColumnMajorTransforms If
TRUE
then transforms will be sent in column major format. If FALSE
then transforms will be sent in row major format.
Default = "TRUE"
-
NumberOfRetryAttempts The number of retry attempts to perform when a message cannot be sent before considering them disconnected
Default = "10"
-
DelayBetweenRetryAttemptsSec The delay between each retry attempt. In combination with NumberOfRetryAttemps this determines how long to wait before considering a client disconnected.
Default = "0.05"
-
DefaultClientSendTimeoutSec If set, this value is used to determine how long to wait before considering a pending send message a timeout. A value of 0 means no timeout.
Default = "0.5"
-
DefaultClientReceiveTimeoutSec If set, this value is used to determine how long to wait before considering no network input as a timeout. A value of 0 means no timeout.
Default = "0.5"
-
IgtlMessageCrcCheckEnabled If
TRUE
then incoming OpenIGTLink messages are only accepted if their CRC is valid. If FALSE
then CRC is not checked.
Default = "FALSE"
-
LogWarningOnNoDataAvailable If TRUE, a warning will be logged when no data is available yet.
Default = "TRUE"
-
KeepAliveIntervalSec The time to wait between sending keep alive messages
Default = "0.25"
-
DefaultClientInfo
-
TDATARequested For clients that have the TDATA message type requested, this parameter can control default sending of data on startup.
Default = "FALSE"
-
TDATAResolution For TDATA messages, the minimum time between two frames. Use 0 for as fast as possible. If e.g. 50 ms is specified, the maximum update rate will be 20 Hz.
Default = "0"
-
MessageTypes
-
Message
-
Type
IMAGE:
standard OpenIGTLink message type, stores 3D image data (can be a single slice, includes position and orientation)
TRANSFORM:
standard OpenIGTLink message type, stores 3D pose (position and orientation) data
POSITION:
standard OpenIGTLink message type, stores 3D position data
TRACKEDFRAME:
Plus tracked ultrasound frame, stores all frame fields (tool transforms, statuses, etc). Optionally, sent transforms can be customized using the TransformNames
list.
USMESSAGE:
MUSiiC tracked ultrasound frame, stores additional imaging information, such as transmit and sampling frequency, line density, steering angle
STRING:
standard OpenIGTLink message type, stores a simple character string
VIDEO:
standard OpenIGTLink message type, stores a compressed video frame
-
TransformNames
-
StringNames
-
String Name of the frame string that is sent as a STRING message. Any frame field (Timestamp, any status message, any frame fields) can be specified here.
-
ImageNames
-
Image
-
Name Name of the image stream. It also defines the "From" frame of the transform embedded in the IGTL image message.
-
EmbeddedTransformToFrame "To" frame of the transform embedded in the IGTL image message
-
VideoNames
-
Video
-
Name Name of the image stream. It also defines the "From" frame of the transform embedded in the IGTL image message.
-
EmbeddedTransformToFrame "To" frame of the transform embedded in the IGTL image message
-
Encoding
-
FourCC FourCC value of the codec that is used to encode the image as a VideoMessage. Available types: I420: "I420", VP9:"VP90"
Default = "VP90"
-
Lossless If TRUE, encoding will be performed losslessly if possible.
Default = "FALSE"
-
MinKeyframeDistance The minimum required distance between encoded keyframes.
Default = "-1"
-
MaxKeyframeDistance The maximum required distance between encoded keyframes.
Default = "-1"
-
Speed The encoding speed for the encoder.
Default = "8"
-
DeadlineMode The deadline mode for the encoder. Possible values: "REALTIME", "GOOD", "BEST".
Default = "REALTIME"
-
RateControl The rate control mode for the encoder. Possible values: "CBR" (Constant bit rate), "VBR" (Variable bit rate), "CQ" (Constrained quality), "Q" (Constant Quality).
Default = "Q"
-
TargetBitrate The target bitrate for the encoder.
Default = "-1"
This is an example element that needs to be added to the PLUS configuration xml file to use PlusServer:
<PlusOpenIGTLinkServer
MaxNumberOfIgtlMessagesToSend="10"
MaxTimeSpentWithProcessingMs="50"
ListeningPort="18944"
MissingInputGracePeriodSec="5.0"
SendValidTransformsOnly="TRUE"
OutputChannelId="SomeValidChannel" >
<DefaultClientInfo>
<MessageTypes>
<Message Type="IMAGE" />
<Message Type="TRANSFORM" />
</MessageTypes>
<TransformNames>
<Transform Name="StylusTipToReference" />
<Transform Name="ProbeToReference" />
</TransformNames>
</DefaultClientInfo>
</PlusOpenIGTLinkServer>