MNE-CPP  0.1.9
A Framework for Electrophysiology
data3Dtreemodel.h
Go to the documentation of this file.
1 //=============================================================================================================
37 #ifndef DISP3DLIB_DATA3DTREEMODEL_H
38 #define DISP3DLIB_DATA3DTREEMODEL_H
39 
40 //=============================================================================================================
41 // INCLUDES
42 //=============================================================================================================
43 
44 #include "../../disp3D_global.h"
45 
46 #include "items/common/types.h"
47 
49 #include <mne/mne_bem.h>
50 
52 
53 //=============================================================================================================
54 // QT INCLUDES
55 //=============================================================================================================
56 
57 #include <QStandardItemModel>
58 #include <QPointer>
59 
60 //=============================================================================================================
61 // EIGEN INCLUDES
62 //=============================================================================================================
63 
64 //=============================================================================================================
65 // FORWARD DECLARATIONS
66 //=============================================================================================================
67 
68 namespace Qt3DCore {
69  class QEntity;
70 }
71 
72 class QSurfaceFormat;
73 
74 namespace FSLIB {
75  class SurfaceSet;
76  class AnnotationSet;
77  class Annotation;
78  class Surface;
79 }
80 
81 namespace MNELIB {
82  class MNESourceSpace;
83  class MNEBem;
84  class MNESourceEstimate;
85  class MNEBemSurface;
86 }
87 
88 namespace FIFFLIB{
89  class FiffEvoked;
90  class FiffDigPointSet;
91 }
92 
93 namespace INVERSELIB{
94  class ECDSet;
95 }
96 
97 //=============================================================================================================
98 // DEFINE NAMESPACE DISP3DLIB
99 //=============================================================================================================
100 
101 namespace DISP3DLIB
102 {
103 
104 //=============================================================================================================
105 // DISP3DLIB FORWARD DECLARATIONS
106 //=============================================================================================================
107 
108 class MneDataTreeItem;
109 class NetworkTreeItem;
110 class EcdDataTreeItem;
111 class FsSurfaceTreeItem;
112 class SourceSpaceTreeItem;
113 class BemTreeItem;
114 class SensorSetTreeItem;
115 class DigitizerSetTreeItem;
116 class SubjectTreeItem;
117 class MeasurementTreeItem;
118 class SensorDataTreeItem;
119 
120 //=============================================================================================================
126 class DISP3DSHARED_EXPORT Data3DTreeModel : public QStandardItemModel
127 {
128  Q_OBJECT
129 
130 public:
131  typedef QSharedPointer<Data3DTreeModel> SPtr;
132  typedef QSharedPointer<const Data3DTreeModel> ConstSPtr;
134  //=========================================================================================================
140  explicit Data3DTreeModel(QObject *parent = 0);
141 
142  //=========================================================================================================
146  QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
147  int columnCount(const QModelIndex &parent) const;
148  QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
149  Qt::ItemFlags flags(const QModelIndex &index) const;
150 
151  //=========================================================================================================
164  QList<FsSurfaceTreeItem*> addSurfaceSet(const QString& sSubject,
165  const QString& sMriSetName,
166  const FSLIB::SurfaceSet& surfaceSet,
167  const FSLIB::AnnotationSet& annotationSet = FSLIB::AnnotationSet());
168 
169  //=========================================================================================================
180  FsSurfaceTreeItem* addSurface(const QString& sSubject,
181  const QString& sSet,
182  const FSLIB::Surface& surface,
183  const FSLIB::Annotation& annotation = FSLIB::Annotation());
184 
185  //=========================================================================================================
195  QList<SourceSpaceTreeItem*> addSourceSpace(const QString& sSubject,
196  const QString& sMeasurementSetName,
197  const MNELIB::MNESourceSpace& sourceSpace);
198 
199  //=========================================================================================================
209  QList<SourceSpaceTreeItem*> addForwardSolution(const QString& sSubject,
210  const QString& sMeasurementSetName,
211  const MNELIB::MNEForwardSolution& forwardSolution);
212 
213  //=========================================================================================================
226  MneDataTreeItem* addSourceData(const QString& sSubject,
227  const QString& sMeasurementSetName,
228  const MNELIB::MNESourceEstimate& tSourceEstimate,
229  const MNELIB::MNEForwardSolution& tForwardSolution,
230  const FSLIB::SurfaceSet& tSurfSet,
231  const FSLIB::AnnotationSet& tAnnotSet);
232 
233  //=========================================================================================================
243  EcdDataTreeItem* addDipoleFitData(const QString& sSubject,
244  const QString& sSet,
245  const INVERSELIB::ECDSet& ecdSet);
246 
247  //=========================================================================================================
257  QList<NetworkTreeItem*> addConnectivityData(const QString& sSubject,
258  const QString& sMeasurementSetName,
259  const QList<CONNECTIVITYLIB::Network>& networkData);
260 
261  //=========================================================================================================
271  NetworkTreeItem* addConnectivityData(const QString& sSubject,
272  const QString& sMeasurementSetName,
273  const CONNECTIVITYLIB::Network& networkData);
274 
275  //=========================================================================================================
285  BemTreeItem* addBemData(const QString& sSubject,
286  const QString& sBemSetName,
287  const MNELIB::MNEBem& bem);
288 
289  //=========================================================================================================
301  SensorSetTreeItem* addMegSensorInfo(const QString& sSubject,
302  const QString& sSensorSetName,
303  const QList<FIFFLIB::FiffChInfo>& lChInfo,
304  const MNELIB::MNEBem& sensor = MNELIB::MNEBem(),
305  const QStringList &bads = QStringList());
306 
307  //=========================================================================================================
318  SensorSetTreeItem* addEegSensorInfo(const QString& sSubject,
319  const QString& sSensorSetName,
320  const QList<FIFFLIB::FiffChInfo>& lChInfo,
321  const QStringList &bads = QStringList());
322 
323  //=========================================================================================================
333  DigitizerSetTreeItem* addDigitizerData(const QString& sSubject,
334  const QString& sMeasurementSetName,
335  const FIFFLIB::FiffDigPointSet &digitizer);
336 
337  //=========================================================================================================
350  SensorDataTreeItem* addSensorData(const QString& sSubject,
351  const QString& sMeasurementSetName,
352  const Eigen::MatrixXd& matSensorData,
353  const MNELIB::MNEBemSurface& tBemSurface,
354  const FIFFLIB::FiffInfo &fiffInfo,
355  const QString &sDataType);
356 
357  //=========================================================================================================
363  QPointer<Qt3DCore::QEntity> getRootEntity();
364 
365 protected:
366  //=========================================================================================================
374  SubjectTreeItem* addSubject(const QString& sSubject);
375 
376  //=========================================================================================================
391  SensorDataTreeItem *addCpuSensorData(const QString& sSubject,
392  const QString& sMeasurementSetName,
393  const Eigen::MatrixXd& matSensorData,
394  const MNELIB::MNEBemSurface& tBemSurface,
395  const FIFFLIB::FiffInfo &fiffInfo,
396  const QString &sDataType,
397  const double dCancelDist,
398  const QString &sInterpolationFunction);
399 
400  //=========================================================================================================
415  SensorDataTreeItem *addGpuSensorData(const QString& sSubject,
416  const QString& sMeasurementSetName,
417  const Eigen::MatrixXd& matSensorData,
418  const MNELIB::MNEBemSurface& tBemSurface,
419  const FIFFLIB::FiffInfo &fiffInfo,
420  const QString &sDataType,
421  const double dCancelDist,
422  const QString &sInterpolationFunction);
423 
424  //=========================================================================================================
428  void initMetatypes();
429 
430  QStandardItem* m_pRootItem;
431  QPointer<Qt3DCore::QEntity> m_pModelEntity;
432 };
433 } // NAMESPACE
434 
435 #endif // DISP3DLIB_DATA3DTREEMODEL_H
DISP3DLIB::Data3DTreeModel::ConstSPtr
QSharedPointer< const Data3DTreeModel > ConstSPtr
Definition: data3Dtreemodel.h:132
DISP3DLIB::Data3DTreeModel::m_pRootItem
QStandardItem * m_pRootItem
Definition: data3Dtreemodel.h:430
MNELIB::MNEBem
BEM descritpion.
Definition: mne_bem.h:89
CONNECTIVITYLIB::Network
This class holds information about a network, can compute a distance table and provide network metric...
Definition: network.h:88
network.h
Network class declaration.
DISP3DLIB::DigitizerSetTreeItem
DigitizerSetTreeItem provides a tree item to hold the set of digitizer data.
Definition: digitizersettreeitem.h:92
FIFFLIB::FiffInfo
FIFF measurement file information.
Definition: fiff_info.h:84
DISP3DLIB::MneDataTreeItem
Provides a generic brain tree item to hold real time data.
Definition: mnedatatreeitem.h:99
FSLIB::AnnotationSet
Annotation set.
Definition: annotationset.h:80
MNELIB::MNEForwardSolution
Forward operator.
Definition: mne_forwardsolution.h:170
MNELIB::MNESourceSpace
Source Space descritpion.
Definition: mne_sourcespace.h:92
DISP3DLIB::SensorDataTreeItem
This item integrates GeometryInfo and Interpolation into Disp3D structure.
Definition: sensordatatreeitem.h:92
DISP3DLIB::SubjectTreeItem
Provides a generic SubjectTreeItem.
Definition: subjecttreeitem.h:77
INVERSELIB::ECDSet
Holds a set of Electric Current Dipoles.
Definition: ecd_set.h:80
DISP3DLIB::FsSurfaceTreeItem
Provides a generic brain tree item.
Definition: fssurfacetreeitem.h:83
DISP3DLIB::Data3DTreeModel
Data3DTreeModel provides a tree based data model to hold all information about data which was added t...
Definition: data3Dtreemodel.h:126
DISP3DLIB::Data3DTreeModel::m_pModelEntity
QPointer< Qt3DCore::QEntity > m_pModelEntity
Definition: data3Dtreemodel.h:431
types.h
Contains general application specific types.
MNELIB::MNESourceEstimate
Source estimation.
Definition: mne_sourceestimate.h:84
FSLIB::SurfaceSet
A hemisphere set of surfaces.
Definition: surfaceset.h:71
DISP3DLIB::SensorSetTreeItem
Provides a generic SensorSetTreeItem.
Definition: sensorsettreeitem.h:92
mne_bem.h
MNEBem class declaration.
mne_forwardsolution.h
MNEForwardSolution class declaration, which provides the forward solution including the source space ...
DISP3DLIB::BemTreeItem
BemTreeItem provides a tree item to hold BEM models.
Definition: bemtreeitem.h:88
FSLIB::Annotation
Free surfer annotation.
Definition: annotation.h:80
FSLIB::Surface
FreeSurfer surface mesh.
Definition: surface.h:75
DISP3DLIB::EcdDataTreeItem
Provides a generic brain tree item to hold real time data.
Definition: ecddatatreeitem.h:86
MNELIB::MNEBemSurface
BEM surface provides geometry information.
Definition: mne_bem_surface.h:79
DISP3DSHARED_EXPORT
#define DISP3DSHARED_EXPORT
Definition: disp3D_global.h:55
DISP3DLIB::NetworkTreeItem
Provides a generic brain tree item to hold real time data.
Definition: networktreeitem.h:101
DISP3DLIB::Data3DTreeModel::SPtr
QSharedPointer< Data3DTreeModel > SPtr
Definition: data3Dtreemodel.h:131
FIFFLIB::FiffDigPointSet
Holds a set of digitizer points.
Definition: fiff_dig_point_set.h:83