Single-hemisphere FreeSurfer parcellation: vertex → region label plus embedded colortable. More...
#include <fs_annotation.h>
Public Types | |
| typedef QSharedPointer< FsAnnotation > | SPtr |
| typedef QSharedPointer< const FsAnnotation > | ConstSPtr |
Public Member Functions | |
| FsAnnotation () | |
| FsAnnotation (const QString &p_sFileName) | |
| FsAnnotation (const QString &subject_id, qint32 hemi, const QString &surf, const QString &subjects_dir) | |
| FsAnnotation (const QString &path, qint32 hemi, const QString &surf) | |
| ~FsAnnotation () | |
| void | clear () |
| bool | isEmpty () const |
| qint32 | hemi () const |
| Eigen::VectorXi & | getVertices () |
| const Eigen::VectorXi | getVertices () const |
| Eigen::VectorXi & | getLabelIds () |
| const Eigen::VectorXi | getLabelIds () const |
| FsColortable & | getColortable () |
| const FsColortable | getColortable () const |
| bool | toLabels (const FsSurface &p_surf, QList< FsLabel > &p_qListLabels, QList< Eigen::RowVector4i > &p_qListLabelRGBAs, const QStringList &lLabelPicks=QStringList()) const |
| QString | filePath () const |
| QString | fileName () const |
Static Public Member Functions | |
| static bool | read (const QString &subject_id, qint32 hemi, const QString &atlas, const QString &subjects_dir, FsAnnotation &p_Annotation) |
| static bool | read (const QString &path, qint32 hemi, const QString &atlas, FsAnnotation &p_Annotation) |
| static bool | read (const QString &p_sFileName, FsAnnotation &p_Annotation) |
Single-hemisphere FreeSurfer parcellation: vertex → region label plus embedded colortable.
Holds the parsed contents of one .annot file: the dense per-vertex label assignment, the explicit vertex index list it was authored against, and the FsColortable describing the colour and name of every region. Indexing is aligned with the matching FsSurface for the same subject + hemisphere, so label[v] is the region of surface vertex v.
Definition at line 82 of file fs_annotation.h.
| typedef QSharedPointer<const FsAnnotation> FSLIB::FsAnnotation::ConstSPtr |
Const shared pointer type for FsAnnotation.
Definition at line 87 of file fs_annotation.h.
| typedef QSharedPointer<FsAnnotation> FSLIB::FsAnnotation::SPtr |
Shared pointer type for FsAnnotation.
Definition at line 86 of file fs_annotation.h.
| FsAnnotation::FsAnnotation | ( | ) |
Default constructor
Definition at line 43 of file fs_annotation.cpp.
|
explicit |
Construts the annotation by reading it of the given file.
| [in] | p_sFileName | FsAnnotation file. |
Definition at line 50 of file fs_annotation.cpp.
|
explicit |
Construts the annotation by reading it of the given file.
| [in] | subject_id | Name of subject. |
| [in] | hemi | Which hemisphere to load {0 -> lh, 1 -> rh}. |
| [in] | atlas | Name of the atlas to load (eg. aparc.a2009s, aparc, aparc.DKTatlas40, BA, BA.thresh, ...). |
| [in] | subjects_dir | Subjects directory. |
Definition at line 60 of file fs_annotation.cpp.
|
explicit |
Construts the annotation by reading it of the given file.
| [in] | path | path to surface directory. |
| [in] | hemi | Which hemisphere to load {0 -> lh, 1 -> rh}. |
| [in] | atlas | Name of the atlas to load (eg. aparc.a2009s, aparc, aparc.DKTatlas40, BA, BA.thresh, ...). |
Definition at line 68 of file fs_annotation.cpp.
| FsAnnotation::~FsAnnotation | ( | ) |
Destroys the annotation.
Definition at line 76 of file fs_annotation.cpp.
| void FsAnnotation::clear | ( | ) |
Initializes the FsAnnotation.
Definition at line 82 of file fs_annotation.cpp.
|
inline |
|
inline |
|
inline |
Returns the coloratable containing the label based nomenclature
Definition at line 331 of file fs_annotation.h.
|
inline |
Returns the coloratable containing the label based nomenclature
Definition at line 338 of file fs_annotation.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the hemisphere id (0 = lh; 1 = rh)
Definition at line 289 of file fs_annotation.h.
|
inline |
Returns whether FsAnnotation is empty.
Definition at line 296 of file fs_annotation.h.
|
static |
Reads an annotation of a file
| [in] | p_sFileName | FsAnnotation file. |
| [out] | p_Annotation | the read annotation. |
Definition at line 116 of file fs_annotation.cpp.
|
static |
Reads a FreeSurfer annotation file
| [in] | path | path to label directory. |
| [in] | hemi | Which hemisphere to load {0 -> lh, 1 -> rh}. |
| [in] | atlas | Name of the atlas to load (eg. aparc.a2009s, aparc, aparc.DKTatlas40, BA, BA.thresh, ...). |
| [out] | p_Annotation | The read annotation. |
Definition at line 104 of file fs_annotation.cpp.
|
static |
Reads a FreeSurfer annotation file
| [in] | subject_id | Name of subject. |
| [in] | hemi | Which hemisphere to load {0 -> lh, 1 -> rh}. |
| [in] | atlas | Name of the atlas to load (eg. aparc.a2009s, aparc, aparc.DKTatlas40, BA, BA.thresh, ...). |
| [in] | subjects_dir | Subjects directory. |
| [out] | p_Annotation | The read annotation. |
Definition at line 92 of file fs_annotation.cpp.
| bool FsAnnotation::toLabels | ( | const FsSurface & | p_surf, |
| QList< FsLabel > & | p_qListLabels, | ||
| QList< Eigen::RowVector4i > & | p_qListLabelRGBAs, | ||
| const QStringList & | lLabelPicks = QStringList() ) const |
python labels_from_parc
Converts annotation to a label list and colortable
| [in] | p_surf | the surface to read the vertex positions from. |
| [out] | p_qListLabels | the converted labels are appended to a given list. Stored data are not affected. |
| [out] | p_qListLabelRGBAs | the converted label RGBAs are appended to a given list. Stored data are not affected. |
| [out] | lLabelPicks | the label names which should be picked. |
Definition at line 274 of file fs_annotation.cpp.