fw4spl
NavigationSeries.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWMEDDATA_NAVIGATIONSERIES_HPP__
8 #define __FWMEDDATA_NAVIGATIONSERIES_HPP__
9 
10 #include "fwMedData/config.hpp"
11 #include "fwMedData/Series.hpp"
12 
13 #include <fwData/factory/new.hpp>
14 
15 #include <array>
16 #include <map>
17 
18 fwCampAutoDeclareDataMacro((fwMedData)(NavigationSeries), FWMEDDATA_API);
19 
20 namespace fwMedData
21 {
22 
23 class Series;
24 
28 class FWMEDDATA_CLASS_API NavigationSeries : public ::fwMedData::Series
29 {
30 
31 public:
33  (()),
34  ::fwData::factory::New< NavigationSeries >);
35 
36  fwCampMakeFriendDataMacro((fwMedData)(NavigationSeries));
37 
38  typedef std::array<double, 3> CoordinateType;
39  typedef double TimestampType;
40  typedef std::map<TimestampType, CoordinateType> ContainerType;
41 
46  FWMEDDATA_API NavigationSeries(::fwData::Object::Key key);
47 
49  FWMEDDATA_API virtual ~NavigationSeries();
50 
52  FWMEDDATA_API void shallowCopy( const ::fwData::Object::csptr& _source ) override;
53 
55  FWMEDDATA_API void cachedDeepCopy( const ::fwData::Object::csptr& _source, DeepCopyCacheType& cache ) override;
56 
58  FWMEDDATA_API void addPosition(TimestampType time, const CoordinateType& pos);
59 
61  FWMEDDATA_API void addMove(TimestampType time, const CoordinateType& dir);
62 
64  FWMEDDATA_API void addLookAt(TimestampType time, const CoordinateType& point);
65 
67  FWMEDDATA_API void erasePosition(TimestampType time);
68 
70  FWMEDDATA_API void eraseMove(TimestampType time);
71 
73  FWMEDDATA_API void eraseLookAt(TimestampType time);
74 
76  FWMEDDATA_API void clearPosition();
77 
79  FWMEDDATA_API void clearMove();
80 
82  FWMEDDATA_API void clearLookAt();
83 
85  FWMEDDATA_API const ContainerType& getPositionMap() const;
86 
88  FWMEDDATA_API const ContainerType& getMoveMap() const;
89 
91  FWMEDDATA_API const ContainerType& getLookAtMap() const;
92 
93 protected:
94 
95  ContainerType m_position;
96  ContainerType m_move;
97  ContainerType m_lookAt;
98 };
99 
100 } //end namespace fwMedData
101 
102 #endif // __FWMEDDATA_NAVIGATIONSERIES_HPP__
103 
Namespace containing medical data.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
Holds navigation information.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.