66 qRegisterMetaType<CONNECTIVITYLIB::Network>(
"CONNECTIVITYLIB::Network");
67 qRegisterMetaType<CONNECTIVITYLIB::Network::SPtr>(
"CONNECTIVITYLIB::Network::SPtr");
68 qRegisterMetaType<QList<CONNECTIVITYLIB::Network> >(
"QList<CONNECTIVITYLIB::Network>");
69 qRegisterMetaType<QList<CONNECTIVITYLIB::Network::SPtr> >(
"QList<CONNECTIVITYLIB::Network::SPtr>");
83 if(row < matDist.rows() && col < matDist.cols()) {
86 if(bGetMirroredVersion) {
107 if(row < matDist.rows() && col < matDist.cols()) {
110 if(bGetMirroredVersion) {
159 qint16 distribution = 0;
161 for(
int i = 0; i <
m_lNodes.size(); ++i) {
162 distribution +=
m_lNodes.at(i)->getFullDegree();
172 qint16 distribution = 0;
174 for(
int i = 0; i <
m_lNodes.size(); ++i) {
175 distribution +=
m_lNodes.at(i)->getThresholdedDegree();
214 int minDegree = 1000000;
216 for(
int i = 0; i <
m_lNodes.size(); ++i) {
217 if(
m_lNodes.at(i)->getFullDegree() > maxDegree){
218 maxDegree =
m_lNodes.at(i)->getFullDegree();
219 }
else if (
m_lNodes.at(i)->getFullDegree() < minDegree){
220 minDegree =
m_lNodes.at(i)->getFullDegree();
224 return QPair<int,int>(minDegree,maxDegree);
232 int minDegree = 1000000;
234 for(
int i = 0; i <
m_lNodes.size(); ++i) {
235 if(
m_lNodes.at(i)->getThresholdedDegree() > maxDegree){
236 maxDegree =
m_lNodes.at(i)->getThresholdedDegree();
237 }
else if (
m_lNodes.at(i)->getThresholdedDegree() < minDegree){
238 minDegree =
m_lNodes.at(i)->getThresholdedDegree();
242 return QPair<int,int>(minDegree,maxDegree);
250 int minDegree = 1000000;
252 for(
int i = 0; i <
m_lNodes.size(); ++i) {
253 if(
m_lNodes.at(i)->getFullIndegree() > maxDegree){
254 maxDegree =
m_lNodes.at(i)->getFullIndegree();
255 }
else if (
m_lNodes.at(i)->getFullIndegree() < minDegree){
256 minDegree =
m_lNodes.at(i)->getFullIndegree();
260 return QPair<int,int>(minDegree,maxDegree);
268 int minDegree = 1000000;
270 for(
int i = 0; i <
m_lNodes.size(); ++i) {
271 if(
m_lNodes.at(i)->getThresholdedIndegree() > maxDegree){
272 maxDegree =
m_lNodes.at(i)->getThresholdedIndegree();
273 }
else if (
m_lNodes.at(i)->getThresholdedIndegree() < minDegree){
274 minDegree =
m_lNodes.at(i)->getThresholdedIndegree();
278 return QPair<int,int>(minDegree,maxDegree);
286 int minDegree = 1000000;
288 for(
int i = 0; i <
m_lNodes.size(); ++i) {
289 if(
m_lNodes.at(i)->getFullOutdegree() > maxDegree){
290 maxDegree =
m_lNodes.at(i)->getFullOutdegree();
291 }
else if (
m_lNodes.at(i)->getFullOutdegree() < minDegree){
292 minDegree =
m_lNodes.at(i)->getFullOutdegree();
296 return QPair<int,int>(minDegree,maxDegree);
304 int minDegree = 1000000;
306 for(
int i = 0; i <
m_lNodes.size(); ++i) {
307 if(
m_lNodes.at(i)->getThresholdedOutdegree() > maxDegree){
308 maxDegree =
m_lNodes.at(i)->getThresholdedOutdegree();
309 }
else if (
m_lNodes.at(i)->getThresholdedOutdegree() < minDegree){
310 minDegree =
m_lNodes.at(i)->getThresholdedOutdegree();
314 return QPair<int,int>(minDegree,maxDegree);
348 if(fLowerFreq > fUpperFreq) {
349 qDebug() <<
"Network::setFrequencyRange - Upper and lower frequency are out of range from each other. Weights will not be recalculated. Returning.";
354 qDebug() <<
"Network::setFrequencyRange - Sampling frequency has not been set. Returning.";
359 qDebug() <<
"Network::setFrequencyRange - Upper frequency is bigger than nyquist frequency. Returning.";
364 qDebug() <<
"Network::setFrequencyRange - Number of samples has not been set. Returning.";
373 int iLowerBin = fLowerFreq * dScaleFactor;
374 int iUpperBin = fUpperFreq * dScaleFactor;
380 m_lFullEdges.at(i)->setFrequencyBins(QPair<int,int>(iLowerBin,iUpperBin));
401 if(newEdge->getEndNodeID() != newEdge->getStartNodeID()) {
402 double dEdgeWeight = newEdge->getWeight();
441 qDebug() <<
"Network::normalize() - Max weight is 0. Returning.";
Weighted edge between two NetworkNode instances; stores the full per-frequency weight matrix and the ...
Node of a connectivity Network; carries a 3D position and the lists of incident (in / out,...
Graph container that stores the result of one functional-connectivity metric as nodes (sources/sensor...
Multi-taper spectral estimation: tapered FFT, power and cross-spectral density, DPSS weighting.
Functional connectivity metrics (coherence, PLV, cross-correlation, etc.).
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
Per-network rendering hints: colour-map name or fixed RGBA for nodes and edges.
VisualizationInfo getVisualizationInfo() const
void setVisualizationInfo(const VisualizationInfo &visualizationInfo)
int getUsedFreqBins() const
qint16 getThresholdedDistribution() const
void setUsedFreqBins(int iNumberFreqBins)
void setConnectivityMethod(const QString &sConnectivityMethod)
QSharedPointer< NetworkEdge > getEdgeAt(int i)
void append(QSharedPointer< NetworkEdge > newEdge)
QPair< double, double > m_minMaxFullWeights
QPair< int, int > getMinMaxFullDegrees() const
Eigen::MatrixXd getThresholdedConnectivityMatrix(bool bGetMirroredVersion=true) const
QPair< double, double > getMinMaxThresholdedWeights() const
void setFFTSize(int iFFTSize)
QPair< double, double > getMinMaxFullWeights() const
QList< QSharedPointer< NetworkNode > > m_lNodes
QPair< int, int > getMinMaxFullIndegrees() const
Network(const QString &sConnectivityMethod="Unknown", double dThreshold=0.0)
void setSamplingFrequency(float fSFreq)
const QPair< float, float > & getFrequencyRange() const
void setThreshold(double dThreshold=0.0)
QString getConnectivityMethod() const
Eigen::MatrixXd getFullConnectivityMatrix(bool bGetMirroredVersion=true) const
VisualizationInfo m_visualizationInfo
QPair< int, int > getMinMaxThresholdedDegrees() const
QSharedPointer< NetworkNode > getNodeAt(int i)
QPair< double, double > m_minMaxThresholdedWeights
const QList< QSharedPointer< NetworkNode > > & getNodes() const
QPair< int, int > getMinMaxThresholdedIndegrees() const
float getSamplingFrequency() const
void setFrequencyRange(float fLowerFreq, float fUpperFreq)
QPair< int, int > getMinMaxFullOutdegrees() const
const QList< QSharedPointer< NetworkEdge > > & getThresholdedEdges() const
QPair< float, float > m_minMaxFrequency
QList< QSharedPointer< NetworkEdge > > m_lThresholdedEdges
const QList< QSharedPointer< NetworkEdge > > & getFullEdges() const
QPair< int, int > getMinMaxThresholdedOutdegrees() const
QList< QSharedPointer< NetworkEdge > > m_lFullEdges
qint16 getFullDistribution() const
QString m_sConnectivityMethod
QSharedPointer< NetworkEdge > SPtr
QSharedPointer< NetworkNode > SPtr