15 #ifndef __igtlImageMessage_h
16 #define __igtlImageMessage_h
108 void SetDimensions(
int s[3]);
113 void SetDimensions(
int i,
int j,
int k);
116 void GetDimensions(
int s[3]);
119 void GetDimensions(
int &i,
int &j,
int &k);
125 int SetSubVolume(
int dim[3],
int off[3]);
132 int SetSubVolume(
int dimi,
int dimj,
int dimk,
int offi,
int offj,
int offk);
135 void GetSubVolume(
int dim[3],
int off[3]);
139 void GetSubVolume(
int &dimi,
int &dimj,
int &dimk,
int &offi,
int &offj,
int &offk);
142 void SetSpacing(
float s[3]);
145 void SetSpacing(
float si,
float sj,
float sk);
148 void GetSpacing(
float s[3]);
151 void GetSpacing(
float &si,
float &sj,
float &sk);
155 void SetOrigin(
float p[3]);
159 void SetOrigin(
float px,
float py,
float pz);
163 void GetOrigin(
float p[3]);
167 void GetOrigin(
float &px,
float &py,
float &pz);
171 void SetNormals(
float o[3][3]);
174 void SetNormals(
float t[3],
float s[3],
float n[3]);
178 void GetNormals(
float o[3][3]);
181 void GetNormals(
float t[3],
float s[3],
float n[3]);
184 void SetNumComponents(
int num);
187 int GetNumComponents();
237 return dimensions[0]*dimensions[1]*dimensions[2]*GetScalarSize()*numComponents;
252 return subDimensions[0]*subDimensions[1]*subDimensions[2]*GetScalarSize()*numComponents;
257 void AllocateScalars();
260 void* GetScalarPointer();
268 virtual int GetBodyPackSize();
269 virtual int PackBody();
270 virtual int UnpackBody();
279 int subDimensions[3];
307 int ScalarSizeTable[12];
313 #endif // _igtlImageMessage_h
void SetCoordinateSystem(int c)
Sets coordinate system (COORDINATE_RAS or COORDINATE_LPS)
void SetScalarType(int t)
Sets the image scalar type.
#define igtlTypeMacro(thisClass, superclass)
void SetScalarTypeToInt16()
Sets the image scalar type to 16-bit integer.
SmartPointer< const Self > ConstPointer
Matrix4x4 matrix
A matrix representing the origin and the orientation of the image.
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...
unsigned char * m_Image
A pointer to the serialized image data.
int GetScalarType()
Gets the image scalar type.
void SetScalarTypeToUint8()
Sets the image scalar type to unsigned 8-bit integer.
int coordinate
A variable for the scalar type of the voxels.
SmartPointer< Self > Pointer
void SetScalarTypeToUint16()
Sets the image scalar type to unsigned 16-bit integer.
HeaderOnlyMessageBase Superclass
void SetScalarTypeToInt8()
Sets the image scalar type to 8-bit integer.
int GetScalarSize(int type)
Gets the size of the specified scalar type. (e.g. 1 byte for 8-bit integer)
void SetScalarTypeToUint32()
Sets the image scalar type to unsigned 32-bit integer.
SmartPointer< Self > Pointer
int GetCoordinateSystem()
Returns coordinate system (COORDINATE_RAS or COORDINATE_LPS)
int numComponents
A variable for the number of components.
SmartPointer< const Self > ConstPointer
unsigned char * m_ImageHeader
A pointer to the serialized image header.
int scalarType
A variable for the scalar type of the voxels.
void SetEndian(int e)
Sets the Endianess of the image scalars. (default is ENDIAN_BIG)
int GetSubVolumeImageSize()
int endian
A variable for the Endian of the scalar values in the image.
int GetEndian()
Gets the Endianess of the image scalars.
void SetScalarTypeToInt32()
Sets the image scalar type to 32-bit integer.