MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
gpuinterpolationitem.h
Go to the documentation of this file.
1 //=============================================================================================================
36#ifndef DISP3DLIB_GPUINTERPOLATIONITEM_H
37#define DISP3DLIB_GPUINTERPOLATIONITEM_H
38
39//=============================================================================================================
40// INCLUDES
41//=============================================================================================================
42
43#include "../../../../disp3D_global.h"
44#include "../common/abstract3Dtreeitem.h"
45
46//=============================================================================================================
47// QT INCLUDES
48//=============================================================================================================
49
50#include <QSharedPointer>
51#include <QPointer>
52
53#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
54#define QT_COMPATIBILITY_3D Qt3DRender
55#include <Qt3DRender/QBuffer>
56#include <Qt3DRender/QAttribute>
57#else
58#define QT_COMPATIBILITY_3D Qt3DCore
59#include <Qt3DCore/QBuffer>
60#include <Qt3DCore/QAttribute>
61#endif
62
63
64//=============================================================================================================
65// EIGEN INCLUDES
66//=============================================================================================================
67
68#include <Eigen/SparseCore>
69
70//=============================================================================================================
71// FORWARD DECLARATIONS
72//=============================================================================================================
73
74namespace Qt3DRender {
75 class QComputeCommand;
76}
77
78//=============================================================================================================
79// DEFINE NAMESPACE DISP3DLIB
80//=============================================================================================================
81
82namespace DISP3DLIB {
83
84//=============================================================================================================
85// DISP3DLIB FORWARD DECLARATIONS
86//=============================================================================================================
87
88class CustomMesh;
89class GpuInterpolationMaterial;
90
91//=============================================================================================================
99{
100 Q_OBJECT
101
102public:
103 typedef QSharedPointer<GpuInterpolationItem> SPtr;
104 typedef QSharedPointer<const GpuInterpolationItem> ConstSPtr;
106 //=========================================================================================================
114 explicit GpuInterpolationItem(Qt3DCore::QEntity* p3DEntityParent = Q_NULLPTR,
115 int iType = Data3DTreeModelItemTypes::GpuInterpolationItem,
116 const QString& text = "3D Plot");
117
118 //=========================================================================================================
123
124 //=========================================================================================================
132 virtual void initData(const Eigen::MatrixX3f &matVertices,
133 const Eigen::MatrixX3f &matNormals,
134 const Eigen::MatrixX3i &matTriangles);
135
136 //=========================================================================================================
142 virtual void setInterpolationMatrix(QSharedPointer<Eigen::SparseMatrix<float> > pMatInterpolationMatrix);
143
144 //=========================================================================================================
150 virtual void addNewRtData(const Eigen::VectorXf &tSignalVec);
151
152 //=========================================================================================================
158 virtual void setThresholds(const QVector3D& tVecThresholds);
159
160 //=========================================================================================================
166 virtual void setColormapType(const QString& tColormapType);
167
168protected:
169 //=========================================================================================================
177 virtual QByteArray buildInterpolationMatrixBuffer(QSharedPointer<Eigen::SparseMatrix<float> > pMatInterpolationMatrix);
178
179 //=========================================================================================================
187 virtual QByteArray buildZeroBuffer(const uint tSize);
188
191 QPointer<GpuInterpolationMaterial> m_pGPUMaterial;
193 QPointer<CustomMesh> m_pCustomMesh;
194 QPointer<Qt3DRender::QComputeCommand> m_pComputeCommand;
196 QPointer<QT_COMPATIBILITY_3D::QBuffer> m_pInterpolationMatBuffer;
197 QPointer<QT_COMPATIBILITY_3D::QBuffer> m_pOutputColorBuffer;
198 QPointer<QT_COMPATIBILITY_3D::QBuffer> m_pSignalDataBuffer;
199};
200
201//=============================================================================================================
202// INLINE DEFINITIONS
203//=============================================================================================================
204} // namespace DISP3DLIB
205
206#endif // DISP3DLIB_GPUINTERPOLATIONITEM_H
#define DISP3DSHARED_EXPORT
Provides the basic tree item.
This item is used for signal interpolation with GPU support.
QSharedPointer< GpuInterpolationItem > SPtr
QSharedPointer< const GpuInterpolationItem > ConstSPtr
QPointer< QT_COMPATIBILITY_3D::QBuffer > m_pSignalDataBuffer
QPointer< QT_COMPATIBILITY_3D::QBuffer > m_pInterpolationMatBuffer
QPointer< GpuInterpolationMaterial > m_pGPUMaterial
QPointer< QT_COMPATIBILITY_3D::QBuffer > m_pOutputColorBuffer
QPointer< Qt3DRender::QComputeCommand > m_pComputeCommand