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

FsAnnotation set. More...

#include <fs_annotationset.h>

Public Types

typedef QSharedPointer< FsAnnotationSetSPtr
typedef QSharedPointer< const FsAnnotationSetConstSPtr

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

FsAnnotation set.

FsAnnotation set

Definition at line 80 of file fs_annotationset.h.

Member Typedef Documentation

◆ ConstSPtr

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

Const shared pointer type for FsAnnotationSet.

Definition at line 84 of file fs_annotationset.h.

◆ SPtr

Shared pointer type for FsAnnotationSet.

Definition at line 83 of file fs_annotationset.h.

Constructor & Destructor Documentation

◆ FsAnnotationSet() [1/5]

FsAnnotationSet::FsAnnotationSet ( )

Default constructor

Definition at line 58 of file fs_annotationset.cpp.

◆ FsAnnotationSet() [2/5]

FsAnnotationSet::FsAnnotationSet ( 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 fs_annotationset.cpp.

◆ FsAnnotationSet() [3/5]

FsAnnotationSet::FsAnnotationSet ( 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 fs_annotationset.cpp.

◆ FsAnnotationSet() [4/5]

FsAnnotationSet::FsAnnotationSet ( const FsAnnotation & p_LHAnnotation,
const FsAnnotation & 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 fs_annotationset.cpp.

◆ FsAnnotationSet() [5/5]

FsAnnotationSet::FsAnnotationSet ( 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 fs_annotationset.cpp.

◆ ~FsAnnotationSet()

FSLIB::FsAnnotationSet::~FsAnnotationSet ( )
inline

Destroys the annotation set.

Definition at line 135 of file fs_annotationset.h.

Member Function Documentation

◆ clear()

void FsAnnotationSet::clear ( )

Initializes the FsAnnotationSet.

Definition at line 126 of file fs_annotationset.cpp.

◆ data()

QMap< qint32, FsAnnotation > & FSLIB::FsAnnotationSet::data ( )
inline

Returns The FsAnnotation set map

Returns
the annotation set map.

Definition at line 253 of file fs_annotationset.h.

◆ insert()

void FsAnnotationSet::insert ( const FsAnnotation & p_Annotation)

Insert an annotation

Parameters
[in]p_AnnotationFsAnnotation to insert.

Definition at line 133 of file fs_annotationset.cpp.

◆ isEmpty()

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

True if FsAnnotationSet is empty.

Returns
true if FsAnnotationSet is empty.

Definition at line 260 of file fs_annotationset.h.

◆ operator[]() [1/4]

FsAnnotation & FsAnnotationSet::operator[] ( qint32 idx)

Subscript operator [] to access annotation by index

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

Definition at line 190 of file fs_annotationset.cpp.

◆ operator[]() [2/4]

const FsAnnotation FsAnnotationSet::operator[] ( qint32 idx) const

Subscript operator [] to access annotation by index

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

Definition at line 205 of file fs_annotationset.cpp.

◆ operator[]() [3/4]

FsAnnotation & FsAnnotationSet::operator[] ( QString idt)

Subscript operator [] to access annotation by identifier

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

Definition at line 220 of file fs_annotationset.cpp.

◆ operator[]() [4/4]

const FsAnnotation FsAnnotationSet::operator[] ( QString idt) const

Subscript operator [] to access annotation by identifier

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

Definition at line 235 of file fs_annotationset.cpp.

◆ read()

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

Reads different annotation files and assembles them to a FsAnnotationSet

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 fs_annotationset.cpp.

◆ size()

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

Returns number of loaded hemispheres

Returns
number of loaded hemispheres.

Definition at line 267 of file fs_annotationset.h.

◆ toLabels()

bool FsAnnotationSet::toLabels ( const FsSurfaceSet & p_surfSet,
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_surfSetthe FsSurfaceSet 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 175 of file fs_annotationset.cpp.


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