PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkPlusIgtlMessageFactory Class Reference

Factory class of supported OpenIGTLink message types. More...

#include <src/PlusOpenIGTLink/vtkPlusIgtlMessageFactory.h>

Inheritance diagram for vtkPlusIgtlMessageFactory:
Inheritance graph
[legend]
Collaboration diagram for vtkPlusIgtlMessageFactory:
Collaboration graph
[legend]

Public Types

typedef igtl::MessageBase::Pointer(* PointerToMessageBaseNew) ()
 
typedef vtkObject Superclass
 

Public Member Functions

igtl::MessageHeader::Pointer CreateHeaderMessage (int headerVersion) const
 
igtl::MessageBase::Pointer CreateReceiveMessage (igtl::MessageHeader::Pointer headerMsg) const
 
igtl::MessageBase::Pointer CreateSendMessage (const std::string &messageType, int headerVersion) const
 
virtual const char * GetClassName ()
 
virtual vtkPlusIgtlMessageFactory::PointerToMessageBaseNew GetMessageTypeNewPointer (const std::string &messageTypeName)
 
virtual int IsA (const char *type)
 
PlusStatus PackMessages (int clientId, const PlusIgtlClientInfo &clientInfo, std::vector< igtl::MessageBase::Pointer > &igtMessages, igsioTrackedFrame &trackedFrame, bool packValidTransformsOnly, vtkIGSIOTransformRepository *transformRepository=NULL)
 
virtual void PrintAvailableMessageTypes (ostream &os, vtkIndent indent)
 
virtual void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkPlusIgtlMessageFactoryNew ()
 
static vtkPlusIgtlMessageFactorySafeDownCast (vtkObject *o)
 

Protected Member Functions

int PackCommandMessage (igtl::MessageBase::Pointer igtlMessage, std::vector< igtl::MessageBase::Pointer > &igtlMessages)
 
int PackImageMessage (const PlusIgtlClientInfo &clientInfo, vtkIGSIOTransformRepository &transformRepository, const std::string &messageType, igtl::MessageBase::Pointer igtlMessage, igsioTrackedFrame &trackedFrame, std::vector< igtl::MessageBase::Pointer > &igtlMessages, int clientId)
 
int PackPositionMessage (const PlusIgtlClientInfo &clientInfo, vtkIGSIOTransformRepository &transformRepository, igtl::MessageBase::Pointer igtlMessage, igsioTrackedFrame &trackedFrame, std::vector< igtl::MessageBase::Pointer > &igtlMessages)
 
int PackStringMessage (const PlusIgtlClientInfo &clientInfo, igsioTrackedFrame &trackedFrame, igtl::MessageBase::Pointer igtlMessage, std::vector< igtl::MessageBase::Pointer > &igtlMessages)
 
int PackTrackedFrameMessage (igtl::MessageBase::Pointer igtlMessage, const PlusIgtlClientInfo &clientInfo, vtkIGSIOTransformRepository &transformRepository, igsioTrackedFrame &trackedFrame, std::vector< igtl::MessageBase::Pointer > &igtlMessages)
 
int PackTrackingDataMessage (const PlusIgtlClientInfo &clientInfo, igsioTrackedFrame &trackedFrame, vtkIGSIOTransformRepository &transformRepository, bool packValidTransformsOnly, igtl::MessageBase::Pointer igtlMessage, std::vector< igtl::MessageBase::Pointer > &igtlMessages)
 
int PackTransformMessage (const PlusIgtlClientInfo &clientInfo, vtkIGSIOTransformRepository &transformRepository, bool packValidTransformsOnly, igtl::MessageBase::Pointer igtlMessage, igsioTrackedFrame &trackedFrame, std::vector< igtl::MessageBase::Pointer > &igtlMessages)
 
int PackUsMessage (igtl::MessageBase::Pointer igtlMessage, igsioTrackedFrame &trackedFrame, std::vector< igtl::MessageBase::Pointer > &igtlMessages)
 
 vtkPlusIgtlMessageFactory ()
 
virtual ~vtkPlusIgtlMessageFactory ()
 

Protected Attributes

igtl::MessageFactory::Pointer IgtlFactory
 

Detailed Description

Factory class of supported OpenIGTLink message types.

This class is a factory class of supported OpenIGTLink message types to localize the message creation code.

Definition at line 35 of file vtkPlusIgtlMessageFactory.h.

Member Typedef Documentation

◆ PointerToMessageBaseNew

typedef igtl::MessageBase::Pointer(* vtkPlusIgtlMessageFactory::PointerToMessageBaseNew) ()

Function pointer for storing New() static methods of igtl::MessageBase classes

Definition at line 43 of file vtkPlusIgtlMessageFactory.h.

◆ Superclass

Definition at line 39 of file vtkPlusIgtlMessageFactory.h.

Constructor & Destructor Documentation

◆ vtkPlusIgtlMessageFactory()

vtkPlusIgtlMessageFactory::vtkPlusIgtlMessageFactory ( )
protected

Definition at line 51 of file vtkPlusIgtlMessageFactory.cxx.

◆ ~vtkPlusIgtlMessageFactory()

vtkPlusIgtlMessageFactory::~vtkPlusIgtlMessageFactory ( )
protectedvirtual

Definition at line 60 of file vtkPlusIgtlMessageFactory.cxx.

Member Function Documentation

◆ CreateHeaderMessage()

igtl::MessageHeader::Pointer vtkPlusIgtlMessageFactory::CreateHeaderMessage ( int  headerVersion) const

Constructs a message header. Throws invalid_argument if headerMsg is NULL. Throws invalid_argument if this->IsValid(headerMsg) returns false. Creates message, calls InitBuffer()

Definition at line 91 of file vtkPlusIgtlMessageFactory.cxx.

◆ CreateReceiveMessage()

igtl::MessageBase::Pointer vtkPlusIgtlMessageFactory::CreateReceiveMessage ( igtl::MessageHeader::Pointer  headerMsg) const

Constructs a message from the given populated header. Throws invalid_argument if headerMsg is NULL. Throws invalid_argument if this->IsValid(headerMsg) returns false. Creates message, sets header onto message and calls AllocateBuffer() on the message.

Definition at line 97 of file vtkPlusIgtlMessageFactory.cxx.

◆ CreateSendMessage()

igtl::MessageBase::Pointer vtkPlusIgtlMessageFactory::CreateSendMessage ( const std::string &  messageType,
int  headerVersion 
) const

Constructs an empty message from the given message type. Throws invalid_argument if messageType is empty. Creates message, sets header onto message and calls AllocateBuffer() on the message.

Definition at line 126 of file vtkPlusIgtlMessageFactory.cxx.

◆ GetClassName()

virtual const char* vtkPlusIgtlMessageFactory::GetClassName ( )
virtual

◆ GetMessageTypeNewPointer()

vtkPlusIgtlMessageFactory::PointerToMessageBaseNew vtkPlusIgtlMessageFactory::GetMessageTypeNewPointer ( const std::string &  messageTypeName)
virtual

Get pointer to message type new function, or NULL if the message type not registered Usage: igtl::MessageBase::Pointer message = GetMessageTypeNewPointer("IMAGE")();

Definition at line 73 of file vtkPlusIgtlMessageFactory.cxx.

◆ IsA()

virtual int vtkPlusIgtlMessageFactory::IsA ( const char *  type)
virtual

◆ IsTypeOf()

static int vtkPlusIgtlMessageFactory::IsTypeOf ( const char *  type)
static

◆ New()

static vtkPlusIgtlMessageFactory* vtkPlusIgtlMessageFactory::New ( )
static

◆ PackCommandMessage()

int vtkPlusIgtlMessageFactory::PackCommandMessage ( igtl::MessageBase::Pointer  igtlMessage,
std::vector< igtl::MessageBase::Pointer > &  igtlMessages 
)
protected

Definition at line 222 of file vtkPlusIgtlMessageFactory.cxx.

◆ PackImageMessage()

int vtkPlusIgtlMessageFactory::PackImageMessage ( const PlusIgtlClientInfo clientInfo,
vtkIGSIOTransformRepository &  transformRepository,
const std::string &  messageType,
igtl::MessageBase::Pointer  igtlMessage,
igsioTrackedFrame &  trackedFrame,
std::vector< igtl::MessageBase::Pointer > &  igtlMessages,
int  clientId 
)
protected

Definition at line 405 of file vtkPlusIgtlMessageFactory.cxx.

◆ PackMessages()

PlusStatus vtkPlusIgtlMessageFactory::PackMessages ( int  clientId,
const PlusIgtlClientInfo clientInfo,
std::vector< igtl::MessageBase::Pointer > &  igtMessages,
igsioTrackedFrame &  trackedFrame,
bool  packValidTransformsOnly,
vtkIGSIOTransformRepository *  transformRepository = NULL 
)

Generate and pack IGTL messages from tracked frame

Parameters
clientIdId of the client that messages will be sent to
packValidTransformsOnlyControl whether or not to pack transform messages if they contain invalid transforms
clientInfoSpecifies list of message types and names to generate for a client.
igtMessagesOutput list for the generated IGTL messages
trackedFrameInput tracked frame data used for IGTL message generation
transformRepositoryTransform repository used for computing the selected transforms

Definition at line 142 of file vtkPlusIgtlMessageFactory.cxx.

◆ PackPositionMessage()

int vtkPlusIgtlMessageFactory::PackPositionMessage ( const PlusIgtlClientInfo clientInfo,
vtkIGSIOTransformRepository &  transformRepository,
igtl::MessageBase::Pointer  igtlMessage,
igsioTrackedFrame &  trackedFrame,
std::vector< igtl::MessageBase::Pointer > &  igtlMessages 
)
protected

Definition at line 303 of file vtkPlusIgtlMessageFactory.cxx.

◆ PackStringMessage()

int vtkPlusIgtlMessageFactory::PackStringMessage ( const PlusIgtlClientInfo clientInfo,
igsioTrackedFrame &  trackedFrame,
igtl::MessageBase::Pointer  igtlMessage,
std::vector< igtl::MessageBase::Pointer > &  igtlMessages 
)
protected

Definition at line 233 of file vtkPlusIgtlMessageFactory.cxx.

◆ PackTrackedFrameMessage()

int vtkPlusIgtlMessageFactory::PackTrackedFrameMessage ( igtl::MessageBase::Pointer  igtlMessage,
const PlusIgtlClientInfo clientInfo,
vtkIGSIOTransformRepository &  transformRepository,
igsioTrackedFrame &  trackedFrame,
std::vector< igtl::MessageBase::Pointer > &  igtlMessages 
)
protected

Definition at line 266 of file vtkPlusIgtlMessageFactory.cxx.

◆ PackTrackingDataMessage()

int vtkPlusIgtlMessageFactory::PackTrackingDataMessage ( const PlusIgtlClientInfo clientInfo,
igsioTrackedFrame &  trackedFrame,
vtkIGSIOTransformRepository &  transformRepository,
bool  packValidTransformsOnly,
igtl::MessageBase::Pointer  igtlMessage,
std::vector< igtl::MessageBase::Pointer > &  igtlMessages 
)
protected

Definition at line 334 of file vtkPlusIgtlMessageFactory.cxx.

◆ PackTransformMessage()

int vtkPlusIgtlMessageFactory::PackTransformMessage ( const PlusIgtlClientInfo clientInfo,
vtkIGSIOTransformRepository &  transformRepository,
bool  packValidTransformsOnly,
igtl::MessageBase::Pointer  igtlMessage,
igsioTrackedFrame &  trackedFrame,
std::vector< igtl::MessageBase::Pointer > &  igtlMessages 
)
protected

Definition at line 366 of file vtkPlusIgtlMessageFactory.cxx.

◆ PackUsMessage()

int vtkPlusIgtlMessageFactory::PackUsMessage ( igtl::MessageBase::Pointer  igtlMessage,
igsioTrackedFrame &  trackedFrame,
std::vector< igtl::MessageBase::Pointer > &  igtlMessages 
)
protected

Definition at line 251 of file vtkPlusIgtlMessageFactory.cxx.

◆ PrintAvailableMessageTypes()

void vtkPlusIgtlMessageFactory::PrintAvailableMessageTypes ( ostream &  os,
vtkIndent  indent 
)
virtual

Print all supported OpenIGTLink message types

Definition at line 79 of file vtkPlusIgtlMessageFactory.cxx.

◆ PrintSelf()

void vtkPlusIgtlMessageFactory::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Definition at line 66 of file vtkPlusIgtlMessageFactory.cxx.

◆ SafeDownCast()

static vtkPlusIgtlMessageFactory* vtkPlusIgtlMessageFactory::SafeDownCast ( vtkObject *  o)
static

Member Data Documentation

◆ IgtlFactory

igtl::MessageFactory::Pointer vtkPlusIgtlMessageFactory::IgtlFactory
protected

Definition at line 87 of file vtkPlusIgtlMessageFactory.h.


The documentation for this class was generated from the following files: