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
connection.cpp
#include "connection.h"

#include "qmath.h"

#include <QtDebug>

Connection::Connection(QVector3D fn, QVector3D tn, float v)//TODO: points by reference?
{
    this->fn = fn;
    this->tn = tn;
    this->v = v;

    //this makes the color default to the orientation-codes DTI-stuff...
    QVector3D diff = fn-tn;
    diff.normalize();

    r=qAbs(diff.x());
    g=qAbs(diff.y());
    b=qAbs(diff.z());
}

double Connection::length(){
    return (fn-tn).length();
}
back to top