v2.0.0
Loading...
Searching...
No Matches
mne_source_space.cpp File Reference

Implementation of MNELIB::MNESourceSpace. More...

#include "mne_source_space.h"
#include "mne_nearest.h"
#include "mne_patch_info.h"
#include "mne_mgh_tag_group.h"
#include "mne_surface.h"
#include "mne_hemisphere.h"
#include "filter_thread_arg.h"
#include <fiff/fiff_coord_trans.h>
#include <fiff/fiff_constants.h>
#include <fiff/fiff_sparse_matrix.h>
#include <fiff/fiff_stream.h>
#include <fiff/fiff_tag.h>
#include <fiff/fiff_byte_swap.h>
#include <QFile>
#include <QTextStream>
#include <QtConcurrent>
#include <QDebug>
#include <cstring>
#include <memory>
#include <math.h>
Include dependency graph for mne_source_space.cpp:

Go to the source code of this file.

Classes

class  FiffCoordTrans
 Labelled 4x4 FIFF affine: source frame, destination frame, rotation, translation and cached inverse. More...

Macros

#define _USE_MATH_DEFINES
#define EVEN(n)
#define LH_LABEL_TAG   "-lh.label"
#define RH_LABEL_TAG   "-rh.label"

Variables

constexpr int X = 0
constexpr int Y = 1
constexpr int Z = 2
constexpr int FAIL = -1
constexpr int OK = 0
constexpr int NNEIGHBORS = 26
constexpr int CURVATURE_FILE_MAGIC_NUMBER = 16777215
constexpr int TAG_OLD_MGH_XFORM = 30
constexpr int TAG_OLD_COLORTABLE = 1
constexpr int TAG_OLD_USEREALRAS = 2
constexpr int TAG_USEREALRAS = 4

Detailed Description

Implementation of MNELIB::MNESourceSpace.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.0.0
Date
March 2026

Provides FIFF read helpers that walk the FIFFB_MNE_SOURCE_SPACE blocks (extracting FIFF_MNE_SOURCE_SPACE_POINTS, _NORMALS, _TRIANGLES, _SELECTION and the neighbour tables), plus decimation, patch-info loading and basic geometric utilities (vertex area, nearest neighbour). All routines are designed to behave identically to the read_source_spaces function in the MNE-Python source.

Definition in file mne_source_space.cpp.

Macro Definition Documentation

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

Definition at line 48 of file mne_source_space.cpp.

◆ EVEN

#define EVEN ( n)
Value:
((((n) / 2) * 2) == n)

◆ LH_LABEL_TAG

#define LH_LABEL_TAG   "-lh.label"

Definition at line 1989 of file mne_source_space.cpp.

◆ RH_LABEL_TAG

#define RH_LABEL_TAG   "-rh.label"

Definition at line 1990 of file mne_source_space.cpp.

Variable Documentation

◆ CURVATURE_FILE_MAGIC_NUMBER

int CURVATURE_FILE_MAGIC_NUMBER = 16777215
constexpr

Definition at line 62 of file mne_source_space.cpp.

◆ FAIL

int FAIL = -1
constexpr

Definition at line 57 of file mne_source_space.cpp.

◆ NNEIGHBORS

int NNEIGHBORS = 26
constexpr

Definition at line 60 of file mne_source_space.cpp.

◆ OK

int OK = 0
constexpr

Definition at line 58 of file mne_source_space.cpp.

◆ TAG_OLD_COLORTABLE

int TAG_OLD_COLORTABLE = 1
constexpr

Definition at line 65 of file mne_source_space.cpp.

◆ TAG_OLD_MGH_XFORM

int TAG_OLD_MGH_XFORM = 30
constexpr

Definition at line 64 of file mne_source_space.cpp.

◆ TAG_OLD_USEREALRAS

int TAG_OLD_USEREALRAS = 2
constexpr

Definition at line 66 of file mne_source_space.cpp.

◆ TAG_USEREALRAS

int TAG_USEREALRAS = 4
constexpr

Definition at line 67 of file mne_source_space.cpp.

◆ X

int X = 0
constexpr

Definition at line 53 of file mne_source_space.cpp.

◆ Y

int Y = 1
constexpr

Definition at line 54 of file mne_source_space.cpp.

◆ Z

int Z = 2
constexpr

Definition at line 55 of file mne_source_space.cpp.