Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkIGTLDummyMessage.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 
18 #include "mitkIGTLDummyMessage.h"
19 
20 #include "igtl_header.h"
21 #include "igtl_util.h"
22 
23 
25 {
26  this->m_DefaultBodyType = "DUMMY";
27 }
28 
30 {
31 }
32 
33 void mitk::IGTLDummyMessage::SetDummyString( const std::string& dummyString )
34 {
35  this->m_dummyString = dummyString;
36  this->m_String = "This is a dummy string";
37 }
38 
40 {
41  return this->m_dummyString;
42 }
43 
45 {
46  //initialize the clone
48 
49  //copy the data
50  clone->SetString(this->GetString());
51  clone->SetDummyString(this->GetDummyString());
52 
53  return igtl::MessageBase::Pointer(clone.GetPointer());
54 }
55 
63 {
64  mitk::IGTLDummyMessage* original = (mitk::IGTLDummyMessage*)original_;
65  return original->Clone();
66 }
itk::SmartPointer< Self > Pointer
void SetDummyString(const std::string &dummyString)
Pointer Clone() const
igtl::SmartPointer< Self > Pointer
igtl::MessageBase::Pointer Clone()
static void clone(T *&dst, S *src, int n)
Definition: svm.cpp:73
This class is a dummy message to show the how to implement a new message type.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.