128 void setVisible(
bool visible);
210 void createFromData(
const Eigen::MatrixX3f& vertices,
const Eigen::MatrixX3i& triangles,
const QColor& color);
221 void createFromData(
const Eigen::MatrixX3f& vertices,
const Eigen::MatrixX3f& normals,
const Eigen::MatrixX3i& triangles,
const QColor& color);
230 bool loadAnnotation(
const QString& path);
254 void applySourceEstimateColors(
const QVector<uint32_t>& colors);
259 void clearSourceEstimateColors();
268 void updateBuffers(QRhi* rhi, QRhiResourceUpdateBatch* u);
270 QRhiBuffer* vertexBuffer()
const;
271 QRhiBuffer* indexBuffer()
const;
278 return m_vertexData.size();
287 Eigen::MatrixX3f vertexPositions()
const;
295 Eigen::MatrixX3f vertexNormals()
const;
334 return m_vertexGeneration;
360 void boundingBox(QVector3D& min, QVector3D& max)
const;
375 bool intersects(
const QVector3D& rayOrigin,
const QVector3D& rayDir,
float& dist,
int& vertexIdx)
const;
384 QString getAnnotationLabel(
int vertexIdx)
const;
385 int getAnnotationLabelId(
int vertexIdx)
const;
393 void setSelectedRegion(
int regionId);
399 void translateX(
float offset);
407 void transform(
const QMatrix4x4& m);
416 void applyTransform(
const QMatrix4x4& m);
425 std::vector<Eigen::VectorXi> computeNeighbors()
const;
433 Eigen::MatrixX3f verticesAsMatrix()
const;
441 void setUseDefaultColor(
bool useDefault);
449 void setColor(
const QColor& color);
451 void setSelected(
bool selected);
458 return m_selectedRegionId;
462 return m_selectedVertexStart;
472 void setSelectedVertexRange(
int start,
int count);
475 void updateVertexColors();
476 void markVertexDirty();
478 QVector<VertexData> m_vertexData;
479 QVector<VertexData> m_originalVertexData;
480 QVector<uint32_t> m_indexData;
481 uint32_t m_indexCount = 0;
483 QColor m_defaultColor = Qt::white;
484 QColor m_baseColor = Qt::white;
487 bool m_hasAnnotation =
false;
489 QVector<float> m_curvature;
490 QVector<uint32_t> m_stcColors;
492 bool m_visible =
true;
493 bool m_selected =
false;
494 int m_selectedRegionId = -1;
495 int m_selectedVertexStart = -1;
496 int m_selectedVertexCount = 0;
498 TissueType m_tissueType = TissueUnknown;
502 std::unique_ptr<GpuBuffers> m_gpu;
504 quint64 m_vertexGeneration = 0;
506 mutable QVector3D m_aabbMin;
507 mutable QVector3D m_aabbMax;
508 mutable bool m_bAABBDirty =
true;