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

FreeSurfer surface mesh. More...

#include <fs_surface.h>

Public Types

typedef QSharedPointer< FsSurfaceSPtr
typedef QSharedPointer< const FsSurfaceConstSPtr

Public Member Functions

 FsSurface ()
 FsSurface (const QString &p_sFile)
 FsSurface (const QString &subject_id, qint32 hemi, const QString &surf, const QString &subjects_dir)
 FsSurface (const QString &path, qint32 hemi, const QString &surf)
 ~FsSurface ()
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, FsSurface &p_Surface, bool p_bLoadCurvature=true)
static bool read (const QString &path, qint32 hemi, const QString &surf, FsSurface &p_Surface, bool p_bLoadCurvature=true)
static bool read (const QString &p_sFileName, FsSurface &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)
static qint32 fread3 (QDataStream &stream)
static qint32 fread3 (std::iostream &stream)
static Eigen::VectorXi fread3_many (QDataStream &stream, qint32 count)
static Eigen::VectorXi fread3_many (std::iostream &stream, qint32 count)

Detailed Description

FreeSurfer surface mesh.

A FreeSurfer surface mesh in triangular format

Definition at line 82 of file fs_surface.h.

Member Typedef Documentation

◆ ConstSPtr

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

Const shared pointer type for FsSurface class.

Definition at line 86 of file fs_surface.h.

◆ SPtr

typedef QSharedPointer<FsSurface> FSLIB::FsSurface::SPtr

Shared pointer type for FsSurface class.

Definition at line 85 of file fs_surface.h.

Constructor & Destructor Documentation

◆ FsSurface() [1/4]

FsSurface::FsSurface ( )

Default constructor

Definition at line 65 of file fs_surface.cpp.

◆ FsSurface() [2/4]

FsSurface::FsSurface ( const QString & p_sFile)
explicit

Construts the surface by reading it of the given file.

Parameters
[in]p_sFileFsSurface file name with path.

Definition at line 76 of file fs_surface.cpp.

◆ FsSurface() [3/4]

FsSurface::FsSurface ( 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 88 of file fs_surface.cpp.

◆ FsSurface() [4/4]

FsSurface::FsSurface ( 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 100 of file fs_surface.cpp.

◆ ~FsSurface()

FsSurface::~FsSurface ( )

Destroys the FsSurface class.

Definition at line 112 of file fs_surface.cpp.

Member Function Documentation

◆ clear()

void FsSurface::clear ( )

Initializes the FsSurface.

Definition at line 118 of file fs_surface.cpp.

◆ compute_normals()

MatrixX3f FsSurface::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 132 of file fs_surface.cpp.

◆ curv()

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

FreeSurfer curvature

Returns
the FreeSurfer curvature data.

Definition at line 388 of file fs_surface.h.

◆ fileName()

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

surf file name

Returns
the surf file name.

Definition at line 416 of file fs_surface.h.

◆ filePath()

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

path to surf directuryt

Returns
the path to surf directory.

Definition at line 409 of file fs_surface.h.

◆ fread3() [1/2]

qint32 FsSurface::fread3 ( QDataStream & stream)
static

Reads a 3-byte integer out of a QDataStream (FreeSurfer format).

Parameters
[in]streamStream to read from.
Returns
the read 3-byte integer.

Definition at line 463 of file fs_surface.cpp.

◆ fread3() [2/2]

qint32 FsSurface::fread3 ( std::iostream & stream)
static

Reads a 3-byte integer out of a std::iostream (FreeSurfer format).

Parameters
[in]streamStream to read from.
Returns
the read 3-byte integer.

Definition at line 472 of file fs_surface.cpp.

◆ fread3_many() [1/2]

VectorXi FsSurface::fread3_many ( QDataStream & stream,
qint32 count )
static

Reads multiple 3-byte integers out of a QDataStream (FreeSurfer format).

Parameters
[in]streamStream to read from.
[in]countNumber of elements to read.
Returns
the read 3-byte integers.

Definition at line 481 of file fs_surface.cpp.

◆ fread3_many() [2/2]

VectorXi FsSurface::fread3_many ( std::iostream & stream,
qint32 count )
static

Reads multiple 3-byte integers out of a std::iostream (FreeSurfer format).

Parameters
[in]streamStream to read from.
[in]countNumber of elements to read.
Returns
the read 3-byte integers.

Definition at line 491 of file fs_surface.cpp.

◆ hemi()

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

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

Returns
hemisphere id.

Definition at line 346 of file fs_surface.h.

◆ isEmpty()

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

Returns whether FsSurface is empty.

Returns
true if is empty, false otherwise.

Definition at line 353 of file fs_surface.h.

◆ nn()

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

Normalized surface normals for each vertex

Returns
surface normals.

Definition at line 381 of file fs_surface.h.

◆ offset() [1/2]

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

Vector offset

Returns
the offset vector.

Definition at line 402 of file fs_surface.h.

◆ offset() [2/2]

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

Vector offset

Returns
the offset vector.

Definition at line 395 of file fs_surface.h.

◆ read() [1/3]

bool FsSurface::read ( const QString & p_sFileName,
FsSurface & 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 207 of file fs_surface.cpp.

◆ read() [2/3]

bool FsSurface::read ( const QString & path,
qint32 hemi,
const QString & surf,
FsSurface & 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 195 of file fs_surface.cpp.

◆ read() [3/3]

bool FsSurface::read ( const QString & subject_id,
qint32 hemi,
const QString & surf,
const QString & subjects_dir,
FsSurface & 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 183 of file fs_surface.cpp.

◆ read_curv()

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

reads a binary curvature file into a vector

Returns
the read curvature.

Definition at line 409 of file fs_surface.cpp.

◆ rr()

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

Coordinates of vertices (rr)

Returns
coordinates of vertices.

Definition at line 367 of file fs_surface.h.

◆ surf()

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

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

Returns
the surface.

Definition at line 360 of file fs_surface.h.

◆ tris()

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

The triangle descriptions

Returns
triangle descriptions.

Definition at line 374 of file fs_surface.h.


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