MNE-CPP  beta 1.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
FSLIB::Annotation Class Reference

Free surfer annotation. More...

#include <annotation.h>

Public Types

typedef QSharedPointer< AnnotationSPtr
 
typedef QSharedPointer< const AnnotationConstSPtr
 

Public Member Functions

 Annotation ()
 
 Annotation (const QString &p_sFileName)
 
 ~Annotation ()
 
void clear ()
 
bool isEmpty () const
 
qint32 hemi () const
 
VectorXi & getVertices ()
 
const VectorXi getVertices () const
 
VectorXi & getLabelIds ()
 
const VectorXi getLabelIds () const
 
ColortablegetColortable ()
 
const Colortable getColortable () const
 
bool toLabels (const Surface &p_surf, QList< Label > &p_qListLabels, QList< RowVector4i > &p_qListLabelRGBAs) const
 

Static Public Member Functions

static bool read (const QString &subject_id, qint32 hemi, const QString &atlas, const QString &subjects_dir, Annotation &p_Annotation)
 
static bool read (const QString &path, qint32 hemi, const QString &atlas, Annotation &p_Annotation)
 
static bool read (const QString &p_sFileName, Annotation &p_Annotation)
 

Detailed Description

Free surfer annotation.

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

Definition at line 97 of file annotation.h.

Member Typedef Documentation

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

Const shared pointer type for Annotation.

Definition at line 102 of file annotation.h.

typedef QSharedPointer<Annotation> FSLIB::Annotation::SPtr

Shared pointer type for Annotation.

Definition at line 101 of file annotation.h.

Constructor & Destructor Documentation

Annotation::Annotation ( )

Default constructor

Definition at line 72 of file annotation.cpp.

Annotation::Annotation ( const QString &  p_sFileName)
explicit

Construts the annotation by reading it of the given file.

Parameters
[in]p_sFileNameAnnotation file

Definition at line 80 of file annotation.cpp.

Annotation::~Annotation ( )

Destroys the annotation.

Definition at line 91 of file annotation.cpp.

Member Function Documentation

void Annotation::clear ( )

Initializes the Annotation.

Definition at line 99 of file annotation.cpp.

Colortable & FSLIB::Annotation::getColortable ( )
inline

Returns the coloratable containing the label based nomenclature

Returns
colortable

Definition at line 307 of file annotation.h.

const Colortable FSLIB::Annotation::getColortable ( ) const
inline

Returns the coloratable containing the label based nomenclature

Returns
colortable

Definition at line 315 of file annotation.h.

VectorXi & FSLIB::Annotation::getLabelIds ( )
inline

Returns the vertix labels

Returns
vertix labels

Definition at line 291 of file annotation.h.

const VectorXi FSLIB::Annotation::getLabelIds ( ) const
inline

Returns the vertix labels

Returns
vertix labels

Definition at line 299 of file annotation.h.

VectorXi & FSLIB::Annotation::getVertices ( )
inline

Returns the vertix indeces

Returns
vertix indeces

Definition at line 275 of file annotation.h.

const VectorXi FSLIB::Annotation::getVertices ( ) const
inline

Returns the vertix indeces

Returns
vertix indeces

Definition at line 283 of file annotation.h.

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

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

Returns
hemisphere id

Definition at line 261 of file annotation.h.

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

Returns whether Annotation is empty.

Returns
true if is empty, false otherwise

Definition at line 268 of file annotation.h.

bool Annotation::read ( const QString &  subject_id,
qint32  hemi,
const QString &  atlas,
const QString &  subjects_dir,
Annotation 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 110 of file annotation.cpp.

bool Annotation::read ( const QString &  path,
qint32  hemi,
const QString &  atlas,
Annotation 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 123 of file annotation.cpp.

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

Reads an annotation of a file

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

Definition at line 136 of file annotation.cpp.

bool Annotation::toLabels ( const Surface p_surf,
QList< Label > &  p_qListLabels,
QList< RowVector4i > &  p_qListLabelRGBAs 
) 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.
Returns
true if successful, false otherwise

Definition at line 281 of file annotation.cpp.


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