Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkTrackingTool.h
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 #ifndef MITKTRACKINGTOOL_H_HEADER_INCLUDED_
19 #define MITKTRACKINGTOOL_H_HEADER_INCLUDED_
20 
21 #include <itkObject.h>
22 #include <MitkIGTExports.h>
23 #include <mitkCommon.h>
24 #include <mitkNumericTypes.h>
25 #include <itkFastMutexLock.h>
26 
27 namespace mitk
28 {
36  class MITKIGT_EXPORT TrackingTool : public itk::Object
37  {
38  public:
40 
41  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const override;
42 
43  virtual void SetToolTip(Point3D toolTipPosition, Quaternion orientation, ScalarType eps=0.0) = 0;
44  virtual void GetPosition(Point3D& position) const = 0;
45  virtual void GetOrientation(Quaternion& orientation) const = 0;
46  virtual bool Enable() = 0;
47  virtual bool Disable() = 0;
48  virtual bool IsEnabled() const = 0;
49  virtual bool IsDataValid() const = 0;
50  virtual float GetTrackingError() const = 0;
51  virtual const char* GetToolName() const;
52  virtual const char* GetErrorMessage() const;
53  itkSetMacro(IGTTimeStamp, double);
54  itkGetConstMacro(IGTTimeStamp, double);
55 
56  protected:
57  TrackingTool();
58  virtual ~TrackingTool();
59  std::string m_ToolName;
60  std::string m_ErrorMessage;
61  double m_IGTTimeStamp;
63  };
64 } // namespace mitk
65 #endif /* MITKTRACKINGTOOL_H_HEADER_INCLUDED_ */
Interface for all Tracking Tools.
itk::SmartPointer< Self > Pointer
double m_IGTTimeStamp
contains the time at which the tracking data was recorded
double ScalarType
std::string m_ErrorMessage
if a tool is invalid, this member should contain a human readable explanation of why it is invalid ...
itk::FastMutexLock::Pointer m_MyMutex
mutex to control concurrent access to the tool
DataCollection - Class to facilitate loading/accessing structured data.
Time stamp in milliseconds.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
vnl_quaternion< ScalarType > Quaternion
std::string m_ToolName
every tool has a name that can be used to identify it.
MITKCORE_EXPORT const ScalarType eps