MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkIGTLDummyMessage.cpp
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13
15
16#include "igtl_header.h"
17#include "igtl_util.h"
18
19
21{
22}
23
27
28void mitk::IGTLDummyMessage::SetDummyString( const std::string& dummyString )
29{
30 this->m_dummyString = dummyString;
31 this->m_String = "This is a dummy string";
32}
33
35{
36 return this->m_dummyString;
37}
38
39igtl::MessageBase::Pointer mitk::IGTLDummyMessage::Clone()
40{
41 //initialize the clone
42 mitk::IGTLDummyMessage::Pointer clone = mitk::IGTLDummyMessage::New();
43
44 //copy the data
45 clone->SetString(this->GetString());
46 clone->SetDummyString(this->GetDummyString());
47
48 return igtl::MessageBase::Pointer(clone.GetPointer());
49}
50
57igtl::MessageBase::Pointer mitk::DummyMsgCloneHandler::Clone(igtl::MessageBase* original_)
58{
59 mitk::IGTLDummyMessage* original = (mitk::IGTLDummyMessage*)original_;
60 return original->Clone();
61}
This class is a dummy message to show how to implement a new message type.
void SetDummyString(const std::string &dummyString)
igtl::MessageBase::Pointer Clone() override