#include <igtlImageMessage.h>
Public Types | |
enum | { COORDINATE_LPS, COORDINATE_RAS } |
enum | { ENDIAN_BIG, ENDIAN_LITTLE } |
enum | { DTYPE_SCALAR = 1, DTYPE_VECTOR = 2 } |
enum | { TYPE_INT8 = 2, TYPE_UINT8 = 3, TYPE_INT16 = 4, TYPE_UINT16 = 5, TYPE_INT32 = 6, TYPE_UINT32 = 7, TYPE_FLOAT32 = 10, TYPE_FLOAT64 = 11 } |
enum | { UNPACK_UNDEF = 0x0000, UNPACK_HEADER = 0x0001, UNPACK_BODY = 0x0002 } |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef ImageMessage | Self |
typedef MessageBase | Superclass |
Public Member Functions | |
void | AllocatePack () |
void | AllocateScalars () |
int | Copy (const MessageBase *mb) |
virtual LightObject::Pointer | CreateAnother () const |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
virtual void | Delete () |
int | GetBodySizeToRead () |
const char * | GetBodyType () |
bool | GetDebug () const |
const char * | GetDeviceName () |
const char * | GetDeviceType () |
void | GetDimensions (int &i, int &j, int &k) |
void | GetDimensions (int s[3]) |
int | GetEndian () |
int | GetImageSize () |
void | GetMatrix (Matrix4x4 &mat) |
virtual const char * | GetNameOfClass () const |
void | GetNormals (float t[3], float s[3], float n[3]) |
void | GetNormals (float o[3][3]) |
void | GetOrigin (float &px, float &py, float &pz) |
void | GetOrigin (float p[3]) |
void * | GetPackBodyPointer () |
int | GetPackBodySize () |
void * | GetPackPointer () |
int | GetPackSize () |
virtual int | GetReferenceCount () const |
void * | GetScalarPointer () |
int | GetScalarSize (int type) |
int | GetScalarSize () |
int | GetScalarType () |
void | GetSpacing (float &si, float &sj, float &sk) |
void | GetSpacing (float s[3]) |
void | GetSubVolume (int &dimi, int &dimj, int &dimk, int &offi, int &offj, int &offk) |
void | GetSubVolume (int dim[3], int off[3]) |
int | GetSubVolumeImageSize () |
void | GetTimeStamp (igtl::TimeStamp::Pointer &ts) |
int | GetTimeStamp (unsigned int *sec, unsigned int *frac) |
igtlTypeMacro (Object, LightObject) | |
void | InitPack () |
int | Pack () |
void | Print (std::ostream &os) const |
virtual void | Register () const |
void | SetDebug (bool debugFlag) const |
void | SetDeviceName (const char *name) |
void | SetDimensions (int i, int j, int k) |
void | SetDimensions (int s[3]) |
void | SetEndian (int e) |
void | SetMatrix (Matrix4x4 &mat) |
virtual int | SetMessageHeader (const MessageHeader *mb) |
void | SetNormals (float t[3], float s[3], float n[3]) |
void | SetNormals (float o[3][3]) |
void | SetOrigin (float px, float py, float pz) |
void | SetOrigin (float p[3]) |
virtual void | SetReferenceCount (int) |
void | SetScalarType (int t) |
void | SetScalarTypeToInt16 () |
void | SetScalarTypeToInt32 () |
void | SetScalarTypeToInt8 () |
void | SetScalarTypeToUint16 () |
void | SetScalarTypeToUint32 () |
void | SetScalarTypeToUint8 () |
void | SetSpacing (float si, float sj, float sk) |
void | SetSpacing (float s[3]) |
int | SetSubVolume (int dimi, int dimj, int dimk, int offi, int offj, int offk) |
int | SetSubVolume (int dim[3], int off[3]) |
void | SetTimeStamp (igtl::TimeStamp::Pointer &ts) |
int | SetTimeStamp (unsigned int sec, unsigned int frac) |
int | Unpack (int crccheck=0) |
virtual void | UnRegister () const |
Static Public Member Functions | |
static void | BreakOnError () |
static Pointer | New () |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static void | SetGlobalWarningDisplay (bool flag) |
Protected Member Functions | |
void | AllocatePack (int bodySize) |
int | CopyBody (const MessageBase *mb) |
int | CopyHeader (const MessageBase *mb) |
virtual int | GetBodyPackSize () |
ImageMessage () | |
virtual int | PackBody () |
virtual void | PrintSelf (std::ostream &os) const |
virtual int | UnpackBody () |
~ImageMessage () | |
virtual void | PrintHeader (std::ostream &os) const |
virtual void | PrintTrailer (std::ostream &os) const |
Protected Attributes | |
int | coordinate |
int | dataType |
int | dimensions [3] |
int | endian |
unsigned char * | m_Body |
int | m_BodySizeToRead |
std::string | m_BodyType |
std::string | m_DefaultBodyType |
std::string | m_DeviceName |
unsigned char * | m_Header |
unsigned char * | m_Image |
unsigned char * | m_ImageHeader |
int | m_IsBodyUnpacked |
int | m_IsHeaderUnpacked |
int | m_PackSize |
volatile int | m_ReferenceCount |
SimpleFastMutexLock | m_ReferenceCountLock |
unsigned int | m_TimeStampSec |
unsigned int | m_TimeStampSecFraction |
Matrix4x4 | matrix |
int | ScalarSizeTable [12] |
int | scalarType |
float | spacing [3] |
int | subDimensions [3] |
int | subOffset [3] |
Definition at line 29 of file igtlImageMessage.h.
typedef SmartPointer<const Self> igtl::ImageMessage::ConstPointer |
typedef SmartPointer<Self> igtl::ImageMessage::Pointer |
typedef ImageMessage igtl::ImageMessage::Self |
Smart pointer typedef support.
Reimplemented from igtl::MessageBase.
Definition at line 32 of file igtlImageMessage.h.
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
TYPE_INT8 | |
TYPE_UINT8 | |
TYPE_INT16 | |
TYPE_UINT16 | |
TYPE_INT32 | |
TYPE_UINT32 | |
TYPE_FLOAT32 | |
TYPE_FLOAT64 |
Definition at line 57 of file igtlImageMessage.h.
anonymous enum [inherited] |
igtl::ImageMessage::ImageMessage | ( | ) | [protected] |
igtl::ImageMessage::~ImageMessage | ( | ) | [protected] |
void igtl::MessageBase::AllocatePack | ( | int | bodySize | ) | [protected, inherited] |
void igtl::MessageBase::AllocatePack | ( | ) | [inherited] |
void igtl::ImageMessage::AllocateScalars | ( | ) |
static void igtl::LightObject::BreakOnError | ( | ) | [static, inherited] |
This method is called when igtlExceptionMacro executes. It allows the debugger to break on error.
int igtl::MessageBase::Copy | ( | const MessageBase * | mb | ) | [inherited] |
int igtl::MessageBase::CopyBody | ( | const MessageBase * | mb | ) | [protected, inherited] |
int igtl::MessageBase::CopyHeader | ( | const MessageBase * | mb | ) | [protected, inherited] |
virtual LightObject::Pointer igtl::Object::CreateAnother | ( | ) | const [virtual, inherited] |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from igtl::LightObject.
virtual void igtl::Object::DebugOff | ( | ) | const [virtual, inherited] |
Turn debugging output off.
virtual void igtl::Object::DebugOn | ( | ) | const [virtual, inherited] |
Turn debugging output on.
virtual void igtl::LightObject::Delete | ( | ) | [virtual, inherited] |
Delete an igtl object. This method should always be used to delete an object when the new operator was used to create it. Using the C delete method will not work with reference counting.
virtual int igtl::ImageMessage::GetBodyPackSize | ( | ) | [protected, virtual] |
Reimplemented from igtl::MessageBase.
int igtl::MessageBase::GetBodySizeToRead | ( | ) | [inline, inherited] |
Definition at line 131 of file igtlMessageBase.h.
const char* igtl::MessageBase::GetBodyType | ( | ) | [inline, inherited] |
Definition at line 114 of file igtlMessageBase.h.
bool igtl::Object::GetDebug | ( | ) | const [inherited] |
Get the value of the debug flag.
const char* igtl::MessageBase::GetDeviceName | ( | ) | [inherited] |
const char* igtl::MessageBase::GetDeviceType | ( | ) | [inherited] |
void igtl::ImageMessage::GetDimensions | ( | int & | i, | |
int & | j, | |||
int & | k | |||
) |
void igtl::ImageMessage::GetDimensions | ( | int | s[3] | ) |
int igtl::ImageMessage::GetEndian | ( | ) | [inline] |
Definition at line 119 of file igtlImageMessage.h.
static bool igtl::Object::GetGlobalWarningDisplay | ( | ) | [static, inherited] |
This is a global flag that controls whether any debug, warning or error messages are displayed.
int igtl::ImageMessage::GetImageSize | ( | ) | [inline] |
Definition at line 122 of file igtlImageMessage.h.
void igtl::ImageMessage::GetMatrix | ( | Matrix4x4 & | mat | ) |
virtual const char* igtl::LightObject::GetNameOfClass | ( | ) | const [inline, virtual, inherited] |
Return the name of this class as a string. Used by the object factory (implemented in New()) to instantiate objects of a named type. Also used for debugging and other output information.
Definition at line 86 of file igtlLightObject.h.
void igtl::ImageMessage::GetNormals | ( | float | t[3], | |
float | s[3], | |||
float | n[3] | |||
) |
void igtl::ImageMessage::GetNormals | ( | float | o[3][3] | ) |
void igtl::ImageMessage::GetOrigin | ( | float & | px, | |
float & | py, | |||
float & | pz | |||
) |
void igtl::ImageMessage::GetOrigin | ( | float | p[3] | ) |
void* igtl::MessageBase::GetPackBodyPointer | ( | ) | [inherited] |
int igtl::MessageBase::GetPackBodySize | ( | ) | [inherited] |
void* igtl::MessageBase::GetPackPointer | ( | ) | [inherited] |
int igtl::MessageBase::GetPackSize | ( | ) | [inherited] |
virtual int igtl::LightObject::GetReferenceCount | ( | ) | const [inline, virtual, inherited] |
Gets the reference count on this object.
Definition at line 112 of file igtlLightObject.h.
void* igtl::ImageMessage::GetScalarPointer | ( | ) |
int igtl::ImageMessage::GetScalarSize | ( | int | type | ) | [inline] |
Definition at line 115 of file igtlImageMessage.h.
int igtl::ImageMessage::GetScalarSize | ( | ) | [inline] |
Definition at line 114 of file igtlImageMessage.h.
int igtl::ImageMessage::GetScalarType | ( | ) | [inline] |
Definition at line 113 of file igtlImageMessage.h.
void igtl::ImageMessage::GetSpacing | ( | float & | si, | |
float & | sj, | |||
float & | sk | |||
) |
void igtl::ImageMessage::GetSpacing | ( | float | s[3] | ) |
void igtl::ImageMessage::GetSubVolume | ( | int & | dimi, | |
int & | dimj, | |||
int & | dimk, | |||
int & | offi, | |||
int & | offj, | |||
int & | offk | |||
) |
void igtl::ImageMessage::GetSubVolume | ( | int | dim[3], | |
int | off[3] | |||
) |
int igtl::ImageMessage::GetSubVolumeImageSize | ( | ) | [inline] |
Definition at line 127 of file igtlImageMessage.h.
void igtl::MessageBase::GetTimeStamp | ( | igtl::TimeStamp::Pointer & | ts | ) | [inherited] |
int igtl::MessageBase::GetTimeStamp | ( | unsigned int * | sec, | |
unsigned int * | frac | |||
) | [inherited] |
static void igtl::Object::GlobalWarningDisplayOff | ( | ) | [inline, static, inherited] |
This is a global flag that controls whether any debug, warning or error messages are displayed.
Definition at line 118 of file igtlObject.h.
References igtl::Object::SetGlobalWarningDisplay().
static void igtl::Object::GlobalWarningDisplayOn | ( | ) | [inline, static, inherited] |
This is a global flag that controls whether any debug, warning or error messages are displayed.
Definition at line 116 of file igtlObject.h.
References igtl::Object::SetGlobalWarningDisplay().
igtl::Object::igtlTypeMacro | ( | Object | , | |
LightObject | ||||
) | [inherited] |
Standard part of all igtl objects.
void igtl::MessageBase::InitPack | ( | ) | [inherited] |
static Pointer igtl::Object::New | ( | ) | [static, inherited] |
Method for creation through the object factory.
Reimplemented from igtl::LightObject.
Referenced by igtl::CreateObjectFunction< T >::CreateObject().
int igtl::MessageBase::Pack | ( | ) | [inherited] |
virtual int igtl::ImageMessage::PackBody | ( | ) | [protected, virtual] |
Reimplemented from igtl::MessageBase.
void igtl::LightObject::Print | ( | std::ostream & | os | ) | const [inherited] |
Cause the object to print itself out.
virtual void igtl::LightObject::PrintHeader | ( | std::ostream & | os | ) | const [protected, virtual, inherited] |
virtual void igtl::Object::PrintSelf | ( | std::ostream & | os | ) | const [protected, virtual, inherited] |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from igtl::LightObject.
Reimplemented in igtl::FastMutexLock, igtl::MutexLock, igtl::ObjectFactoryBase, and igtl::TimeStamp.
virtual void igtl::LightObject::PrintTrailer | ( | std::ostream & | os | ) | const [protected, virtual, inherited] |
virtual void igtl::Object::Register | ( | ) | const [virtual, inherited] |
Return this objects modified time. Update the modification time for this object. Many filters rely on the modification time to determine if they need to recompute their data. Increase the reference count (mark as used by another object).
Reimplemented from igtl::LightObject.
void igtl::Object::SetDebug | ( | bool | debugFlag | ) | const [inherited] |
Set the value of the debug flag. A non-zero value turns debugging on.
void igtl::MessageBase::SetDeviceName | ( | const char * | name | ) | [inherited] |
void igtl::ImageMessage::SetDimensions | ( | int | i, | |
int | j, | |||
int | k | |||
) |
void igtl::ImageMessage::SetDimensions | ( | int | s[3] | ) |
void igtl::ImageMessage::SetEndian | ( | int | e | ) | [inline] |
Definition at line 118 of file igtlImageMessage.h.
static void igtl::Object::SetGlobalWarningDisplay | ( | bool | flag | ) | [static, inherited] |
This is a global flag that controls whether any debug, warning or error messages are displayed.
Referenced by igtl::Object::GlobalWarningDisplayOff(), and igtl::Object::GlobalWarningDisplayOn().
void igtl::ImageMessage::SetMatrix | ( | Matrix4x4 & | mat | ) |
virtual int igtl::MessageBase::SetMessageHeader | ( | const MessageHeader * | mb | ) | [inline, virtual, inherited] |
void igtl::ImageMessage::SetNormals | ( | float | t[3], | |
float | s[3], | |||
float | n[3] | |||
) |
void igtl::ImageMessage::SetNormals | ( | float | o[3][3] | ) |
void igtl::ImageMessage::SetOrigin | ( | float | px, | |
float | py, | |||
float | pz | |||
) |
void igtl::ImageMessage::SetOrigin | ( | float | p[3] | ) |
virtual void igtl::Object::SetReferenceCount | ( | int | ) | [virtual, inherited] |
Sets the reference count (use with care)
Reimplemented from igtl::LightObject.
void igtl::ImageMessage::SetScalarType | ( | int | t | ) | [inline] |
Definition at line 106 of file igtlImageMessage.h.
void igtl::ImageMessage::SetScalarTypeToInt16 | ( | ) | [inline] |
Definition at line 109 of file igtlImageMessage.h.
void igtl::ImageMessage::SetScalarTypeToInt32 | ( | ) | [inline] |
Definition at line 111 of file igtlImageMessage.h.
void igtl::ImageMessage::SetScalarTypeToInt8 | ( | ) | [inline] |
Definition at line 107 of file igtlImageMessage.h.
void igtl::ImageMessage::SetScalarTypeToUint16 | ( | ) | [inline] |
Definition at line 110 of file igtlImageMessage.h.
void igtl::ImageMessage::SetScalarTypeToUint32 | ( | ) | [inline] |
Definition at line 112 of file igtlImageMessage.h.
void igtl::ImageMessage::SetScalarTypeToUint8 | ( | ) | [inline] |
Definition at line 108 of file igtlImageMessage.h.
void igtl::ImageMessage::SetSpacing | ( | float | si, | |
float | sj, | |||
float | sk | |||
) |
void igtl::ImageMessage::SetSpacing | ( | float | s[3] | ) |
int igtl::ImageMessage::SetSubVolume | ( | int | dimi, | |
int | dimj, | |||
int | dimk, | |||
int | offi, | |||
int | offj, | |||
int | offk | |||
) |
int igtl::ImageMessage::SetSubVolume | ( | int | dim[3], | |
int | off[3] | |||
) |
void igtl::MessageBase::SetTimeStamp | ( | igtl::TimeStamp::Pointer & | ts | ) | [inherited] |
int igtl::MessageBase::SetTimeStamp | ( | unsigned int | sec, | |
unsigned int | frac | |||
) | [inherited] |
int igtl::MessageBase::Unpack | ( | int | crccheck = 0 |
) | [inherited] |
virtual int igtl::ImageMessage::UnpackBody | ( | ) | [protected, virtual] |
Reimplemented from igtl::MessageBase.
virtual void igtl::Object::UnRegister | ( | ) | const [virtual, inherited] |
Decrease the reference count (release by another object).
Reimplemented from igtl::LightObject.
int igtl::ImageMessage::coordinate [protected] |
Definition at line 155 of file igtlImageMessage.h.
int igtl::ImageMessage::dataType [protected] |
Definition at line 153 of file igtlImageMessage.h.
int igtl::ImageMessage::dimensions[3] [protected] |
Definition at line 145 of file igtlImageMessage.h.
int igtl::ImageMessage::endian [protected] |
Definition at line 152 of file igtlImageMessage.h.
unsigned char* igtl::MessageBase::m_Body [protected, inherited] |
Definition at line 161 of file igtlMessageBase.h.
int igtl::MessageBase::m_BodySizeToRead [protected, inherited] |
Definition at line 163 of file igtlMessageBase.h.
std::string igtl::MessageBase::m_BodyType [protected, inherited] |
Definition at line 167 of file igtlMessageBase.h.
std::string igtl::MessageBase::m_DefaultBodyType [protected, inherited] |
Definition at line 166 of file igtlMessageBase.h.
std::string igtl::MessageBase::m_DeviceName [protected, inherited] |
Definition at line 168 of file igtlMessageBase.h.
unsigned char* igtl::MessageBase::m_Header [protected, inherited] |
Definition at line 160 of file igtlMessageBase.h.
unsigned char* igtl::ImageMessage::m_Image [protected] |
Definition at line 158 of file igtlImageMessage.h.
unsigned char* igtl::ImageMessage::m_ImageHeader [protected] |
Definition at line 157 of file igtlImageMessage.h.
int igtl::MessageBase::m_IsBodyUnpacked [protected, inherited] |
Definition at line 175 of file igtlMessageBase.h.
int igtl::MessageBase::m_IsHeaderUnpacked [protected, inherited] |
Definition at line 174 of file igtlMessageBase.h.
int igtl::MessageBase::m_PackSize [protected, inherited] |
Definition at line 159 of file igtlMessageBase.h.
volatile int igtl::LightObject::m_ReferenceCount [mutable, protected, inherited] |
Number of uses of this object by other objects.
Definition at line 133 of file igtlLightObject.h.
SimpleFastMutexLock igtl::LightObject::m_ReferenceCountLock [mutable, protected, inherited] |
Mutex lock to protect modification to the reference count
Definition at line 136 of file igtlLightObject.h.
unsigned int igtl::MessageBase::m_TimeStampSec [protected, inherited] |
Definition at line 170 of file igtlMessageBase.h.
unsigned int igtl::MessageBase::m_TimeStampSecFraction [protected, inherited] |
Definition at line 171 of file igtlMessageBase.h.
Matrix4x4 igtl::ImageMessage::matrix [protected] |
Definition at line 150 of file igtlImageMessage.h.
int igtl::ImageMessage::ScalarSizeTable[12] [protected] |
Definition at line 160 of file igtlImageMessage.h.
int igtl::ImageMessage::scalarType [protected] |
Definition at line 154 of file igtlImageMessage.h.
float igtl::ImageMessage::spacing[3] [protected] |
Definition at line 146 of file igtlImageMessage.h.
int igtl::ImageMessage::subDimensions[3] [protected] |
Definition at line 147 of file igtlImageMessage.h.
int igtl::ImageMessage::subOffset[3] [protected] |
Definition at line 148 of file igtlImageMessage.h.