44 #include "../network/networknode.h"
45 #include "../network/networkedge.h"
46 #include "../network/network.h"
53 #include <QtConcurrent>
59 #include <unsupported/Eigen/FFT>
65 using namespace CONNECTIVITYLIB;
66 using namespace Eigen;
84 Network finalNetwork(
"IMAGCOH");
86 if(connectivitySettings.isEmpty()) {
87 qDebug() <<
"ImagCoherence::calculate - Input data is empty";
91 if(AbstractMetric::m_bStorageModeIsActive ==
false) {
92 connectivitySettings.clearIntermediateData();
98 int iNfft = connectivitySettings.getFFTSize();
105 int iNFreqs = int(floor(iNfft / 2.0)) + 1;
107 if(m_iNumberBinStart == -1 ||
108 m_iNumberBinAmount == -1 ||
109 m_iNumberBinStart > iNFreqs ||
110 m_iNumberBinAmount > iNFreqs ||
111 m_iNumberBinAmount + m_iNumberBinStart > iNFreqs) {
112 qDebug() <<
"ImagCoherence::calculate - Resetting to full spectrum";
113 AbstractMetric::m_iNumberBinStart = 0;
114 AbstractMetric::m_iNumberBinAmount = iNFreqs;
122 int rows = connectivitySettings.at(0).matData.rows();
123 RowVectorXf rowVert = RowVectorXf::Zero(3);
125 for(
int i = 0; i < rows; ++i) {
126 rowVert = RowVectorXf::Zero(3);
128 if(connectivitySettings.getNodePositions().rows() != 0 && i < connectivitySettings.getNodePositions().rows()) {
129 rowVert(0) = connectivitySettings.getNodePositions().row(i)(0);
130 rowVert(1) = connectivitySettings.getNodePositions().row(i)(1);
131 rowVert(2) = connectivitySettings.getNodePositions().row(i)(2);
139 connectivitySettings);