File: igstkCircularSimulatedTracker.h

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 (102 lines) | stat: -rwxr-xr-x 3,020 bytes parent folder | download | duplicates (2)
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
/*=========================================================================

Program:   Image Guided Surgery Software Toolkit
Module:    $RCSfile: igstkCircularSimulatedTracker.h,v $
Language:  C++
Date:      $Date: 2008-06-17 16:58:37 $
Version:   $Revision: 1.2 $

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.

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

#ifndef __igstkCircularSimulatedTracker_h
#define __igstkCircularSimulatedTracker_h

#include "igstkSimulatedTracker.h"

namespace igstk
{

/** \class CircularSimulatedTracker
 *   \brief A simulated tracker that reports a circular movement
 *
 *   The purpose of this class is to provide a minimal 
 *   implementation of a Tracker. This class is intended 
 *   only for minimal demos and for debugging applications.
 *   It is not intended to be used in a real application to
 *   be deployed in a surgery room. 
 *
 *   \ingroup Trackers
 */
class CircularSimulatedTracker : public SimulatedTracker
{
public:

  /** Macro with standard traits declarations. */
  igstkStandardClassTraitsMacro( CircularSimulatedTracker, SimulatedTracker )

  typedef Superclass::TransformType           TransformType;

  /** Scaling factor */
  igstkSetMacro( Radius, double );
  igstkGetMacro( Radius, double );

  /** Angular Speed measured in degrees per second */
  igstkSetMacro( AngularSpeed, double );
  igstkGetMacro( AngularSpeed, double );

protected:

  CircularSimulatedTracker();

  virtual ~CircularSimulatedTracker();

  typedef Tracker::ResultType             ResultType;
  typedef RealTimeClock::TimeStampType    TimeType;

  virtual ResultType InternalOpen( void );

  virtual ResultType InternalStartTracking( void );

  virtual ResultType InternalReset( void );

  virtual ResultType InternalStopTracking( void );

  virtual ResultType InternalClose( void );

  /** Verify tracker tool information */
  virtual ResultType VerifyTrackerToolInformation( TrackerToolType * );

  virtual ResultType RemoveTrackerToolFromInternalDataContainers( 
    const TrackerToolType * );


  /** This is the most important method of this class. It computes the
   * transform that will be passed to the TrackerTool. 
   */
  virtual ResultType InternalUpdateStatus( void );

  virtual ResultType InternalThreadedUpdateStatus( void );
  /** Print object information */
  virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const; 

private:

  CircularSimulatedTracker(const Self&);  //purposely not implemented
  void operator=(const Self&); //purposely not implemented

  double      m_Radius;
  double      m_Angle;
  double      m_AngularSpeed;
  TimeType    m_TimeOfLastUpdate;
};

}

#endif //__igstk_CircularSimulatedTracker_h_