Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtlImageMetaMessage.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Open IGT Link Library
4  Module: $HeadURL: http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink2_beta/Source/igtlImgmetaMessage.h $
5  Language: C++
6  Date: $Date: 2009-12-16 23:58:02 -0500 (Wed, 16 Dec 2009) $
7  Version: $Revision: 5466 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notices for more information.
14 
15 =========================================================================*/
16 
17 #ifndef __igtlImageMetaMessage_h
18 #define __igtlImageMetaMessage_h
19 
20 #include <vector>
21 #include <string>
22 
23 #include "igtlObject.h"
24 //#include "igtlMacros.h"
25 #include "igtlMath.h"
26 #include "igtlMessageBase.h"
27 #include "igtlTypes.h"
28 
29 #include "igtlImageMessage.h"
30 
31 namespace igtl
32 {
33 
35 {
36 public:
38  typedef Object Superclass;
41 
44 
45 public:
46  int SetName(const char* name);
47  const char* GetName() { return this->m_Name.c_str(); };
48 
49  int SetDeviceName(const char* devname);
50  const char* GetDeviceName() { return this->m_DeviceName.c_str(); };
51 
52  int SetModality(const char* modality);
53  const char* GetModality() { return this->m_Modality.c_str(); };
54 
55  int SetPatientName(const char* patname);
56  const char* GetPatientName() { return this->m_PatientName.c_str(); };
57 
58  int SetPatientID(const char* patid);
59  const char* GetPatientID() { return this->m_PatientID.c_str(); }
60 
61  void SetTimeStamp(igtl::TimeStamp::Pointer& time);
62  void GetTimeStamp(igtl::TimeStamp::Pointer& time);
63 
64  void SetSize(igtlUint16 size[3]);
65  void SetSize(igtlUint16 sx, igtlUint16 sy, igtlUint16 sz);
66  void GetSize(igtlUint16* size);
67  void GetSize(igtlUint16& sx, igtlUint16& sy, igtlUint16& sz);
68 
69  void SetScalarType(igtlUint8 type);
70  igtlUint8 GetScalarType();
71 
72 protected:
75 
76 protected:
77 
78  std::string m_Name; /* name / description (< 64 bytes)*/
79  std::string m_DeviceName; /* device name to query the IMAGE and COLORT */
80  std::string m_Modality; /* modality name (< 32 bytes) */
81  std::string m_PatientName; /* patient name (< 64 bytes) */
82  std::string m_PatientID; /* patient ID (MRN etc.) (< 64 bytes) */
84  igtlUint16 m_Size[3]; /* entire image volume size */
85  igtlUint8 m_ScalarType; /* scalar type. see scalar_type in IMAGE message */
86 
87 };
88 
89 
91 {
92 public:
97 
100 
101 protected:
102  GetImageMetaMessage() : MessageBase() { this->m_DefaultBodyType = "GET_IMGMETA"; };
104 protected:
105  virtual int GetBodyPackSize() { return 0; };
106  virtual int PackBody() { AllocatePack(); return 1; };
107  virtual int UnpackBody() { return 1; };
108 };
109 
110 
112 {
113 public:
118 
121 
122 public:
123  int AddImageMetaElement(ImageMetaElement::Pointer& elem);
124  void ClearImageMetaElement();
125 
126  int GetNumberOfImageMetaElement();
127  void GetImageMetaElement(int index, ImageMetaElement::Pointer& elem);
128 
129 
130 protected:
132  ~ImageMetaMessage();
133 
134 protected:
135 
136  virtual int GetBodyPackSize();
137  virtual int PackBody();
138  virtual int UnpackBody();
139 
140  std::vector<ImageMetaElement::Pointer> m_ImageMetaList;
141 
142 };
143 
144 
145 } // namespace igtl
146 
147 #endif // _igtlImageMetaMessage_h
148 
149 
150 
151 

Generated at Thu Mar 20 2014 16:32:06 for OpenIGTLink by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2000