Difference between revisions of "2016 Winter Project Week/Projects/TrackedUltrasoundStandardization"

From NAMIC Wiki
Jump to: navigation, search
 
(10 intermediate revisions by 2 users not shown)
Line 30: Line 30:
 
* Pre-Project Week online meetings and emails
 
* Pre-Project Week online meetings and emails
 
** Notes below
 
** Notes below
** [https://github.com/SINTEFMedtek/CustusX/wiki/OpenIGTLink-US-messaging-proposal Design document from SINTEF]
+
** SINTEF design document [https://github.com/SINTEFMedtek/CustusX/wiki/OpenIGTLink-US-messaging-proposal]
 
* Coordination with the CommonTK effort
 
* Coordination with the CommonTK effort
 
* Survey of current implementations and use cases
 
* Survey of current implementations and use cases
 
* Development of long-term development practices to encourage collaboration
 
* Development of long-term development practices to encourage collaboration
 
|
 
|
* [[2016_Winter_Project_Week:TrackedUltrasoundStandardization/PreparationMeetings|Minutes of preparation meetings]]
+
* IGSIO [https://github.com/igsio]
* [https://docs.google.com/document/d/1jOHkFQJ5-GPyT3b9XHBJ5rnVkNOQQ2Q6G6evTfnl-CU/edit?usp=sharing Live meeting minutes]
+
* Preparation meeting minutes [[2016_Winter_Project_Week:TrackedUltrasoundStandardization/PreparationMeetings|[0]]]
 +
* Live meeting minutes [https://docs.google.com/document/d/1jOHkFQJ5-GPyT3b9XHBJ5rnVkNOQQ2Q6G6evTfnl-CU/edit?usp=sharing]
 
|}
 
|}
  
 
== OpenIGTLink Revisions ==
 
== OpenIGTLink Revisions ==
 +
v3 proposal document [http://openigtlink.org/protocols/v3_proposal.html]
 
=== Tracked ultrasound OpenIGTLink client ===
 
=== Tracked ultrasound OpenIGTLink client ===
 
* Move out part of OpenIGTLinkIF
 
* Move out part of OpenIGTLinkIF
 
* Only use OpenIGTLink and VTK
 
* Only use OpenIGTLink and VTK
  
=== Command ===
+
====Commands====
* COMMAND
+
=====SetDeviceParameters=====
** Command ID (uint32) 4
+
<b>Message</b>
** Command name (uint8[32]) 32
+
<Command>
** Content encoding (uint16) 2
+
  <Parameter Name=”Depth” Value=”45” />
** Content (uint8*) - rest of the body
+
  <Parameter Name=”Gain” Value=”35” />
 +
</Command>
  
* RTS_COMMAND: (return to sender command)
+
<b>Response 1</b>
** Command ID (uint32) 4
+
<Command>
** Command status (uint8[32]) 32
+
  <Result>SetDeviceParameters: success</Result>
** Content encoding (uint16) 2
+
  <Parameter Name=”Depth” Value=”45” />
** Content (uint8*) - rest of the body
+
  <Parameter Name=”Gain” Value=”35” />
 +
  ...
 +
</Command>
 +
 
 +
<b>Response 2</b>
 +
<Command>
 +
  <Result>SetDeviceParameters: failure</Result> <!-- see command status error code -->
 +
</Command>
 +
 
 +
=====GetDeviceParameters=====
 +
<b>Message</b>
 +
<Command>
 +
  <Parameter Name=”Depth” />
 +
  <Parameter Name=”Gain” />
 +
  ...
 +
</Command>
 +
 
 +
<b>Response</b>
 +
<Command>
 +
  <Result>GetDeviceParameters: success</Result>
 +
  <Parameter Name=”Depth” Value=”45” />
 +
  <Parameter Name=”Gain” Value=”35” />
 +
  ...
 +
</Command>
 +
 
 +
=====SubscribeDeviceParameters=====
 +
This will cause the server to send a GetDeviceParameters reply every time any of the subscribed parameters change.
 +
 
 +
<b>Message</b>
 +
<Command>
 +
  <Parameter Name=”Depth” Subscribe=”TRUE” />
 +
  <Parameter Name=”Gain” Subscribe=”FALSE” />
 +
  ...
 +
</Command>
 +
 
 +
<b>Response</b>
 +
<Command>
 +
  <Result>SubscribeDeviceParameters: success</Result>
 +
  <Parameter Name=”Depth” Subscribed="TRUE" />
 +
  <Parameter Name=”Gain” Subscribed="FALSE" />
 +
  ...
 +
</Command>
 +
 
 +
=====GetCapabilities=====
 +
SINTEF will specify and implement.
 +
 
 +
<b>Message</b>
 +
<Command></Command>
 +
 
 +
<b>Response</b>
 +
<Command>
 +
  <Result>GetCapabilities: success</Result>
 +
  <UltrasoundCapabilities>
 +
    <Probes>
 +
      <Probe name="L14-5/38"/>
 +
      <Probe name="C5-2/42"/>
 +
    </Probes>
 +
    <ImagingModes>
 +
      <ImagingMode Name=”b-mode+angio”>B-Mode,Angio</ImagingMode>
 +
    </ImagingModes>
 +
    <Streams>
 +
      <Stream name="B-Mode">
 +
        <Parameters>
 +
          <Parameter name="depth" min="5" max="220" step="5"/>
 +
        </Parameters>
 +
      </Stream>
 +
      <Stream name="Angio">
 +
        <Parameters>
 +
          <Parameter name="depth" min="5" max="220" step="5"/>
 +
        </Parameters>
 +
      </Stream>
 +
    </Streams>
 +
    <Presets>
 +
      <Preset name="Vascular small object B+Angio">
 +
        <Probe Name=”L14-5/38” />
 +
        <Parameter Name=”Depth” Value=”50” />
 +
      </Preset>
 +
    </Presets>
 +
  </UltrasoundCapabilities>
 +
</Command>
 +
===Tracking===
 +
Tracked ultrasound communication will use the TDATA message.
 +
 
 +
Use 1 bit of the Reserved byte to indicate valid/invalid status
 +
 
 +
Use metadata attributes for tool status information:
 +
 
 +
====Attributes====
 +
<ToolStatus>
 +
  <Tool Id=”Reference” Status=”WARNING” Description=”Marker 1 on tool X is damaged” />
 +
</ToolStatus>
 +
 
 +
* Status
 +
** "OK"
 +
** "WARNING"
 +
** "ERROR"
 +
* Description: human-readable string
  
 
===Meta Data===
 
===Meta Data===
 
 
====Header V1====
 
====Header V1====
 
  Bytes
 
  Bytes
Line 92: Line 190:
 
=====BODY=====
 
=====BODY=====
 
Contains extended header data, message content, and metadata.
 
Contains extended header data, message content, and metadata.
 +
 +
==US over OpenIGTLink==
 +
===Parameters===
 +
<b>Read-write</b>
 +
* Depth (mm): (“40”, “45”, “50”, …)
 +
* ImagingMode (string): (“bmode”, “bmode+rf”, “bmode+angio”, “rf+angio”, ...)
 +
* Probe (string): probe name (“L14-5/38”)
 +
* Frequency (MHz)
 +
* DynRange (db)
 +
* Gain (%)
 +
* Power (%)
 +
* Zoom (%)
 +
* SoundVelocity (m/s)
 +
* TGC (space-separated string, each entry -1.0 to 1.0)
 +
* AcquisitionState (string): “FREEZE” or “RUN”
 +
 +
<b>Read-only</b>
 +
* ClipRectangleOrigin="27 27"
 +
* ClipRectangleSize="766 562"
 +
* FanAnglesDeg=”-30 30” (for 3D: FanAnglesDeg=”-30 30 -15 15”)
 +
* FanOriginPixel=”240 10”
 +
* FanRadiusStartPixel=”30”
 +
* FanRadiusStopPixel=”500”
 +
* Encoding: how to interpret values ("BRIGHTNESS", "RF_REAL", "RF_IQ_LINE", "RF_I_LINE_Q_LINE", "RGB_COLOR")
  
 
== Implementation plan ==
 
== Implementation plan ==
=== Github Fork ===
 
OpenIGTLinkIF fork: https://github.com/drouin-simon/OpenIGTLinkIF
 
 
=== Tasks ===
 
=== Tasks ===
 
* Clean up the vtkMRMLIGTLConnectorNode to be logic, MRML and Slicer free
 
* Clean up the vtkMRMLIGTLConnectorNode to be logic, MRML and Slicer free
 
* Creating a new converter base class which does not depend on MRML
 
* Creating a new converter base class which does not depend on MRML
 
* Implementation of the new Command Message
 
* Implementation of the new Command Message
 +
=== Github Fork ===
 +
* OpenIGTLinkIF fork [https://github.com/drouin-simon/OpenIGTLinkIF]
 +
* OpenIGTLink fork [https://github.com/lassoan/OpenIGTLink]
 +
=== PLUS ===
 +
* Interson probe settings [https://www.assembla.com/spaces/plus/tickets/869-interson-probe-settings-/details]
 +
* Interson class cleanup [https://www.assembla.com/spaces/plus/tickets/897-clean-up-interson-video-source-code/details]
 +
* Get/Set TGC support for US devices [https://www.assembla.com/spaces/plus/tickets/1056-add-tgc-support-to-ultrasonix-interface/details]
 +
* Get transform over OpenIGTLink [https://www.assembla.com/spaces/plus/tickets/1054-add-get_transform-command-to-plus-server-to-support-querying-of-transforms/details]
 +
* Sonix transition to imaging parameters [https://www.assembla.com/spaces/plus/tickets/1058-convert-sonixvideo-source-to-use-new-imaging-parameters-design/details]
 +
 +
=== CustusX ===
 +
* Example CustusX class [https://github.com/SINTEFMedtek/CustusX/blob/master/source/resource/OpenIGTLinkUtilities/cxIGTLinkConversionImage.h]
  
 
==Presentations==
 
==Presentations==

Latest revision as of 18:40, 8 January 2016

Home < 2016 Winter Project Week < Projects < TrackedUltrasoundStandardization

Key Investigators

UltrasoundToolGuidance3dOnly.gif
  • Andras Lasso, Tamas Ungi (PerkLab, Queen's University)
  • Christian Askeland, Ingerid Reinertsen, Ole Vegard Solberg (CustusX, IGT research, SINTEF)
  • Simon Drouin (Mcgill University, Montreal, Canada)
  • Junichi Tokuda (BWH)
  • Steve Pieper (Isomics)
  • Adam Rankin (VASST Laboratory, Western University, Canada)
  • Thomas Kirchner, Janek Gröhl (MITK, DKFZ, Heidelberg, Germany)

Project Description

Objective Approach and Plan Progress and Next Steps
  • Pre-Project Week online meetings and emails
    • Notes below
    • SINTEF design document [1]
  • Coordination with the CommonTK effort
  • Survey of current implementations and use cases
  • Development of long-term development practices to encourage collaboration
  • IGSIO [2]
  • Preparation meeting minutes [0]
  • Live meeting minutes [3]

OpenIGTLink Revisions

v3 proposal document [4]

Tracked ultrasound OpenIGTLink client

  • Move out part of OpenIGTLinkIF
  • Only use OpenIGTLink and VTK

Commands

SetDeviceParameters

Message

<Command>
  <Parameter Name=”Depth” Value=”45” />
  <Parameter Name=”Gain” Value=”35” />
</Command>

Response 1

<Command>
  <Result>SetDeviceParameters: success</Result>
  <Parameter Name=”Depth” Value=”45” />
  <Parameter Name=”Gain” Value=”35” />
  ...
</Command>

Response 2

<Command>
  <Result>SetDeviceParameters: failure</Result> 
</Command>
GetDeviceParameters

Message

<Command>
  <Parameter Name=”Depth” />
  <Parameter Name=”Gain” />
  ...
</Command>

Response

<Command>
  <Result>GetDeviceParameters: success</Result>
  <Parameter Name=”Depth” Value=”45” />
  <Parameter Name=”Gain” Value=”35” />
  ...
</Command>
SubscribeDeviceParameters

This will cause the server to send a GetDeviceParameters reply every time any of the subscribed parameters change.

Message

<Command>
  <Parameter Name=”Depth” Subscribe=”TRUE” />
  <Parameter Name=”Gain” Subscribe=”FALSE” />
  ...
</Command>

Response

<Command>
  <Result>SubscribeDeviceParameters: success</Result>
  <Parameter Name=”Depth” Subscribed="TRUE" />
  <Parameter Name=”Gain” Subscribed="FALSE" />
  ...
</Command>
GetCapabilities

SINTEF will specify and implement.

Message

<Command></Command>

Response

<Command>
  <Result>GetCapabilities: success</Result>
  <UltrasoundCapabilities>
    <Probes>
      <Probe name="L14-5/38"/>
      <Probe name="C5-2/42"/>
    </Probes>
    <ImagingModes>
      <ImagingMode Name=”b-mode+angio”>B-Mode,Angio</ImagingMode>
    </ImagingModes>
    <Streams>
      <Stream name="B-Mode">
        <Parameters>
          <Parameter name="depth" min="5" max="220" step="5"/>
        </Parameters>
      </Stream>
      <Stream name="Angio">
        <Parameters>
          <Parameter name="depth" min="5" max="220" step="5"/>
        </Parameters>
      </Stream>
    </Streams>
    <Presets>
      <Preset name="Vascular small object B+Angio">
        <Probe Name=”L14-5/38” />
        <Parameter Name=”Depth” Value=”50” />
      </Preset>
    </Presets>
  </UltrasoundCapabilities>
</Command>

Tracking

Tracked ultrasound communication will use the TDATA message.

Use 1 bit of the Reserved byte to indicate valid/invalid status

Use metadata attributes for tool status information:

Attributes

<ToolStatus>
  <Tool Id=”Reference” Status=”WARNING” Description=”Marker 1 on tool X is damaged” />
</ToolStatus>
  • Status
    • "OK"
    • "WARNING"
    • "ERROR"
  • Description: human-readable string

Meta Data

Header V1

Bytes
0   2                       14                                      34              42              50              58
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| V | TYPE                  | DEVICE_NAME                           | TIME_STAMP    | BODY_SIZE     | CRC64         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Header V2

#Bytes HEADER_FIELD

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
0 V 2 TYPE 14 DEV_NAME 34 TS 42 BODY_SIZE 50 CRC64 58 EXT_HEADER_SIZE 60 METADATA_SIZE 64 MSG_ID 68 RV 72 CONTENT… | METADATA… |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  • V = VERSION
  • DEV_NAME = DEVICE_NAME
  • RV = RESERVED
EXT_HEADER

v1 header (58 bytes) + new header (EXT_HEADER_SIZE bytes)

CONTENT (=v1 body)

BODY_SIZE - EXT_HEADER_SIZE - METADATA_SIZE

METADATA

#Bytes HEADER_FIELD

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|INDEX_COUNT (uint16) | KEY_SIZE (uint16) | VALUE_ENCODING (uint16) | VALUE_SIZE (uint32) | … | KEY | VALUE | … |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
VALUE_ENCODING

As specified at http://www.iana.org/assignments/character-sets/character-sets.xhtml

BODY

Contains extended header data, message content, and metadata.

US over OpenIGTLink

Parameters

Read-write

  • Depth (mm): (“40”, “45”, “50”, …)
  • ImagingMode (string): (“bmode”, “bmode+rf”, “bmode+angio”, “rf+angio”, ...)
  • Probe (string): probe name (“L14-5/38”)
  • Frequency (MHz)
  • DynRange (db)
  • Gain (%)
  • Power (%)
  • Zoom (%)
  • SoundVelocity (m/s)
  • TGC (space-separated string, each entry -1.0 to 1.0)
  • AcquisitionState (string): “FREEZE” or “RUN”

Read-only

  • ClipRectangleOrigin="27 27"
  • ClipRectangleSize="766 562"
  • FanAnglesDeg=”-30 30” (for 3D: FanAnglesDeg=”-30 30 -15 15”)
  • FanOriginPixel=”240 10”
  • FanRadiusStartPixel=”30”
  • FanRadiusStopPixel=”500”
  • Encoding: how to interpret values ("BRIGHTNESS", "RF_REAL", "RF_IQ_LINE", "RF_I_LINE_Q_LINE", "RGB_COLOR")

Implementation plan

Tasks

  • Clean up the vtkMRMLIGTLConnectorNode to be logic, MRML and Slicer free
  • Creating a new converter base class which does not depend on MRML
  • Implementation of the new Command Message

Github Fork

  • OpenIGTLinkIF fork [5]
  • OpenIGTLink fork [6]

PLUS

  • Interson probe settings [7]
  • Interson class cleanup [8]
  • Get/Set TGC support for US devices [9]
  • Get transform over OpenIGTLink [10]
  • Sonix transition to imaging parameters [11]

CustusX

  • Example CustusX class [12]

Presentations