MNE-CPP  beta 1.0
fiff_coord_trans.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef FIFF_COORD_TRANS_H
37 #define FIFF_COORD_TRANS_H
38 
39 //*************************************************************************************************************
40 //=============================================================================================================
41 // FIFF INCLUDES
42 //=============================================================================================================
43 
44 #include "fiff_global.h"
45 #include "fiff_types.h"
46 
47 
48 //*************************************************************************************************************
49 //=============================================================================================================
50 // Qt INCLUDES
51 //=============================================================================================================
52 
53 #include <QSharedPointer>
54 
55 
56 //*************************************************************************************************************
57 //=============================================================================================================
58 // Eigen INCLUDES
59 //=============================================================================================================
60 
61 #include <Eigen/Core>
62 #include <Eigen/LU>
63 
64 
65 //*************************************************************************************************************
66 //=============================================================================================================
67 // DEFINE NAMESPACE FIFFLIB
68 //=============================================================================================================
69 
70 namespace FIFFLIB
71 {
72 
73 //*************************************************************************************************************
74 //=============================================================================================================
75 // USED NAMESPACES
76 //=============================================================================================================
77 
78 using namespace Eigen;
79 
80 
81 //=============================================================================================================
88 {
89 public:
90  typedef QSharedPointer<FiffCoordTrans> SPtr;
91  typedef QSharedPointer<const FiffCoordTrans> ConstSPtr;
93  //=========================================================================================================
98 
99  //=========================================================================================================
105  FiffCoordTrans(const FiffCoordTrans &p_FiffCoordTrans);
106 
107  //=========================================================================================================
111  ~FiffCoordTrans();
112 
113  //=========================================================================================================
117  void clear();
118 
119  //=========================================================================================================
128  bool invert_transform();
129 
130  //=========================================================================================================
136  inline bool isEmpty() const
137  {
138  return this->from < 0;
139  }
140 
141  //=========================================================================================================
147  inline static qint32 storageSize();
148 
149 public:
150  fiff_int_t from;
151  fiff_int_t to;
152  Matrix<float, 4,4, DontAlign> trans;
153  Matrix<float, 4,4, DontAlign> invtrans;
155 // ### OLD STRUCT ###
156 // Coordinate transformation descriptor
157 // typedef struct _fiffCoordTransRec {
158 // fiff_int_t from; /< Source coordinate system. /
159 // fiff_int_t to; /< Destination coordinate system. /
160 // fiff_float_t rot[3][3]; /< The forward transform (rotation part) /
161 // fiff_float_t move[3]; /< The forward transform (translation part) /
162 // fiff_float_t invrot[3][3]; /< The inverse transform (rotation part) /
163 // fiff_float_t invmove[3]; /< The inverse transform (translation part) /
164 // } *fiffCoordTrans, fiffCoordTransRec; /< Coordinate transformation descriptor /
165 
166 // typedef fiffCoordTransRec fiff_coord_trans_t;
167 };
168 
169 
170 //*************************************************************************************************************
171 //=============================================================================================================
172 // INLINE DEFINITIONS
173 //=============================================================================================================
174 
176 {
177  return 104;
178 }
179 
180 } // NAMESPACE
181 
182 #endif // FIFF_COORD_TRANS_H
Old fiff_type declarations - replace them.
QSharedPointer< FiffCoordTrans > SPtr
QSharedPointer< const FiffCoordTrans > ConstSPtr
Matrix< float, 4, 4, DontAlign > invtrans
static qint32 storageSize()
#define FIFFSHARED_EXPORT
Definition: fiff_global.h:58
Fiff library export/import macros.
Definition: fiff.h:98
Coordinate transformation description.
Matrix< float, 4, 4, DontAlign > trans