v2.0.0
Loading...
Searching...
No Matches
MNELIB::MNEMshDisplaySurfaceSet Class Reference

The MNE Msh Display Surface Set class holds information about a set of surfaces to be rendered. More...

#include <mne_msh_display_surface_set.h>

Public Types

typedef QSharedPointer< MNEMshDisplaySurfaceSetSPtr
typedef QSharedPointer< const MNEMshDisplaySurfaceSetConstSPtr

Public Member Functions

 MNEMshDisplaySurfaceSet (int nsurf=0)
 ~MNEMshDisplaySurfaceSet ()
int add_bem_surface (const QString &filepath, int kind, const QString &bemname, int full_geom, int check)
void add_replace_surface (std::unique_ptr< MNEMshDisplaySurface > newSurf, bool replace, bool drawable)
void apply_left_right_eyes ()
void apply_left_eyes ()
void setup_current_lights ()
void setup_lights (const MNEMshLightSet &set)

Static Public Member Functions

static std::unique_ptr< MNEMshDisplaySurfaceSetload (const QString &subject_id, const QString &surf, const QString &subjects_dir)
static void initialize_custom_lights ()
static std::unique_ptr< MNEMshLightSetdup_light_set (const MNEMshLightSet &s)

Public Attributes

QString subj
QString morph_subj
std::vector< std::unique_ptr< MNEMshDisplaySurface > > surfs
std::vector< std::unique_ptr< MNESurfacePatch > > patches
std::vector< float > patch_rot
int nsurf
int use_patches
Eigen::VectorXi active
Eigen::VectorXi drawable
std::unique_ptr< MNEMshLightSetlights
float rot [3]
float move [3]
float fov
float fov_scale
float eye [3]
float up [3]
float bg_color [3]
float text_color [3]

Detailed Description

The MNE Msh Display Surface Set class holds information about a set of surfaces to be rendered.

Replaces *mshDisplaySurfaceSet, mshDisplaySurfaceSetRec struct (analyze_types.c). Note that another implementation can be found in movie_types.h

Definition at line 88 of file mne_msh_display_surface_set.h.

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for MNEMshDisplaySurfaceSet.

Definition at line 92 of file mne_msh_display_surface_set.h.

◆ SPtr

Shared pointer type for MNEMshDisplaySurfaceSet.

Definition at line 91 of file mne_msh_display_surface_set.h.

Constructor & Destructor Documentation

◆ MNEMshDisplaySurfaceSet()

MNEMshDisplaySurfaceSet::MNEMshDisplaySurfaceSet ( int nsurf = 0)

Constructs the MNEMshDisplaySurfaceSet.

Definition at line 104 of file mne_msh_display_surface_set.cpp.

◆ ~MNEMshDisplaySurfaceSet()

MNEMshDisplaySurfaceSet::~MNEMshDisplaySurfaceSet ( )
default

Destroys the MNEMshDisplaySurfaceSet.

Member Function Documentation

◆ add_bem_surface()

int MNEMshDisplaySurfaceSet::add_bem_surface ( const QString & filepath,
int kind,
const QString & bemname,
int full_geom,
int check )

Read a BEM surface from a FIFF file, optionally validate that it is topologically closed (via solid-angle check), and add it to this set.

Parameters
[in]filepathPath to the BEM FIFF file.
[in]kindBEM surface kind constant.
[in]bemnameDisplay name for the surface.
[in]full_geomIf non-zero, compute full geometry information.
[in]checkIf non-zero, verify the surface is closed.
Returns
OK on success, FAIL on error.

Definition at line 205 of file mne_msh_display_surface_set.cpp.

◆ add_replace_surface()

void MNEMshDisplaySurfaceSet::add_replace_surface ( std::unique_ptr< MNEMshDisplaySurface > newSurf,
bool replace,
bool drawable )

Add a new surface to the set, or replace an existing surface with the same ID if replace is true.

Parameters
[in]newSurfThe surface to add or use as replacement.
[in]replaceIf true, replace an existing surface with matching ID.
[in]drawableWhether the surface should be marked as drawable.

Definition at line 249 of file mne_msh_display_surface_set.cpp.

◆ apply_left_eyes()

void MNEMshDisplaySurfaceSet::apply_left_eyes ( )

Apply the left-eye position and up-vector uniformly to all surfaces regardless of hemisphere.

Definition at line 315 of file mne_msh_display_surface_set.cpp.

◆ apply_left_right_eyes()

void MNEMshDisplaySurfaceSet::apply_left_right_eyes ( )

Assign hemisphere-appropriate eye positions and up-vectors to each surface (left eye for left hemisphere, right eye for right).

Definition at line 282 of file mne_msh_display_surface_set.cpp.

◆ dup_light_set()

std::unique_ptr< MNEMshLightSet > MNEMshDisplaySurfaceSet::dup_light_set ( const MNEMshLightSet & s)
static

Deep-copy a light set including all individual light entries.

Parameters
[in]sThe light set to duplicate.
Returns
A new deep copy. Caller takes ownership.

Definition at line 357 of file mne_msh_display_surface_set.cpp.

◆ initialize_custom_lights()

void MNEMshDisplaySurfaceSet::initialize_custom_lights ( )
static

Create a default set of 8 directional lights if custom lights have not been initialized yet.

Definition at line 339 of file mne_msh_display_surface_set.cpp.

◆ load()

std::unique_ptr< MNEMshDisplaySurfaceSet > MNEMshDisplaySurfaceSet::load ( const QString & subject_id,
const QString & surf,
const QString & subjects_dir )
static

Load left and right hemisphere FreeSurfer surfaces (with curvature) from the subjects directory, configuring eye positions and lighting.

Parameters
[in]subject_idSubject name.
[in]surfSurface type name (e.g. "inflated", "white").
[in]subjects_dirPath to the FreeSurfer subjects directory.
Returns
A new display surface set, or NULL on failure. Caller takes ownership.

Definition at line 137 of file mne_msh_display_surface_set.cpp.

◆ setup_current_lights()

void MNEMshDisplaySurfaceSet::setup_current_lights ( )

Initialize the custom light set (if needed) and apply it as the active lighting configuration.

Definition at line 331 of file mne_msh_display_surface_set.cpp.

◆ setup_lights()

void MNEMshDisplaySurfaceSet::setup_lights ( const MNEMshLightSet & set)

Replace the current active lighting with a deep copy of the provided light set.

Parameters
[in]setThe light set to apply.

Definition at line 369 of file mne_msh_display_surface_set.cpp.

Member Data Documentation

◆ active

Eigen::VectorXi MNELIB::MNEMshDisplaySurfaceSet::active

Boolean array indicating which surfaces are currently active.

Definition at line 201 of file mne_msh_display_surface_set.h.

◆ bg_color

float MNELIB::MNEMshDisplaySurfaceSet::bg_color[3]

Background color (RGB).

Definition at line 210 of file mne_msh_display_surface_set.h.

◆ drawable

Eigen::VectorXi MNELIB::MNEMshDisplaySurfaceSet::drawable

Boolean array indicating which surfaces could be drawn.

Definition at line 202 of file mne_msh_display_surface_set.h.

◆ eye

float MNELIB::MNEMshDisplaySurfaceSet::eye[3]

Eye position for viewing (used in composite views).

Definition at line 208 of file mne_msh_display_surface_set.h.

◆ fov

float MNELIB::MNEMshDisplaySurfaceSet::fov

Field of view (extent of the surface).

Definition at line 206 of file mne_msh_display_surface_set.h.

◆ fov_scale

float MNELIB::MNEMshDisplaySurfaceSet::fov_scale

Scale factor for extra space around FOV.

Definition at line 207 of file mne_msh_display_surface_set.h.

◆ lights

std::unique_ptr<MNEMshLightSet> MNELIB::MNEMshDisplaySurfaceSet::lights

Current active lighting configuration.

Definition at line 203 of file mne_msh_display_surface_set.h.

◆ morph_subj

QString MNELIB::MNEMshDisplaySurfaceSet::morph_subj

The subject we are morphing to.

Definition at line 195 of file mne_msh_display_surface_set.h.

◆ move

float MNELIB::MNEMshDisplaySurfaceSet::move[3]

Translation offset for the origin.

Definition at line 205 of file mne_msh_display_surface_set.h.

◆ nsurf

int MNELIB::MNEMshDisplaySurfaceSet::nsurf

Number of surfaces.

Definition at line 199 of file mne_msh_display_surface_set.h.

◆ patch_rot

std::vector<float> MNELIB::MNEMshDisplaySurfaceSet::patch_rot

Rotation angles for the (flat) patches.

Definition at line 198 of file mne_msh_display_surface_set.h.

◆ patches

std::vector<std::unique_ptr<MNESurfacePatch> > MNELIB::MNEMshDisplaySurfaceSet::patches

Optional flat patches for display (owned).

Definition at line 197 of file mne_msh_display_surface_set.h.

◆ rot

float MNELIB::MNEMshDisplaySurfaceSet::rot[3]

Rotation angles of the MRI (in radians).

Definition at line 204 of file mne_msh_display_surface_set.h.

◆ subj

QString MNELIB::MNEMshDisplaySurfaceSet::subj

The name of the subject.

Definition at line 194 of file mne_msh_display_surface_set.h.

◆ surfs

std::vector<std::unique_ptr<MNEMshDisplaySurface> > MNELIB::MNEMshDisplaySurfaceSet::surfs

Array of display surfaces (owned).

Definition at line 196 of file mne_msh_display_surface_set.h.

◆ text_color

float MNELIB::MNEMshDisplaySurfaceSet::text_color[3]

Text color (RGB).

Definition at line 211 of file mne_msh_display_surface_set.h.

◆ up

float MNELIB::MNEMshDisplaySurfaceSet::up[3]

Up vector for viewing.

Definition at line 209 of file mne_msh_display_surface_set.h.

◆ use_patches

int MNELIB::MNEMshDisplaySurfaceSet::use_patches

Whether to use patches for display.

Definition at line 200 of file mne_msh_display_surface_set.h.


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