v2.0.0
Loading...
Searching...
No Matches
surfacetreeitem.cpp
Go to the documentation of this file.
1//=============================================================================================================
12
13//=============================================================================================================
14// INCLUDES
15//=============================================================================================================
16
17#include "surfacetreeitem.h"
18
21{
22 // Default shader mode = 0 (Standard)
23 setData(0, ShaderModeRole);
24}
25
27{
28 // Store as QVariant. We might need Q_DECLARE_METATYPE for FSLIB::FsSurface if not already done.
29 // For now assuming FSLIB types are registered or we can register them.
30 QVariant v;
31 v.setValue(surface);
32 setData(v, SurfaceDataRole);
33}
34
36{
37 QVariant v;
38 v.setValue(annotation);
39 setData(v, AnnotationDataRole);
40}
41
43{
44 setData(mode, ShaderModeRole);
45}
46
51
56
58{
59 return data(ShaderModeRole).toInt();
60}
Tree item wrapping a FreeSurfer FSLIB::FsSurface plus optional FSLIB::FsAnnotation parcellation.
AbstractTreeItem(const QString &text="", int type=AbstractItem)
SurfaceTreeItem(const QString &text="")
void setSurfaceData(const FSLIB::FsSurface &surface)
void setAnnotationData(const FSLIB::FsAnnotation &annotation)
int shaderMode() const
FSLIB::FsSurface surfaceData() const
FSLIB::FsAnnotation annotationData() const
void setShaderMode(int mode)
Single-hemisphere FreeSurfer parcellation: vertex → region label plus embedded colortable.
In-memory FreeSurfer triangular cortical surface for one hemisphere.
Definition fs_surface.h:92