https://github.com/NeuroanatomyAndConnectivity/vidview
Raw File
Tip revision: a08f8878e4d91ae2d7a73ffc20168146eac1c29e authored by boettger on 04 March 2013, 18:09:51 UTC
ROI & connectivity drawing
Tip revision: a08f887
surfacecollection.cpp
#include "surfacecollection.h"

SurfaceCollection::SurfaceCollection(QString consname,  SurfaceSet* l, SurfaceSet* r, float clipthr)
{
    qDebug() << "loading connectivity for surface collection: " << consname;
    conn = new Connectivity(consname);
    lset = l;
    rset = r;

    if (consname.endsWith(".txt")) {
        icons = new IndexedConnections(consname);
    } else if (consname.endsWith(".bin")) {
        icons = conn->getICs(clipthr);
    }


    for (int i=0; i<lset->afnis.length(); i++){
        qDebug() << "creating l connections for surface # " << i;
        QList<QVector3D>* allNodes = new QList<QVector3D>(lset->afnis.at(i)->nodes);
        if (rset) allNodes->append(rset->afnis.at(i)->nodes);
        lset->createConnections((AFNISurface*)lset->afnis.at(i),icons,allNodes);
        if (rset) rset->createConnections((AFNISurface*)rset->afnis.at(i),icons,allNodes,lset->afnis.at(i)->nodes.length());
    }
}

back to top