MNE-CPP  beta 1.0
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 ()
 
bool isEmpty () const
 
void insert (const Annotation &p_Annotation)
 
bool toLabels (const SurfaceSet &p_surfSet, QList< Label > &p_qListLabels, QList< RowVector4i > &p_qListLabelRGBAs) 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 96 of file annotationset.h.

Member Typedef Documentation

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

Const shared pointer type for AnnotationSet.

Definition at line 100 of file annotationset.h.

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

Shared pointer type for AnnotationSet.

Definition at line 99 of file annotationset.h.

Constructor & Destructor Documentation

AnnotationSet::AnnotationSet ( )

Default constructor

Definition at line 61 of file annotationset.cpp.

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 69 of file annotationset.cpp.

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 90 of file annotationset.cpp.

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 110 of file annotationset.cpp.

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 127 of file annotationset.cpp.

FSLIB::AnnotationSet::~AnnotationSet ( )
inline

Destroys the annotation set.

Definition at line 151 of file annotationset.h.

Member Function Documentation

void AnnotationSet::clear ( )

Initializes the AnnotationSet.

Definition at line 137 of file annotationset.cpp.

void AnnotationSet::insert ( const Annotation p_Annotation)

Insert an annotation

Parameters
[in]p_AnnotationAnnotation to insert

Definition at line 145 of file annotationset.cpp.

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

True if AnnotationSet is empty.

Returns
true if AnnotationSet is empty

Definition at line 259 of file annotationset.h.

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 199 of file annotationset.cpp.

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 215 of file annotationset.cpp.

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 231 of file annotationset.cpp.

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 247 of file annotationset.cpp.

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 159 of file annotationset.cpp.

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

Returns number of loaded hemispheres

Returns
number of loaded hemispheres

Definition at line 267 of file annotationset.h.

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

Definition at line 186 of file annotationset.cpp.


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