MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Types | Public Member Functions | Static Public Member Functions | List of all members
FSLIB::AnnotationSet Class Reference

Annotation set. More...

#include <annotationset.h>

Public Types

typedef QSharedPointer< AnnotationSetSPtr
 
typedef QSharedPointer< const AnnotationSetConstSPtr
 

Public Member Functions

 AnnotationSet ()
 
 AnnotationSet (const QString &subject_id, qint32 hemi, const QString &atlas, const QString &subjects_dir)
 
 AnnotationSet (const QString &path, qint32 hemi, const QString &atlas)
 
 AnnotationSet (const Annotation &p_LHAnnotation, const Annotation &p_RHAnnotation)
 
 AnnotationSet (const QString &p_sLHFileName, const QString &p_sRHFileName)
 
 ~AnnotationSet ()
 
void clear ()
 
QMap< qint32, Annotation > & data ()
 
bool isEmpty () const
 
void insert (const Annotation &p_Annotation)
 
bool toLabels (const SurfaceSet &p_surfSet, QList< Label > &p_qListLabels, QList< Eigen::RowVector4i > &p_qListLabelRGBAs, const QStringList &lLabelPicks=QStringList()) const
 
Annotationoperator[] (qint32 idx)
 
const Annotation operator[] (qint32 idx) const
 
Annotationoperator[] (QString idt)
 
const Annotation operator[] (QString idt) const
 
qint32 size () const
 

Static Public Member Functions

static bool read (const QString &p_sLHFileName, const QString &p_sRHFileName, AnnotationSet &p_AnnotationSet)
 

Detailed Description

Annotation set.

Annotation set

Definition at line 80 of file annotationset.h.

Member Typedef Documentation

◆ ConstSPtr

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

Const shared pointer type for AnnotationSet.

Definition at line 84 of file annotationset.h.

◆ SPtr

typedef QSharedPointer<AnnotationSet> FSLIB::AnnotationSet::SPtr

Shared pointer type for AnnotationSet.

Definition at line 83 of file annotationset.h.

Constructor & Destructor Documentation

◆ AnnotationSet() [1/5]

AnnotationSet::AnnotationSet ( )

Default constructor

Definition at line 58 of file annotationset.cpp.

◆ AnnotationSet() [2/5]

AnnotationSet::AnnotationSet ( const QString &  subject_id,
qint32  hemi,
const QString &  atlas,
const QString &  subjects_dir 
)
explicit

Construts the surface set by reading it of the given files.

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

Definition at line 64 of file annotationset.cpp.

◆ AnnotationSet() [3/5]

AnnotationSet::AnnotationSet ( const QString &  path,
qint32  hemi,
const QString &  atlas 
)
explicit

Construts the surface set by reading it of the given files.

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

Definition at line 83 of file annotationset.cpp.

◆ AnnotationSet() [4/5]

AnnotationSet::AnnotationSet ( const Annotation p_LHAnnotation,
const Annotation p_RHAnnotation 
)
explicit

Constructs an annotation set by assembling given annotations

Parameters
[in]p_LHAnnotationLeft hemisphere annotation.
[in]p_RHAnnotationRight hemisphere annotation.

Definition at line 102 of file annotationset.cpp.

◆ AnnotationSet() [5/5]

AnnotationSet::AnnotationSet ( const QString &  p_sLHFileName,
const QString &  p_sRHFileName 
)
explicit

Constructs an annotation set by reading from annotation files

Parameters
[in]p_sLHFileNameLeft hemisphere annotation file.
[in]p_sRHFileNameRight hemisphere annotation file.

Definition at line 117 of file annotationset.cpp.

◆ ~AnnotationSet()

FSLIB::AnnotationSet::~AnnotationSet ( )
inline

Destroys the annotation set.

Definition at line 135 of file annotationset.h.

Member Function Documentation

◆ clear()

void AnnotationSet::clear ( )

Initializes the AnnotationSet.

Definition at line 126 of file annotationset.cpp.

◆ data()

QMap< qint32, Annotation > & FSLIB::AnnotationSet::data ( )
inline

Returns The Annotation set map

Returns
the annotation set map.

Definition at line 253 of file annotationset.h.

◆ insert()

void AnnotationSet::insert ( const Annotation p_Annotation)

Insert an annotation

Parameters
[in]p_AnnotationAnnotation to insert.

Definition at line 133 of file annotationset.cpp.

◆ isEmpty()

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

True if AnnotationSet is empty.

Returns
true if AnnotationSet is empty.

Definition at line 260 of file annotationset.h.

◆ operator[]() [1/4]

Annotation & AnnotationSet::operator[] ( qint32  idx)

Subscript operator [] to access annotation by index

Parameters
[in]idxthe hemisphere index (0 or 1).
Returns
Annotation related to the parameter index.

Definition at line 187 of file annotationset.cpp.

◆ operator[]() [2/4]

const Annotation AnnotationSet::operator[] ( qint32  idx) const

Subscript operator [] to access annotation by index

Parameters
[in]idxthe hemisphere index (0 or 1).
Returns
Annotation related to the parameter index.

Definition at line 202 of file annotationset.cpp.

◆ operator[]() [3/4]

Annotation & AnnotationSet::operator[] ( QString  idt)

Subscript operator [] to access annotation by identifier

Parameters
[in]idtthe hemisphere identifier ("lh" or "rh").
Returns
Annotation related to the parameter identifier.

Definition at line 217 of file annotationset.cpp.

◆ operator[]() [4/4]

const Annotation AnnotationSet::operator[] ( QString  idt) const

Subscript operator [] to access annotation by identifier

Parameters
[in]idtthe hemisphere identifier ("lh" or "rh").
Returns
Annotation related to the parameter identifier.

Definition at line 232 of file annotationset.cpp.

◆ read()

bool AnnotationSet::read ( const QString &  p_sLHFileName,
const QString &  p_sRHFileName,
AnnotationSet p_AnnotationSet 
)
static

Reads different annotation files and assembles them to a AnnotationSet

Parameters
[in]p_sLHFileNameLeft hemisphere annotation file.
[in]p_sRHFileNameRight hemisphere annotation file.
[out]p_AnnotationSetThe read annotation set.
Returns
true if succesfull, false otherwise.

Definition at line 146 of file annotationset.cpp.

◆ size()

qint32 FSLIB::AnnotationSet::size ( ) const
inline

Returns number of loaded hemispheres

Returns
number of loaded hemispheres.

Definition at line 267 of file annotationset.h.

◆ toLabels()

bool AnnotationSet::toLabels ( const SurfaceSet p_surfSet,
QList< Label > &  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_surfSetthe SurfaceSet 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 172 of file annotationset.cpp.


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