MNE-CPP  beta 1.0
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 MatrixX3f & rr () const
 
const MatrixX3i & tris () const
 
const MatrixX3f & nn () const
 
const VectorXf & curv () const
 
const Vector3f & offset () const
 
Vector3f & offset ()
 

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 VectorXf read_curv (const QString &p_sFileName)
 
static MatrixX3f compute_normals (const MatrixX3f &rr, const MatrixX3i &tris)
 

Detailed Description

FreeSurfer surface mesh.

A FreeSurfer surface mesh in triangular format

Definition at line 92 of file surface.h.

Member Typedef Documentation

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

Const shared pointer type for Surface class.

Definition at line 96 of file surface.h.

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

Shared pointer type for Surface class.

Definition at line 95 of file surface.h.

Constructor & Destructor Documentation

Surface::Surface ( )

Default constructor

Definition at line 72 of file surface.cpp.

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 84 of file surface.cpp.

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_dirTrue if the curvature should be read (optional, default = true)

Definition at line 97 of file surface.cpp.

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

Surface::~Surface ( )

Destroys the Surface class.

Definition at line 123 of file surface.cpp.

Member Function Documentation

void Surface::clear ( )

Initializes the Surface.

Definition at line 130 of file surface.cpp.

MatrixX3f Surface::compute_normals ( const MatrixX3f &  rr,
const 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 145 of file surface.cpp.

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

FreeSurfer curvature

Returns
the FreeSurfer curvature data

Definition at line 352 of file surface.h.

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

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

Returns
hemisphere id

Definition at line 304 of file surface.h.

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

Returns whether Surface is empty.

Returns
true if is empty, false otherwise

Definition at line 312 of file surface.h.

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

Normalized surface normals for each vertex

Returns
surface normals

Definition at line 344 of file surface.h.

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

Vector offset

Returns
the offset vector

Definition at line 360 of file surface.h.

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

Vector offset

Returns
the offset vector

Definition at line 368 of file surface.h.

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 197 of file surface.cpp.

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 210 of file surface.cpp.

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 223 of file surface.cpp.

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

reads a binary curvature file into a vector

Returns
the read curvature

Definition at line 425 of file surface.cpp.

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

Coordinates of vertices (rr)

Returns
coordinates of vertices

Definition at line 328 of file surface.h.

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

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

Returns
the surface

Definition at line 320 of file surface.h.

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

The triangle descriptions

Returns
triangle descriptions

Definition at line 336 of file surface.h.


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