PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
igtlPlusUsMessage.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2 Program: Plus
3 Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4 See License.txt for details.
5 =========================================================Plus=header=end*/
6 #ifndef __igtlPlusUsMessage_h
7 #define __igtlPlusUsMessage_h
8 
9 #include "vtkPlusOpenIGTLinkExport.h"
10 
11 #include "igtlImageMessage.h"
12 #include "igtl_types.h"
13 
14 class igsioTrackedFrame;
15 
16 namespace igtl
17 {
24  class vtkPlusOpenIGTLinkExport PlusUsMessage: public igtl::ImageMessage
25  {
26  public:
27  igtlTypeMacro(igtl::PlusUsMessage, igtl::ImageMessage);
28  igtlNewMacro(igtl::PlusUsMessage);
29 
30  public:
32  virtual igtl::MessageBase::Pointer Clone();
33 
35  PlusStatus SetTrackedFrame( const igsioTrackedFrame& trackedFrame);
36 
38  igsioTrackedFrame& GetTrackedFrame();
39 
40  protected:
41 
42  struct MessageHeader
43  {
44  size_t GetMessageHeaderSize();
45  void ConvertEndianness();
46 
47  igtl_int32 m_DataType; // US data type
48  igtl_int32 m_TransmitFrequency; // transmit frequency of ultrasound probe
49  igtl_int32 m_SamplingFrequency; // sampling frequency of ultrasound machine
50  igtl_int32 m_DataRate; // frame rate or pulse repetition period in Doppler modes
51  igtl_int32 m_LineDensity; // Line density: can be used to calculate elment spacing if potch and native # elements is known
52 
53  igtl_int32 m_SteeringAngle; // Steering Angle of Ultrasound image
54  igtl_int32 m_ProbeID; // ID of ultrasound probe
55  igtl_int32 m_ExtensionAngle; // Extension Angle
56  igtl_int32 m_Elements; // The number of elements in the probe that acquire the image
57  igtl_int32 m_Pitch; // The spacing between elements of the probe that acquired the image
58 
59  igtl_int32 m_Radius; // The curvature of the probe that acquired the image
60  igtl_int32 m_ProbeAngle; // The field of view of the probe that acquired the image. (Phased array)
61  igtl_int32 m_TxOffset; // For phased array, the number of elements that are offset in the steered image
62  };
63 
64  virtual igtlUint64 CalculateContentBufferSize();
65  virtual int PackContent();
66  virtual int UnpackContent();
67 
68  PlusUsMessage();
69  ~PlusUsMessage();
70 
71  igsioTrackedFrame m_TrackedFrame;
73  };
74 }
75 
76 #endif
igsioTrackedFrame m_TrackedFrame
igsioStatus PlusStatus
Definition: PlusCommon.h:40
IGTL message helper class for sending USMessage device messages as IMAGE type message from tracked fr...
MessageHeader m_MessageHeader