MNE-CPP  beta 1.0
mne_hemisphere.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef MNE_HEMISPHERE_H
37 #define MNE_HEMISPHERE_H
38 
39 //*************************************************************************************************************
40 //=============================================================================================================
41 // MNE INCLUDES
42 //=============================================================================================================
43 
44 #include "mne_global.h"
45 #include "mne_cluster_info.h"
46 
47 
48 //*************************************************************************************************************
49 //=============================================================================================================
50 // FIFF INCLUDES
51 //=============================================================================================================
52 
53 #include <fiff/fiff_types.h>
54 #include <fiff/fiff.h>
55 
56 
57 //*************************************************************************************************************
58 //=============================================================================================================
59 // Eigen INCLUDES
60 //=============================================================================================================
61 
62 #include <Eigen/Core>
63 #include <Eigen/SparseCore>
64 
65 
66 //*************************************************************************************************************
67 //=============================================================================================================
68 // QT INCLUDES
69 //=============================================================================================================
70 
71 #include <QList>
72 
73 
74 //*************************************************************************************************************
75 //=============================================================================================================
76 // DEFINE NAMESPACE MNELIB
77 //=============================================================================================================
78 
79 namespace MNELIB
80 {
81 
82 //*************************************************************************************************************
83 //=============================================================================================================
84 // USED NAMESPACES
85 //=============================================================================================================
86 
87 using namespace Eigen;
88 using namespace FIFFLIB;
89 
90 
91 //*************************************************************************************************************
92 //=============================================================================================================
93 // FORWARD DECLARATIONS
94 //=============================================================================================================
95 
96 
97 //=============================================================================================================
103 class MNESHARED_EXPORT MNEHemisphere
104 {
105 public:
106  typedef QSharedPointer<MNEHemisphere> SPtr;
107  typedef QSharedPointer<const MNEHemisphere> ConstSPtr;
109  //=========================================================================================================
113  MNEHemisphere();
114 
115  //=========================================================================================================
121  MNEHemisphere(const MNEHemisphere& p_MNEHemisphere);
122 
123  //=========================================================================================================
127  ~MNEHemisphere();
128 
129  //=========================================================================================================
133  void clear();
134 
135  //=========================================================================================================
143  MatrixXf& getTriCoords(float p_fScaling = 1.0f);
144 
145  //=========================================================================================================
151  inline bool isClustered() const;
152 
153  //=========================================================================================================
167  bool transform_hemisphere_to(fiff_int_t dest, const FiffCoordTrans &p_Trans);
168 
169  //=========================================================================================================
179  void writeToStream(FiffStream* p_pStream);
180 
181  //ToDo write(IODevice &)
182 
183  //=========================================================================================================
187  //QGeometryData* getGeometryData(float p_fScaling = 1.0f);
188 
189 public:
190  fiff_int_t type;
191  fiff_int_t id;
192  fiff_int_t np;
193  fiff_int_t ntri;
194  fiff_int_t coord_frame;
195  MatrixX3f rr;
196  MatrixX3f nn;
197  MatrixX3i tris;
198  fiff_int_t nuse;
199  VectorXi inuse;
200  VectorXi vertno;
201  qint32 nuse_tri;
202  MatrixX3i use_tris;
203  VectorXi nearest;
204  VectorXd nearest_dist;
205  QList<VectorXi> pinfo;
206  VectorXi patch_inds;
207  float dist_limit;
208  SparseMatrix<double> dist;
209  MatrixX3d tri_cent;
210  MatrixX3d tri_nn;
211  VectorXd tri_area;
212  MatrixX3d use_tri_cent;
213  MatrixX3d use_tri_nn;
214  VectorXd use_tri_area;
216  QMap<int, QVector<int>> neighbor_tri;
217  QMap<int, QVector<int>> neighbor_vert;
220 private:
221  // Newly added
222  MatrixXf m_TriCoords;
224 };
225 
226 //*************************************************************************************************************
227 //=============================================================================================================
228 // INLINE DEFINITIONS
229 //=============================================================================================================
230 
231 inline bool MNEHemisphere::isClustered() const
232 {
233  return !cluster_info.isEmpty();
234 }
235 
236 } // NAMESPACE
237 
238 #endif // MNE_HEMISPHERE_H
Old fiff_type declarations - replace them.
QMap< int, QVector< int > > neighbor_vert
MNEClusterInfo cluster_info
SparseMatrix< double > dist
cluster information
MNEClusterInfo class declaration, which provides cluster information.
QSharedPointer< MNEHemisphere > SPtr
Hemisphere provides geometry information.
QSharedPointer< const MNEHemisphere > ConstSPtr
Definition: fiff.h:98
Coordinate transformation description.
FIFF class declaration, which provides static wrapper functions to stay consistent with mne matlab to...
QMap< int, QVector< int > > neighbor_tri
FIFF File I/O routines.
Definition: fiff_stream.h:129
QList< VectorXi > pinfo
bool isClustered() const