42 #include "../hemisphere/hemispheretreeitem.h"
43 #include "../sourcespace/sourcespacetreeitem.h"
44 #include "../sourcedata/mnedatatreeitem.h"
45 #include "../sourcedata/ecddatatreeitem.h"
46 #include "../network/networktreeitem.h"
47 #include "../freesurfer/fssurfacetreeitem.h"
48 #include "../freesurfer/fsannotationtreeitem.h"
49 #include "../digitizer/digitizersettreeitem.h"
50 #include "../digitizer/digitizertreeitem.h"
51 #include "../mri/mritreeitem.h"
52 #include "../subject/subjecttreeitem.h"
53 #include "../bem/bemtreeitem.h"
54 #include "../bem/bemsurfacetreeitem.h"
55 #include "../sensorspace/sensorsettreeitem.h"
56 #include "../sensorspace/sensorsurfacetreeitem.h"
57 #include "../sensordata/sensordatatreeitem.h"
85 using namespace FSLIB;
86 using namespace MNELIB;
87 using namespace DISP3DLIB;
88 using namespace INVERSELIB;
89 using namespace CONNECTIVITYLIB;
90 using namespace Eigen;
91 using namespace FIFFLIB;
97 MeasurementTreeItem::MeasurementTreeItem(
int iType,
108 this->setEditable(
false);
109 this->setCheckable(
true);
110 this->setCheckState(Qt::Checked);
111 this->setToolTip(
"Measurement item");
117 Qt3DCore::QEntity* p3DEntityParent)
120 QList<SourceSpaceTreeItem*> pReturnItem;
122 QList<QStandardItem*> itemList = this->
findChildren(Data3DTreeModelItemTypes::HemisphereItem);
125 bool hemiItemFound =
false;
128 for(
int i = 0; i < tSourceSpace.
size(); ++i) {
129 for(
int j = 0; j < itemList.size(); ++j) {
131 if(pHemiItem->data(Data3DTreeModelItemRoles::SurfaceHemi).toInt() == i) {
132 hemiItemFound =
true;
133 pReturnItem.append(pHemiItem->addData(tSourceSpace[i], p3DEntityParent));
142 pReturnItem.append(pHemiItem->
addData(tSourceSpace[i], p3DEntityParent));
144 QList<QStandardItem*> list;
146 list <<
new QStandardItem(pHemiItem->toolTip());
147 this->appendRow(list);
150 hemiItemFound =
false;
162 Qt3DCore::QEntity* p3DEntityParent,
165 if(!tSourceEstimate.
isEmpty()) {
176 QList<QStandardItem*> list;
179 this->appendRow(list);
200 const QString &sSensorType,
201 Qt3DCore::QEntity* p3DEntityParent,
204 if(!tSensorData.size() == 0) {
205 if(sSensorType ==
"EEG") {
217 QList<QStandardItem*> list;
220 this->appendRow(list);
233 if(sSensorType ==
"MEG") {
245 QList<QStandardItem*> list;
248 this->appendRow(list);
268 Qt3DCore::QEntity* p3DEntityParent)
270 if(pECDSet.
size() > 0) {
272 if(this->
findChildren(Data3DTreeModelItemTypes::ECDDataItem).size() == 0) {
278 QList<QStandardItem*> list;
281 this->appendRow(list);
293 qDebug() <<
"MeasurementTreeItem::addData - pECDSet is empty";
302 Qt3DCore::QEntity *p3DEntityParent)
304 if(tDigitizer.
size() > 0) {
306 QList<QStandardItem*> itemDigitizerList = this->
findChildren(Data3DTreeModelItemTypes::DigitizerSetItem);
310 if(itemDigitizerList.size() == 0) {
312 itemDigitizerList << pReturnItem;
313 itemDigitizerList <<
new QStandardItem(pReturnItem->toolTip());
314 this->appendRow(itemDigitizerList);
319 if(itemDigitizerList.at(0)->type() == Data3DTreeModelItemTypes::DigitizerSetItem) {
321 pReturnItem->
addData(tDigitizer, p3DEntityParent);
327 qDebug() <<
"MeasurementTreeItem::addData - digitizer set is empty";
336 Qt3DCore::QEntity* p3DEntityParent)
338 if(!tNetworkData.
getNodes().isEmpty()) {
342 QString sItemName = QString(
"%1").arg(tNetworkData.
getConnectivityMethod()).arg(QString::number(freqs.first)).arg(QString::number(freqs.second));
345 QList<QStandardItem*> lItems = this->
findChildren(sItemName);
347 if(lItems.isEmpty()) {
350 pReturnItem->setText(sItemName);
352 QList<QStandardItem*> list;
354 list <<
new QStandardItem(pReturnItem->toolTip());
355 this->appendRow(list);
357 pReturnItem->addData(tNetworkData);
361 pReturnItem->
addData(tNetworkData);
368 qDebug() <<
"MeasurementTreeItem::addData - network data is empty";