File: igstkCoordinateSystemSetTransformResult.cxx

package info (click to toggle)
igstk 4.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 38,980 kB
  • sloc: cpp: 86,267; xml: 96; makefile: 75; python: 38
file content (103 lines) | stat: -rw-r--r-- 2,460 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*=========================================================================

  Program:   Image Guided Surgery Software Toolkit
  Module:    $RCSfile: igstkCoordinateSystemSetTransformResult.cxx,v $
  Language:  C++
  Date:      $Date: 2010-11-16 18:13:07 $
  Version:   $Revision: 1.3 $

  Copyright (c) ISC  Insight Software Consortium.  All rights reserved.
  See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

#include "igstkCoordinateSystemSetTransformResult.h"

namespace igstk
{
CoordinateSystemSetTransformResult
::CoordinateSystemSetTransformResult()
{
  m_Source = NULL;
  m_Destination = NULL;
  m_IsAttach = false;
}

CoordinateSystemSetTransformResult
::CoordinateSystemSetTransformResult(
      const CoordinateSystemSetTransformResult& in)
{
  m_Transform = in.m_Transform;
  m_Source = in.m_Source;
  m_Destination = in.m_Destination;
  m_IsAttach  = in.m_IsAttach;
}

const CoordinateSystemSetTransformResult &
CoordinateSystemSetTransformResult
::operator = ( 
      const CoordinateSystemSetTransformResult& in)
{
  if (this != &in)
    {
    m_Transform = in.m_Transform;
    m_Source = in.m_Source;
    m_Destination = in.m_Destination;
    m_IsAttach  = in.m_IsAttach;
    }
  return *this;
}

void
CoordinateSystemSetTransformResult
::Clear()
{
  m_Transform.SetToIdentity( ::igstk::TimeStamp::GetLongestPossibleTime() );
  m_Source = NULL;
  m_Destination = NULL;
  m_IsAttach  = false;
}

void
CoordinateSystemSetTransformResult
::Initialize(const Transform& trans, 
             const CoordinateSystem* src,
             const CoordinateSystem* dst, bool isAttaching)
{
  m_Transform = trans;
  m_Source = src;
  m_Destination = dst;
  m_IsAttach = isAttaching;
}

const Transform & 
CoordinateSystemSetTransformResult
::GetTransform() const
{
  return this->m_Transform;
}

const CoordinateSystem * 
CoordinateSystemSetTransformResult
::GetSource() const
{
  return this->m_Source;
}

const CoordinateSystem *
CoordinateSystemSetTransformResult
::GetDestination() const
{
  return this->m_Destination;
}

bool CoordinateSystemSetTransformResult::IsAttach() const
{
  return this->m_IsAttach;
}

} // end namespace igstk