Medical Imaging Interaction Toolkit  2018.4.99-93926fb8
Medical Imaging Interaction Toolkit
mitkIGTLMessageCommon.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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "mitkIGTLMessageCommon.h"
14 #include "mitkException.h"
15 
17 {
18 }
19 
20 
22 {
23 }
24 
25 //bool mitk::IGTLMessageCommon::Clone(igtl::TransformMessage::Pointer clone,
26 // igtl::TransformMessage::Pointer original)
27 //{
28 // bool copySuccess = false;
29 
30 // //copy all meta data
31 // copySuccess = clone->Copy(original);
32 
33 // if ( !copySuccess )
34 // return false;
35 
36 // //copy all data that is important for this class
37 // //copy the matrix
38 // igtl::Matrix4x4 mat;
39 // original->GetMatrix(mat);
40 // clone->SetMatrix(mat);
41 
42 // //copy the normals
43 // float normals[3][3];
44 // original->GetNormals(normals);
45 // clone->SetNormals(normals);
46 
47 // //copy the position
48 // float position[3];
49 // original->GetPosition(position);
50 // clone->SetPosition(position);
51 
52 // return true;
53 //}
54 
55 //igtl::MessageBase::Pointer mitk::IGTLMessageCommon::Clone(igtl::TransformMessage::Pointer original)
56 //{
57 // bool copySuccess = false;
58 // igtl::TransformMessage::Pointer clone_ = igtl::TransformMessage::New();
59 
60 // //initialize the clone
62 
63 // //copy all meta data
64 // copySuccess = clone_->Copy(original);
65 
66 // if ( !copySuccess )
67 // return false;
68 
69 // //copy all data that is important for this class
70 // //copy the matrix
71 // igtl::Matrix4x4 mat;
72 // original->GetMatrix(mat);
73 // clone_->SetMatrix(mat);
74 
75 // //copy the normals
76 // float normals[3][3];
77 // original->GetNormals(normals);
78 // clone_->SetNormals(normals);
79 
80 // //copy the position
81 // float position[3];
82 // original->GetPosition(position);
83 // clone_->SetPosition(position);
84 
85 // return igtl::MessageBase::Pointer(clone_.GetPointer());
86 
88 //}
IGTLMessageCommon()
Clones the input message and returns a igtl::MessageBase::Pointer to the clone.