15#ifndef __igtlImageMessage_h
16#define __igtlImageMessage_h
132 int SetSubVolume(
int dimi,
int dimj,
int dimk,
int offi,
int offj,
int offk);
139 void GetSubVolume(
int &dimi,
int &dimj,
int &dimk,
int &offi,
int &offj,
int &offk);
237 return dimensions[0]*dimensions[1]*dimensions[2]*GetScalarSize()*numComponents;
252 return subDimensions[0]*subDimensions[1]*subDimensions[2]*GetScalarSize()*numComponents;
279 int subDimensions[3];
308 int ScalarSizeTable[12];
HeaderOnlyMessageBase Superclass
SmartPointer< Self > Pointer
igtlTypeMacro(igtl::GetImageMessage, igtl::HeaderOnlyMessageBase)
SmartPointer< const Self > ConstPointer
igtlNewMacro(igtl::GetImageMessage)
void GetMatrix(Matrix4x4 &mat)
Gets the origin/orientation matrix.
void SetScalarTypeToUint16()
Sets the image scalar type to unsigned 16-bit integer.
void SetScalarTypeToInt8()
Sets the image scalar type to 8-bit integer.
int scalarType
A variable for the scalar type of the voxels.
int GetNumComponents()
Gets the number of components for each voxel.
void SetNumComponents(int num)
Sets the number of components for each voxel.
void SetCoordinateSystem(int c)
Sets coordinate system (COORDINATE_RAS or COORDINATE_LPS)
int coordinate
A variable for the scalar type of the voxels.
void * GetScalarPointer()
Gets a pointer to the scalar data.
void SetScalarTypeToUint8()
Sets the image scalar type to unsigned 8-bit integer.
void GetOrigin(float &px, float &py, float &pz)
void SetNormals(float t[3], float s[3], float n[3])
Sets the orientation of the image by the normal vectors for the i, j and k indeces.
int GetScalarType()
Gets the image scalar type.
void GetDimensions(int s[3])
Gets image dimensions as an array of the numbers of pixels in i, j and k directions.
SmartPointer< Self > Pointer
void SetSpacing(float si, float sj, float sk)
Sets spacings by spacing values in i, j and k directions.
void SetScalarTypeToInt16()
Sets the image scalar type to 16-bit integer.
void SetDimensions(int s[3])
void SetNormals(float o[3][3])
void SetSpacing(float s[3])
Sets spacings by an array of spacing values in i, j and k directions.
unsigned char * m_Image
A pointer to the serialized image data.
void SetScalarTypeToInt32()
Sets the image scalar type to 32-bit integer.
virtual int UnpackBody()
Unpacks (deserialize) the body. Must be implemented in a child class.
int GetEndian()
Gets the Endianess of the image scalars.
void GetSpacing(float &si, float &sj, float &sk)
Gets spacings using spacing values in i, j and k directions.
void SetOrigin(float p[3])
int GetScalarSize(int type)
Gets the size of the specified scalar type. (e.g. 1 byte for 8-bit integer)
virtual int GetBodyPackSize()
Gets the size of the serialized body.
int SetSubVolume(int dim[3], int off[3])
int endian
A variable for the Endian of the scalar values in the image.
void GetNormals(float o[3][3])
int GetCoordinateSystem()
Returns coordinate system (COORDINATE_RAS or COORDINATE_LPS)
void GetDimensions(int &i, int &j, int &k)
Gets image dimensions as the numbers of pixels in i, j and k directions.
void SetScalarType(int t)
Sets the image scalar type.
void SetScalarTypeToUint32()
Sets the image scalar type to unsigned 32-bit integer.
void GetSubVolume(int &dimi, int &dimj, int &dimk, int &offi, int &offj, int &offk)
int GetSubVolumeImageSize()
void GetNormals(float t[3], float s[3], float n[3])
Gets the orientation of the image using the normal vectors for the i, j and k indeces.
void GetOrigin(float p[3])
void SetMatrix(Matrix4x4 &mat)
Sets the origin/orientation matrix.
void SetOrigin(float px, float py, float pz)
void SetDimensions(int i, int j, int k)
int numComponents
A variable for the number of components.
int SetSubVolume(int dimi, int dimj, int dimk, int offi, int offj, int offk)
void SetEndian(int e)
Sets the Endianess of the image scalars. (default is ENDIAN_BIG)
virtual int PackBody()
Packs (serialize) the body. Must be implemented in a child class.
void GetSpacing(float s[3])
Gets spacings using an array of spacing values in i, j and k directions.
SmartPointer< const Self > ConstPointer
void GetSubVolume(int dim[3], int off[3])
Gets sub-volume dimensions and offset using arrays of the dimensions and the offset.
unsigned char * m_ImageHeader
A pointer to the serialized image header.
Implements transparent reference counting.
#define igtlTypeMacro(thisClass, superclass)
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...