Class GenericIGTLinkClient

java.lang.Object
java.lang.Thread
org.medcare.igtl.network.OpenIGTClient
org.medcare.igtl.network.GenericIGTLinkClient
All Implemented Interfaces:
Runnable, IOpenIgtPacketListener

public class GenericIGTLinkClient extends OpenIGTClient implements IOpenIgtPacketListener
  • Constructor Details

  • Method Details

    • getResponseHandler

      public ResponseHandler getResponseHandler(Header header, byte[] bodyBuf)
      Description copied from class: OpenIGTClient
      ** To get response Handler
      Specified by:
      getResponseHandler in class OpenIGTClient
      Parameters:
      header - header of the message received
      bodyBuf - byte array of the body of the message received **
      Returns:
      the response Handler
    • onRxTransform

      public void onRxTransform(String name, TransformNR t)
      This method will be called by the IGT server when a transform is received. Supports: TRANSFORM QTRANS QTRANSFORM POSITION
      Specified by:
      onRxTransform in interface IOpenIgtPacketListener
      Parameters:
      name - The string in the 'NAME' field of the IGT packet
      t -
    • getTxTransform

      public TransformNR getTxTransform(String name)
      Request for a transform for transmition to IGT
      Specified by:
      getTxTransform in interface IOpenIgtPacketListener
      Parameters:
      name - A string of what type of transform to get
      Returns:
      the requested transform
    • onGetStatus

      public Status onGetStatus(String name)
      Request for status from IGT/Slicer
      Specified by:
      onGetStatus in interface IOpenIgtPacketListener
      Parameters:
      name - A string of what type of transform to get
      Returns:
      the requested status
    • onRxString

      public void onRxString(String name, String body)
      This is the handler for a String packet
      Specified by:
      onRxString in interface IOpenIgtPacketListener
      Parameters:
      name - A string of what type of data to get
      body - A string of the content
    • onTxString

      public String onTxString(String name)
      This is the request handler for a String packet
      Specified by:
      onTxString in interface IOpenIgtPacketListener
      Parameters:
      name - A string of what type of transform to get
    • onRxDataArray

      public void onRxDataArray(String name, Matrix3D data)
      This is the handler for an array of raw data in an array
      Specified by:
      onRxDataArray in interface IOpenIgtPacketListener
      Parameters:
      name - A string of what type of data to get
      data - An array of data
    • onTxDataArray

      public double[] onTxDataArray(String name)
      THis is a request for an array of data
      Specified by:
      onTxDataArray in interface IOpenIgtPacketListener
      Parameters:
      name - A string of what type of data to get
      Returns:
      an array of data
    • onRxImage

      public void onRxImage(String name, ImageMessage image)
      This is a handler for an Image sent from IGT packet
      Specified by:
      onRxImage in interface IOpenIgtPacketListener
      Parameters:
      name - A string of what type of data to get
      image - the image
    • onTxNDArray

      public void onTxNDArray(String name)
      Description copied from interface: IOpenIgtPacketListener
      THis is a request for an array of data
      Specified by:
      onTxNDArray in interface IOpenIgtPacketListener
      Parameters:
      name - A string of what type of data to get returns an array of data
    • onRxNDArray

      public void onRxNDArray(String name, float[] data)
      Description copied from interface: IOpenIgtPacketListener
      THis is a request for an array of data
      Specified by:
      onRxNDArray in interface IOpenIgtPacketListener
      Parameters:
      name - A string of what type of data to get returns an array of data
    • stopClient

      public void stopClient()
    • addIOpenIgtOnPacket

      public void addIOpenIgtOnPacket(IOpenIgtPacketListener l)
    • removeIOpenIgtOnPacket

      public void removeIOpenIgtOnPacket(IOpenIgtPacketListener l)
    • pushPose

      public void pushPose(String deviceName, TransformNR pose)
    • pushStatus

      public void pushStatus(String deviceName, int code, int subCode, String status)
    • pushStatus

      public void pushStatus(String deviceName, int code, int subCode, String errorName, String status)
    • pushStringMessage

      public void pushStringMessage(String deviceName, String msg)
    • pushTransformMessage

      public void pushTransformMessage(String deviceName, TransformNR t)
    • pushNDArrayMessage

      public void pushNDArrayMessage(String deviceName, float[] data)