42 #include "../../../../helpers/geometryinfo/geometryinfo.h"
43 #include "../../../../helpers/interpolation/interpolation.h"
44 #include "../../items/common/types.h"
58 using namespace DISP3DLIB;
59 using namespace MNELIB;
60 using namespace Eigen;
61 using namespace FSLIB;
68 : m_bInterpolationInfoIsInit(false)
69 , m_iVisualizationType(Data3DTreeModelItemRoles::InterpolationBased)
70 , m_bAnnotationInfoIsInit(false)
71 , m_pMatInterpolationMat(QSharedPointer<SparseMatrix<float> >(new SparseMatrix<float>()))
72 , m_pMatAnnotationMat(QSharedPointer<SparseMatrix<float> >(new SparseMatrix<float>()))
88 if(sInterpolationFunction == QStringLiteral(
"Linear")) {
91 else if(sInterpolationFunction == QStringLiteral(
"Square")) {
94 else if(sInterpolationFunction == QStringLiteral(
"Cubic")) {
97 else if(sInterpolationFunction == QStringLiteral(
"Gaussian")) {
143 const QVector<QVector<int> > &vecNeighborVertices,
144 const QVector<int> &vecMappedSubset)
146 if(matVertices.rows() == 0) {
147 qDebug() <<
"RtSourceInterpolationMatWorker::setInterpolationInfo - Surface data is empty. Returning ...";
168 const QList<FSLIB::Label> &lLabels,
169 const Eigen::VectorXi &vecVertNo)
171 if(vecLabelIds.rows() == 0 || lLabels.isEmpty()) {
172 qDebug() <<
"RtSourceInterpolationMatWorker::setAnnotationInfo - Annotation data is empty. Returning ...";
180 for(qint32 i = 0; i < vecVertNo.rows(); ++i) {
199 qDebug() <<
"RtSourceInterpolationMatWorker::calculateInterpolationOperator - Set interpolation info first.";
221 qDebug() <<
"RtSourceInterpolationMatWorker::calculateAnnotationOperator - Set annotation info first.";
237 for(
int j = 0; j < label.
vertices.rows(); ++j) {
238 for(
int k = 0;
k < listSourcesVertNoLabel.size(); ++
k) {
251 case Data3DTreeModelItemRoles::InterpolationBased:
263 case Data3DTreeModelItemRoles::AnnotationBased:
269 qDebug() <<
"RtSourceInterpolationMatWorker::setVisualizationType size == 0 Calculating";