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

FreeSurfer surface mesh. More...

#include <surface.h>

Public Types

typedef QSharedPointer< SurfaceSPtr
 
typedef QSharedPointer< const SurfaceConstSPtr
 

Public Member Functions

 Surface ()
 
 Surface (const QString &p_sFile)
 
 Surface (const QString &subject_id, qint32 hemi, const QString &surf, const QString &subjects_dir)
 
 Surface (const QString &path, qint32 hemi, const QString &surf)
 
 ~Surface ()
 
void clear ()
 
qint32 hemi () const
 
bool isEmpty () const
 
QString surf () const
 
const Eigen::MatrixX3f & rr () const
 
const Eigen::MatrixX3i & tris () const
 
const Eigen::MatrixX3f & nn () const
 
const Eigen::VectorXf & curv () const
 
const Eigen::Vector3f & offset () const
 
Eigen::Vector3f & offset ()
 
QString filePath () const
 
QString fileName () const
 

Static Public Member Functions

static bool read (const QString &subject_id, qint32 hemi, const QString &surf, const QString &subjects_dir, Surface &p_Surface, bool p_bLoadCurvature=true)
 
static bool read (const QString &path, qint32 hemi, const QString &surf, Surface &p_Surface, bool p_bLoadCurvature=true)
 
static bool read (const QString &p_sFileName, Surface &p_Surface, bool p_bLoadCurvature=true)
 
static Eigen::VectorXf read_curv (const QString &p_sFileName)
 
static Eigen::MatrixX3f compute_normals (const Eigen::MatrixX3f &rr, const Eigen::MatrixX3i &tris)
 

Detailed Description

FreeSurfer surface mesh.

A FreeSurfer surface mesh in triangular format

Definition at line 75 of file surface.h.

Member Typedef Documentation

◆ ConstSPtr

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

Const shared pointer type for Surface class.

Definition at line 79 of file surface.h.

◆ SPtr

typedef QSharedPointer<Surface> FSLIB::Surface::SPtr

Shared pointer type for Surface class.

Definition at line 78 of file surface.h.

Constructor & Destructor Documentation

◆ Surface() [1/4]

Surface::Surface ( )

Default constructor

Definition at line 66 of file surface.cpp.

◆ Surface() [2/4]

Surface::Surface ( const QString &  p_sFile)
explicit

Construts the surface by reading it of the given file.

Parameters
[in]p_sFileSurface file name with path.

Definition at line 77 of file surface.cpp.

◆ Surface() [3/4]

Surface::Surface ( const QString &  subject_id,
qint32  hemi,
const QString &  surf,
const QString &  subjects_dir 
)
explicit

Construts the surface by reading it of the given file.

Parameters
[in]subject_idName of subject.
[in]hemiWhich hemisphere to load {0 -> lh, 1 -> rh}.
[in]surfName of the surface to load (eg. inflated, orig ...).
[in]subjects_dirSubjects directory.

Definition at line 89 of file surface.cpp.

◆ Surface() [4/4]

Surface::Surface ( const QString &  path,
qint32  hemi,
const QString &  surf 
)
explicit

Construts the surface by reading it of the given file.

Parameters
[in]pathpath to surface directory.
[in]hemiWhich hemisphere to load {0 -> lh, 1 -> rh}.
[in]surfName of the surface to load (eg. inflated, orig ...).
Returns
true if read sucessful, false otherwise.

Definition at line 101 of file surface.cpp.

◆ ~Surface()

Surface::~Surface ( )

Destroys the Surface class.

Definition at line 113 of file surface.cpp.

Member Function Documentation

◆ clear()

void Surface::clear ( )

Initializes the Surface.

Definition at line 119 of file surface.cpp.

◆ compute_normals()

MatrixX3f Surface::compute_normals ( const Eigen::MatrixX3f &  rr,
const Eigen::MatrixX3i &  tris 
)
static

Efficiently compute vertex normals for triangulated surface

Parameters
[in]rrVertex coordinates in meters.
[out]trisThe triangle descriptions.
Returns
The computed normals.

Definition at line 133 of file surface.cpp.

◆ curv()

const Eigen::VectorXf & FSLIB::Surface::curv ( ) const
inline

FreeSurfer curvature

Returns
the FreeSurfer curvature data.

Definition at line 343 of file surface.h.

◆ fileName()

QString FSLIB::Surface::fileName ( ) const
inline

surf file name

Returns
the surf file name.

Definition at line 371 of file surface.h.

◆ filePath()

QString FSLIB::Surface::filePath ( ) const
inline

path to surf directuryt

Returns
the path to surf directory.

Definition at line 364 of file surface.h.

◆ hemi()

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

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

Returns
hemisphere id.

Definition at line 301 of file surface.h.

◆ isEmpty()

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

Returns whether Surface is empty.

Returns
true if is empty, false otherwise.

Definition at line 308 of file surface.h.

◆ nn()

const Eigen::MatrixX3f & FSLIB::Surface::nn ( ) const
inline

Normalized surface normals for each vertex

Returns
surface normals.

Definition at line 336 of file surface.h.

◆ offset() [1/2]

Eigen::Vector3f& FSLIB::Surface::offset ( )
inline

Vector offset

Returns
the offset vector.

◆ offset() [2/2]

Eigen::Vector3f & FSLIB::Surface::offset ( ) const
inline

Vector offset

Returns
the offset vector.

Definition at line 350 of file surface.h.

◆ read() [1/3]

bool Surface::read ( const QString &  p_sFileName,
Surface p_Surface,
bool  p_bLoadCurvature = true 
)
static

mne_read_surface

Reads a FreeSurfer surface file

Parameters
[in]p_sFileNameThe file to read.
[out]p_SurfaceThe read surface.
[in]p_bLoadCurvatureTrue if the curvature should be read (optional, default = true).
Returns
true if read sucessful, false otherwise.

Definition at line 208 of file surface.cpp.

◆ read() [2/3]

bool Surface::read ( const QString &  path,
qint32  hemi,
const QString &  surf,
Surface p_Surface,
bool  p_bLoadCurvature = true 
)
static

mne_read_surface

Reads a FreeSurfer surface file

Parameters
[in]pathpath to surface directory.
[in]hemiWhich hemisphere to load {0 -> lh, 1 -> rh}.
[in]surfName of the surface to load (eg. inflated, orig ...).
[out]p_SurfaceThe read surface.
[in]p_bLoadCurvatureTrue if the curvature should be read (optional, default = true).
Returns
true if read sucessful, false otherwise.

Definition at line 196 of file surface.cpp.

◆ read() [3/3]

bool Surface::read ( const QString &  subject_id,
qint32  hemi,
const QString &  surf,
const QString &  subjects_dir,
Surface p_Surface,
bool  p_bLoadCurvature = true 
)
static

mne_read_surface

Reads a FreeSurfer surface file

Parameters
[in]subject_idName of subject.
[in]hemiWhich hemisphere to load {0 -> lh, 1 -> rh}.
[in]surfName of the surface to load (eg. inflated, orig ...).
[in]subjects_dirSubjects directory.
[out]p_SurfaceThe read surface.
[in]p_bLoadCurvatureTrue if the curvature should be read (optional, default = true).
Returns
true if read sucessful, false otherwise.

Definition at line 184 of file surface.cpp.

◆ read_curv()

VectorXf Surface::read_curv ( const QString &  p_sFileName)
static

reads a binary curvature file into a vector

Returns
the read curvature.

Definition at line 410 of file surface.cpp.

◆ rr()

const Eigen::MatrixX3f & FSLIB::Surface::rr ( ) const
inline

Coordinates of vertices (rr)

Returns
coordinates of vertices.

Definition at line 322 of file surface.h.

◆ surf()

QString FSLIB::Surface::surf ( ) const
inline

Loaded surface (eg. inflated, orig ...)

Returns
the surface.

Definition at line 315 of file surface.h.

◆ tris()

const Eigen::MatrixX3i & FSLIB::Surface::tris ( ) const
inline

The triangle descriptions

Returns
triangle descriptions.

Definition at line 329 of file surface.h.


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