Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxIGTLinkImageMessage.cpp
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #include "cxIGTLinkImageMessage.h"
13 //#include "igtlMessageBase.h"
14 //#include "igtl_header.h"
15 //#include <string.h>
16 
17 //namespace cx
18 //{
19 //IGTLinkImageMessage::IGTLinkImageMessage():
20 // igtl::ImageMessage()
21 //{}
22 
23 //IGTLinkImageMessage::~IGTLinkImageMessage()
24 //{}
25 
26 //int IGTLinkImageMessage::Pack()
27 //{
28 // PackBody();
29 // igtl::MessageBase::m_IsBodyUnpacked = 0;
30 
31 // // pack header
32 // igtl_header* h = (igtl_header*) igtl::MessageBase::m_Header;
33 
34 // //igtl_uint64 crc = crc64(0, 0, 0LL); // initial crc //SKIPPING CRC
35 
36 // h->version = IGTL_HEADER_VERSION;
37 
38 // igtl_uint64 ts = igtl::MessageBase::m_TimeStampSec & 0xFFFFFFFF;
39 // ts = (ts << 32) | (igtl::MessageBase::m_TimeStampSecFraction & 0xFFFFFFFF);
40 
41 // h->timestamp = ts;
42 // h->body_size = GetBodyPackSize();
43 // //h->crc = crc64((unsigned char*)igtl::MessageBase::m_Body, GetBodyPackSize(), crc); //SKIPPING CRC
44 // h->crc = 0;
45 
46 // strncpy(h->name, igtl::MessageBase::m_DefaultBodyType.c_str(), 12);
47 // // TODO: this does not allow creating pack with MessageBase class...
48 
49 // strncpy(h->device_name, igtl::MessageBase::m_DeviceName.c_str(), 20);
50 
51 // igtl_header_convert_byte_order(h);
52 
53 // igtl::MessageBase::m_IsHeaderUnpacked = 0;
54 
55 // return 1;
56 //}
57 //}//namespace cx