v2.0.0
Loading...
Searching...
No Matches
FSLIB::FsAnnotation Class Reference

Free surfer annotation. More...

#include <fs_annotation.h>

Public Types

typedef QSharedPointer< FsAnnotationSPtr
typedef QSharedPointer< const FsAnnotationConstSPtr

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
FsColortablegetColortable ()
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)

Detailed Description

Free surfer annotation.

Free surfer annotation contains vertix label relations and a color/name lookup table

Definition at line 80 of file fs_annotation.h.

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const FsAnnotation> FSLIB::FsAnnotation::ConstSPtr

Const shared pointer type for FsAnnotation.

Definition at line 85 of file fs_annotation.h.

◆ SPtr

typedef QSharedPointer<FsAnnotation> FSLIB::FsAnnotation::SPtr

Shared pointer type for FsAnnotation.

Definition at line 84 of file fs_annotation.h.

Constructor & Destructor Documentation

◆ FsAnnotation() [1/4]

FsAnnotation::FsAnnotation ( )

Default constructor

Definition at line 67 of file fs_annotation.cpp.

◆ FsAnnotation() [2/4]

FsAnnotation::FsAnnotation ( const QString & p_sFileName)
explicit

Construts the annotation by reading it of the given file.

Parameters
[in]p_sFileNameFsAnnotation file.

Definition at line 74 of file fs_annotation.cpp.

◆ FsAnnotation() [3/4]

FsAnnotation::FsAnnotation ( const QString & subject_id,
qint32 hemi,
const QString & surf,
const QString & subjects_dir )
explicit

Construts the annotation by reading it of the given file.

Parameters
[in]subject_idName of subject.
[in]hemiWhich hemisphere to load {0 -> lh, 1 -> rh}.
[in]atlasName of the atlas to load (eg. aparc.a2009s, aparc, aparc.DKTatlas40, BA, BA.thresh, ...).
[in]subjects_dirSubjects directory.

Definition at line 84 of file fs_annotation.cpp.

◆ FsAnnotation() [4/4]

FsAnnotation::FsAnnotation ( const QString & path,
qint32 hemi,
const QString & surf )
explicit

Construts the annotation by reading it of the given file.

Parameters
[in]pathpath to surface directory.
[in]hemiWhich hemisphere to load {0 -> lh, 1 -> rh}.
[in]atlasName of the atlas to load (eg. aparc.a2009s, aparc, aparc.DKTatlas40, BA, BA.thresh, ...).
Returns
true if read sucessful, false otherwise.

Definition at line 92 of file fs_annotation.cpp.

◆ ~FsAnnotation()

FsAnnotation::~FsAnnotation ( )

Destroys the annotation.

Definition at line 100 of file fs_annotation.cpp.

Member Function Documentation

◆ clear()

void FsAnnotation::clear ( )

Initializes the FsAnnotation.

Definition at line 106 of file fs_annotation.cpp.

◆ fileName()

QString FSLIB::FsAnnotation::fileName ( ) const
inline

annotation file name

Returns
the surf file name.

Definition at line 350 of file fs_annotation.h.

◆ filePath()

QString FSLIB::FsAnnotation::filePath ( ) const
inline

annotation file path

Returns
the surf file path.

Definition at line 343 of file fs_annotation.h.

◆ getColortable() [1/2]

FsColortable & FSLIB::FsAnnotation::getColortable ( )
inline

Returns the coloratable containing the label based nomenclature

Returns
colortable.

Definition at line 329 of file fs_annotation.h.

◆ getColortable() [2/2]

const FsColortable FSLIB::FsAnnotation::getColortable ( ) const
inline

Returns the coloratable containing the label based nomenclature

Returns
colortable.

Definition at line 336 of file fs_annotation.h.

◆ getLabelIds() [1/2]

Eigen::VectorXi & FSLIB::FsAnnotation::getLabelIds ( )
inline

Returns the vertix labels

Returns
vertix labels.

Definition at line 315 of file fs_annotation.h.

◆ getLabelIds() [2/2]

const Eigen::VectorXi FSLIB::FsAnnotation::getLabelIds ( ) const
inline

Returns the vertix labels

Returns
vertix labels.

Definition at line 322 of file fs_annotation.h.

◆ getVertices() [1/2]

Eigen::VectorXi & FSLIB::FsAnnotation::getVertices ( )
inline

Returns the vertix indeces

Returns
vertix indeces.

Definition at line 301 of file fs_annotation.h.

◆ getVertices() [2/2]

const Eigen::VectorXi FSLIB::FsAnnotation::getVertices ( ) const
inline

Returns the vertix indeces

Returns
vertix indeces.

Definition at line 308 of file fs_annotation.h.

◆ hemi()

qint32 FSLIB::FsAnnotation::hemi ( ) const
inline

Returns the hemisphere id (0 = lh; 1 = rh)

Returns
hemisphere id.

Definition at line 287 of file fs_annotation.h.

◆ isEmpty()

bool FSLIB::FsAnnotation::isEmpty ( ) const
inline

Returns whether FsAnnotation is empty.

Returns
true if is empty, false otherwise.

Definition at line 294 of file fs_annotation.h.

◆ read() [1/3]

bool FsAnnotation::read ( const QString & p_sFileName,
FsAnnotation & p_Annotation )
static

Reads an annotation of a file

Parameters
[in]p_sFileNameFsAnnotation file.
[out]p_Annotationthe read annotation.
Returns
true if successful, false otherwise.

Definition at line 140 of file fs_annotation.cpp.

◆ read() [2/3]

bool FsAnnotation::read ( const QString & path,
qint32 hemi,
const QString & atlas,
FsAnnotation & p_Annotation )
static

Reads a FreeSurfer annotation file

Parameters
[in]pathpath to label directory.
[in]hemiWhich hemisphere to load {0 -> lh, 1 -> rh}.
[in]atlasName of the atlas to load (eg. aparc.a2009s, aparc, aparc.DKTatlas40, BA, BA.thresh, ...).
[out]p_AnnotationThe read annotation.
Returns
true if read sucessful, false otherwise.

Definition at line 128 of file fs_annotation.cpp.

◆ read() [3/3]

bool FsAnnotation::read ( const QString & subject_id,
qint32 hemi,
const QString & atlas,
const QString & subjects_dir,
FsAnnotation & p_Annotation )
static

Reads a FreeSurfer annotation file

Parameters
[in]subject_idName of subject.
[in]hemiWhich hemisphere to load {0 -> lh, 1 -> rh}.
[in]atlasName of the atlas to load (eg. aparc.a2009s, aparc, aparc.DKTatlas40, BA, BA.thresh, ...).
[in]subjects_dirSubjects directory.
[out]p_AnnotationThe read annotation.
Returns
true if read sucessful, false otherwise.

Definition at line 116 of file fs_annotation.cpp.

◆ toLabels()

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

Parameters
[in]p_surfthe surface to read the vertex positions from.
[out]p_qListLabelsthe converted labels are appended to a given list. Stored data are not affected.
[out]p_qListLabelRGBAsthe converted label RGBAs are appended to a given list. Stored data are not affected.
[out]lLabelPicksthe label names which should be picked.
Returns
true if successful, false otherwise.

Definition at line 288 of file fs_annotation.cpp.


The documentation for this class was generated from the following files: