vtkIGTLToMRMLBase.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __vtkIGTLToMRMLBase_h
00016 #define __vtkIGTLToMRMLBase_h
00017
00018 #include "vtkObject.h"
00019 #include "vtkOpenIGTLinkIFWin32Header.h"
00020 #include "vtkMRMLScene.h"
00021 #include "vtkMRMLNode.h"
00022 #include "igtlMessageBase.h"
00023 #include <vector>
00024 #include <string>
00025
00026 #ifdef OpenIGTLinkIF_USE_VERSION_2
00027 class vtkMRMLIGTLQueryNode;
00028 #endif //OpenIGTLinkIF_USE_VERSION_2
00029
00030 class VTK_OPENIGTLINKIF_EXPORT vtkIGTLToMRMLBase : public vtkObject
00031 {
00032
00033 public:
00034
00035
00036
00037
00038
00039
00040 enum {
00041 TYPE_NORMAL,
00042 TYPE_MULTI_IGTL_NAMES,
00043 };
00044
00045
00046 public:
00047
00048 static vtkIGTLToMRMLBase *New();
00049 vtkTypeRevisionMacro(vtkIGTLToMRMLBase,vtkObject);
00050
00051 void PrintSelf(ostream& os, vtkIndent indent);
00052
00053 virtual int GetConverterType() { return TYPE_NORMAL; };
00054
00055
00056 virtual const char* GetIGTLName() { return NULL;};
00057 virtual const char* GetMRMLName() { return NULL;};
00058
00059
00060 virtual const char* GetIGTLStartQueryName() { return NULL; };
00061 virtual const char* GetIGTLStopQueryName() { return NULL; };
00062 virtual const char* GetIGTLGetQueryName() { return NULL; };
00063 virtual const char* GetIGTLStatusName() { return NULL; };
00064
00065
00066
00067
00068 virtual vtkIntArray* GetNodeEvents() { return NULL; };
00069 virtual vtkMRMLNode* CreateNewNode(vtkMRMLScene* vtkNotUsed(scene), const char* vtkNotUsed(name))
00070 { return NULL; };
00071
00072
00073 int GetNumberOfIGTLNames() { return this->IGTLNames.size(); };
00074 const char* GetIGTLName(int index) { return this->IGTLNames[index].c_str(); };
00075
00076
00077
00078
00079
00080 virtual int IGTLToMRML(igtl::MessageBase::Pointer vtkNotUsed(buffer),
00081 vtkMRMLNode* vtkNotUsed(node)) { return 0; };
00082
00083
00084
00085
00086
00087 virtual int MRMLToIGTL(unsigned long vtkNotUsed(event), vtkMRMLNode* vtkNotUsed(mrmlNode),
00088 int* vtkNotUsed(size), void** vtkNotUsed(igtlMsg)){ return 0; };
00089
00090
00091
00092 virtual int CheckQueryQue(double ctime) { return true; }
00093
00094 vtkGetMacro( CheckCRC, int );
00095 vtkSetMacro( CheckCRC, int );
00096
00097 protected:
00098 vtkIGTLToMRMLBase();
00099 ~vtkIGTLToMRMLBase();
00100
00101 protected:
00102
00103
00104
00105 std::vector<std::string> IGTLNames;
00106
00107
00108 int CheckCRC;
00109
00110 };
00111
00112
00113 #endif //__vtkIGTLToMRMLBase_h