Package org.medcare.igtl.network
Class GenericIGTLinkClient
java.lang.Object
java.lang.Thread
org.medcare.igtl.network.OpenIGTClient
org.medcare.igtl.network.GenericIGTLinkClient
- All Implemented Interfaces:
Runnable
,IOpenIgtPacketListener
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class org.medcare.igtl.network.OpenIGTClient
errorManager
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
getResponseHandler
(Header header, byte[] bodyBuf) ** To get response HandlergetTxTransform
(String name) Request for a transform for transmition to IGTonGetStatus
(String name) Request for status from IGT/Slicervoid
onRxDataArray
(String name, Matrix3D data) This is the handler for an array of raw data in an arrayvoid
onRxImage
(String name, ImageMessage image) This is a handler for an Image sent from IGT packetvoid
onRxNDArray
(String name, float[] data) THis is a request for an array of datavoid
onRxString
(String name, String body) This is the handler for a String packetvoid
onRxTransform
(String name, TransformNR t) This method will be called by the IGT server when a transform is received.double[]
onTxDataArray
(String name) THis is a request for an array of datavoid
onTxNDArray
(String name) THis is a request for an array of dataonTxString
(String name) This is the request handler for a String packetvoid
pushNDArrayMessage
(String deviceName, float[] data) void
pushPose
(String deviceName, TransformNR pose) void
pushStatus
(String deviceName, int code, int subCode, String status) void
pushStatus
(String deviceName, int code, int subCode, String errorName, String status) void
pushStringMessage
(String deviceName, String msg) void
pushTransformMessage
(String deviceName, TransformNR t) void
void
Methods inherited from class org.medcare.igtl.network.OpenIGTClient
getStatus, interrupt, isConnected, run, sendBytes, sendMessage, sendMessage, setSocketFactory, setStatus
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Constructor Details
-
GenericIGTLinkClient
- Throws:
Exception
-
-
Method Details
-
getResponseHandler
Description copied from class:OpenIGTClient
** To get response Handler- Specified by:
getResponseHandler
in classOpenIGTClient
- Parameters:
header
- header of the message receivedbodyBuf
- byte array of the body of the message received **- Returns:
- the response Handler
-
onRxTransform
This method will be called by the IGT server when a transform is received. Supports: TRANSFORM QTRANS QTRANSFORM POSITION- Specified by:
onRxTransform
in interfaceIOpenIgtPacketListener
- Parameters:
name
- The string in the 'NAME' field of the IGT packett
-
-
getTxTransform
Request for a transform for transmition to IGT- Specified by:
getTxTransform
in interfaceIOpenIgtPacketListener
- Parameters:
name
- A string of what type of transform to get- Returns:
- the requested transform
-
onGetStatus
Request for status from IGT/Slicer- Specified by:
onGetStatus
in interfaceIOpenIgtPacketListener
- Parameters:
name
- A string of what type of transform to get- Returns:
- the requested status
-
onRxString
This is the handler for a String packet- Specified by:
onRxString
in interfaceIOpenIgtPacketListener
- Parameters:
name
- A string of what type of data to getbody
- A string of the content
-
onTxString
This is the request handler for a String packet- Specified by:
onTxString
in interfaceIOpenIgtPacketListener
- Parameters:
name
- A string of what type of transform to get
-
onRxDataArray
This is the handler for an array of raw data in an array- Specified by:
onRxDataArray
in interfaceIOpenIgtPacketListener
- Parameters:
name
- A string of what type of data to getdata
- An array of data
-
onTxDataArray
THis is a request for an array of data- Specified by:
onTxDataArray
in interfaceIOpenIgtPacketListener
- Parameters:
name
- A string of what type of data to get- Returns:
- an array of data
-
onRxImage
This is a handler for an Image sent from IGT packet- Specified by:
onRxImage
in interfaceIOpenIgtPacketListener
- Parameters:
name
- A string of what type of data to getimage
- the image
-
onTxNDArray
Description copied from interface:IOpenIgtPacketListener
THis is a request for an array of data- Specified by:
onTxNDArray
in interfaceIOpenIgtPacketListener
- Parameters:
name
- A string of what type of data to get returns an array of data
-
onRxNDArray
Description copied from interface:IOpenIgtPacketListener
THis is a request for an array of data- Specified by:
onRxNDArray
in interfaceIOpenIgtPacketListener
- Parameters:
name
- A string of what type of data to get returns an array of data
-
stopClient
public void stopClient() -
addIOpenIgtOnPacket
-
removeIOpenIgtOnPacket
-
pushPose
-
pushStatus
-
pushStatus
-
pushStringMessage
-
pushTransformMessage
-
pushNDArrayMessage
-