Main Page
Namespace List
Class Hierarchy
Alphabetical List
Compound List
File List
Namespace Members
Compound Members
File Members
Go to the documentation of this file.
15 #ifndef __igtlNDArrayMessage_h
16 #define __igtlNDArrayMessage_h
25 #define IGTL_STRING_MESSAGE_DEFAULT_ENCODING 3
54 int SetArray(
void * array);
57 igtlUint64 GetRawArraySize();
65 virtual int GetElementSize() = 0;
68 igtlUint32 GetNumberOfElements();
73 igtlUint32 Get1DIndex(IndexType index);
93 if (Get1DIndex(index) <= GetNumberOfElements()) {
94 T* ByteArray = (T*)GetRawArray();
95 ByteArray[Get1DIndex(index) *
sizeof(T)] = value;
105 if (Get1DIndex(index) <= GetNumberOfElements()) {
106 T* ByteArray = (T*)GetRawArray();
107 value = ByteArray[Get1DIndex(index) *
sizeof(T)];
164 virtual int GetBodyPackSize();
165 virtual int PackBody();
166 virtual int UnpackBody();
179 #endif // _igtlNDArrayMessage_h
SmartPointer< Self > Pointer
int SetValue(IndexType index, T value)
Sets a value of the element specified by 'index'.
void * GetRawArray()
Gets the raw byte array stored in the class.
virtual int GetElementSize()
Gets the size of elements (e.g. 1 byte in case of 8-bit integer)
int GetType()
Gets the type of elements of the array. (e.g. TYPE_INT8)
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...
std::vector< igtlUint16 > IndexType
Vector type for an index of N-D array.
int GetValue(IndexType index, T &value)
Gets a value of the element specified by 'index'.
SmartPointer< const Self > ConstPointer
int m_Type
A variable for the type of the N-D array.
ArrayBase * m_Array
A pointer to the N-D array.
#define igtlTypeMacro(thisClass, superclass)
int GetDimension()
Gets the dimension of the N-D array.
IndexType GetSize()
Gets the size of the N-D array.
ArrayBase * GetArray()
Gets a pointer to the array.
Generated for OpenIGTLink by
Doxygen
1.8.17 written by Dimitri van Heesch,
© 1997-2012