Data model for stereotactic depth electrode (sEEG) visualization. More...
#include <electrodeobject.h>
Classes | |
| struct | GpuBuffers |
Public Member Functions | |
| ElectrodeObject () | |
| ~ElectrodeObject () | |
| void | setArrays (const QVector< ElectrodeArray > &arrays) |
| const QVector< ElectrodeArray > & | arrays () 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 123 of file electrodeobject.h.
| ElectrodeObject::ElectrodeObject | ( | ) |
Definition at line 49 of file electrodeobject.cpp.
|
default |
| const QVector< ElectrodeArray > & ElectrodeObject::arrays | ( | ) | const |
Definition at line 76 of file electrodeobject.cpp.
| QVector3D ElectrodeObject::boundingBoxMax | ( | ) | const |
Definition at line 314 of file electrodeobject.cpp.
| QVector3D ElectrodeObject::boundingBoxMin | ( | ) | const |
Definition at line 307 of file electrodeobject.cpp.
| void ElectrodeObject::clearSelection | ( | ) |
Clear all contact selections.
Definition at line 147 of file electrodeobject.cpp.
| uint32_t ElectrodeObject::contactInstanceCount | ( | ) | const |
Definition at line 471 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 280 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 166 of file electrodeobject.cpp.
| QRhiBuffer * ElectrodeObject::indexBuffer | ( | ) | const |
Definition at line 450 of file electrodeobject.cpp.
| QRhiBuffer * ElectrodeObject::instanceBuffer | ( | ) | const |
Definition at line 457 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 124 of file electrodeobject.cpp.
| QString ElectrodeObject::selectedContact | ( | ) | const |
Definition at line 159 of file electrodeobject.cpp.
| void ElectrodeObject::setArrays | ( | const QVector< ElectrodeArray > & | arrays | ) |
Set electrode data from array definitions.
| [in] | arrays | Vector of electrode arrays. |
Definition at line 66 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 93 of file electrodeobject.cpp.
| uint32_t ElectrodeObject::shaftIndexCount | ( | ) | const |
Definition at line 464 of file electrodeobject.cpp.
| int ElectrodeObject::totalContactCount | ( | ) | const |
Definition at line 83 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 372 of file electrodeobject.cpp.
| QRhiBuffer * ElectrodeObject::vertexBuffer | ( | ) | const |
Definition at line 443 of file electrodeobject.cpp.