Data model for stereotactic depth electrode (sEEG) visualization. More...
#include <electrodeobject.h>
Classes | |
| struct | GpuBuffers |
Public Member Functions | |
| ElectrodeObject () | |
| ~ElectrodeObject () | |
| void | setShafts (const QVector< ElectrodeShaft > &shafts) |
| const QVector< ElectrodeShaft > & | shafts () const |
| int | totalContactCount () const |
| void | setContactValues (const QMap< QString, float > &values, const QColor &minColor=Qt::blue, const QColor &maxColor=Qt::red) |
| void | selectContact (const QString &name) |
| void | clearSelection () |
| QString | selectedContact () const |
| void | generateShaftGeometry (QVector< float > &vertices, QVector< unsigned int > &indices, int cylinderSides=16) const |
| void | generateContactInstances (QVector< float > &instanceData) const |
| QVector3D | boundingBoxMin () const |
| QVector3D | boundingBoxMax () const |
| void | updateBuffers (QRhi *rhi, QRhiResourceUpdateBatch *u) |
| QRhiBuffer * | vertexBuffer () const |
| QRhiBuffer * | indexBuffer () const |
| QRhiBuffer * | instanceBuffer () const |
| uint32_t | shaftIndexCount () const |
| uint32_t | contactInstanceCount () const |
Data model for stereotactic depth electrode (sEEG) visualization.
Holds electrode shaft definitions and contact metadata, and generates CPU-side geometry (vertices/indices) that a QRhi-based renderer can upload to the GPU.
Definition at line 101 of file electrodeobject.h.
| ElectrodeObject::ElectrodeObject | ( | ) |
Definition at line 71 of file electrodeobject.cpp.
|
default |
| QVector3D ElectrodeObject::boundingBoxMax | ( | ) | const |
Definition at line 332 of file electrodeobject.cpp.
| QVector3D ElectrodeObject::boundingBoxMin | ( | ) | const |
Definition at line 325 of file electrodeobject.cpp.
| void ElectrodeObject::clearSelection | ( | ) |
Clear all contact selections.
Definition at line 169 of file electrodeobject.cpp.
| uint32_t ElectrodeObject::contactInstanceCount | ( | ) | const |
Definition at line 489 of file electrodeobject.cpp.
| void ElectrodeObject::generateContactInstances | ( | QVector< float > & | instanceData | ) | const |
Generate per-instance data for contact spheres. Per instance: position (3) + radius (1) + color RGBA (4) + selected flag (1) = 9 floats.
| [out] | instanceData | Flat float buffer. |
Definition at line 298 of file electrodeobject.cpp.
| void ElectrodeObject::generateShaftGeometry | ( | QVector< float > & | vertices, |
| QVector< unsigned int > & | indices, | ||
| int | cylinderSides = 16 ) const |
Generate interleaved vertex + index data for all shaft cylinders. Each vertex: position (3 floats) + normal (3 floats) = 6 floats.
| [out] | vertices | Vertex buffer (position + normal interleaved). |
| [out] | indices | Index buffer (triangles). |
| [in] | cylinderSides | Number of sides for the cylinder cross-section. |
Definition at line 188 of file electrodeobject.cpp.
| QRhiBuffer * ElectrodeObject::indexBuffer | ( | ) | const |
Definition at line 468 of file electrodeobject.cpp.
| QRhiBuffer * ElectrodeObject::instanceBuffer | ( | ) | const |
Definition at line 475 of file electrodeobject.cpp.
| void ElectrodeObject::selectContact | ( | const QString & | name | ) |
Select a contact by name. Clears the previous selection.
| [in] | name | Contact name to select. |
Definition at line 146 of file electrodeobject.cpp.
| QString ElectrodeObject::selectedContact | ( | ) | const |
Definition at line 181 of file electrodeobject.cpp.
| void ElectrodeObject::setContactValues | ( | const QMap< QString, float > & | values, |
| const QColor & | minColor = Qt::blue, | ||
| const QColor & | maxColor = Qt::red ) |
Apply per-contact scalar overlay values and map them to a color gradient.
| [in] | values | Map of contact name -> scalar value. |
| [in] | minColor | Color for the minimum value (default: blue). |
| [in] | maxColor | Color for the maximum value (default: red). |
Definition at line 115 of file electrodeobject.cpp.
| void ElectrodeObject::setShafts | ( | const QVector< ElectrodeShaft > & | shafts | ) |
Set electrode data from shaft definitions.
| [in] | shafts | Vector of electrode shafts. |
Definition at line 88 of file electrodeobject.cpp.
| uint32_t ElectrodeObject::shaftIndexCount | ( | ) | const |
Definition at line 482 of file electrodeobject.cpp.
| const QVector< ElectrodeShaft > & ElectrodeObject::shafts | ( | ) | const |
Definition at line 98 of file electrodeobject.cpp.
| int ElectrodeObject::totalContactCount | ( | ) | const |
Definition at line 105 of file electrodeobject.cpp.
| void ElectrodeObject::updateBuffers | ( | QRhi * | rhi, |
| QRhiResourceUpdateBatch * | u ) |
Update GPU buffers (shaft vertex/index, contact instance) via QRhi.
| [in] | rhi | Pointer to QRhi instance. |
| [in] | u | Resource update batch. |
Definition at line 390 of file electrodeobject.cpp.
| QRhiBuffer * ElectrodeObject::vertexBuffer | ( | ) | const |
Definition at line 461 of file electrodeobject.cpp.