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

Freesurfer/MNE label. More...

#include <label.h>

Public Types

typedef QSharedPointer< LabelSPtr
 
typedef QSharedPointer< const LabelConstSPtr
 

Public Member Functions

 Label ()
 
 Label (const VectorXi &p_vertices, const MatrixX3f &p_pos, const VectorXd &p_values, qint32 p_hemi, const QString &p_name, qint32 p_id=-1)
 
 ~Label ()
 
void clear ()
 
bool isEmpty () const
 
MatrixX3i selectTris (const Surface &p_Surface)
 
MatrixX3i selectTris (const MatrixX3i &p_matTris)
 

Static Public Member Functions

static bool read (const QString &p_sFileName, Label &p_Label)
 

Public Attributes

QString comment
 
VectorXi vertices
 
MatrixX3f pos
 
VectorXd values
 
qint32 hemi
 
QString name
 
qint32 label_id
 

Detailed Description

Freesurfer/MNE label.

A Freesurfer/MNE label with vertices restricted to one hemisphere

Definition at line 97 of file label.h.

Member Typedef Documentation

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

Const shared pointer type for Label class.

Definition at line 101 of file label.h.

typedef QSharedPointer<Label> FSLIB::Label::SPtr

Shared pointer type for Label class.

Definition at line 100 of file label.h.

Constructor & Destructor Documentation

Label::Label ( )

Default constructor

Definition at line 73 of file label.cpp.

Label::Label ( const VectorXi &  p_vertices,
const MatrixX3f &  p_pos,
const VectorXd &  p_values,
qint32  p_hemi,
const QString &  p_name,
qint32  p_id = -1 
)

Constructs a label

Parameters
[in]p_verticesVertices
[in]p_posPositions
[in]p_valuesValues
[in]p_hemiHemisphere (lh = 0; rh = 1)
[in]p_namelabel names
[in]p_idlabel id (optional, default = -1)

Definition at line 82 of file label.cpp.

Label::~Label ( )

Destroys the Label class.

Definition at line 96 of file label.cpp.

Member Function Documentation

void Label::clear ( )

Initializes the Label.

Definition at line 103 of file label.cpp.

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

True if Label is empty.

Returns
true if Label is empty, false otherwise.

Definition at line 198 of file label.h.

bool Label::read ( const QString &  p_sFileName,
Label p_Label 
)
static

mne_read_label_file

Reads a Label from a FreeSurfer label file. This is based on the FreeSurfer read_label routine SUBJECTS_DIR environment variable is not consulted for the standard location

Parameters
[in]p_sFileNamelabel file name
[in]p_Labelread label
Returns
true if successful, false otherwise

Definition at line 186 of file label.cpp.

MatrixX3i Label::selectTris ( const Surface p_Surface)

Select tris for this label from a given surface file.

Parameters
[in]p_Surfaceto generate the label tris from
Returns
the generated tris.

Definition at line 118 of file label.cpp.

MatrixX3i Label::selectTris ( const MatrixX3i &  p_matTris)

Select tris for this label from a given tri matrix.

Parameters
[in]p_matTristris from which the selection should be made
Returns
the generated tris.

Definition at line 152 of file label.cpp.

Member Data Documentation

QString FSLIB::Label::comment

Comment from the first line of the label file.

Definition at line 178 of file label.h.

qint32 FSLIB::Label::hemi

Hemisphere (lh = 0; rh = 1)

Definition at line 182 of file label.h.

qint32 FSLIB::Label::label_id

Label id (optional)

Definition at line 185 of file label.h.

QString FSLIB::Label::name

Name of the label

Definition at line 184 of file label.h.

MatrixX3f FSLIB::Label::pos

Locations in meters

Definition at line 180 of file label.h.

VectorXd FSLIB::Label::values

Values at the vertices

Definition at line 181 of file label.h.

VectorXi FSLIB::Label::vertices

Vertex indices (0 based)

Definition at line 179 of file label.h.


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