MNEHemisphere
Namespace: MNELIB · Library: MNE Library
#include <mne/mne_hemisphere.h>
class MNELIB::MNEHemisphere
Hemisphere source space geometry information.
Hemisphere provides geometry information
QFile srcFile(data + "/subjects/sample/bem/sample-oct-6-src.fif");
FiffStream::SPtr stream(new FiffStream(&srcFile));
MNESourceSpaces src;
stream->open();
MNESourceSpaces::readFromStream(stream, true, src); // add_geom: normals, triangle data and patches
stream->close();
const auto& lh = dynamic_cast<const MNEHemisphere&>(src[0]);
QList<VectorXi> vertno = src.get_vertno(); // used vertices per hemisphere
Inheritance
Public Methods
MNEHemisphere()
Constructors the hemisphere source space.
MNEHemisphere(p_MNEHemisphere)
Copy constructor.
Parameters:
- p_MNEHemisphere : const MNEHemisphere & Hemisphere source space which should be copied.
~MNEHemisphere()
Destroys the hemisphere source space.
clone()
Creates a deep copy of this hemisphere, preserving the MNEHemisphere type.
Returns:
- MNESourceSpace::SPtr — a shared_ptr<MNESourceSpace> pointing to a cloned
MNEHemisphere.
add_geometry_info()
Add vertex normals and neighbourhood information to this hemisphere.
Returns:
- bool — true if succeeded, false otherwise.
complete_source_space_info()
Complete triangulation information (triangle centers, normals, areas) for both the main and use triangulations.
Returns:
- bool — true if succeeded, false otherwise.
compute_patch_info()
Compute patch statistics from the nearest-vertex data.
Fills pinfo (per-patch vertex lists) and patch_inds (patch index per vertex).
Returns:
- bool — true if patch info was computed, false if nearest data is empty.
clear()
Initializes the hemisphere source space.
isClustered()
is hemisphere clustered?
Returns:
- bool — true if hemisphere is clustered, false otherwise.
transform_hemisphere_to(dest, p_Trans)
mne_transform_source_space_to
Parameters:
-
dest : FIFFLIB::fiff_int_t The id of the destination coordinate system (FIFFV_COORD_...).
-
p_Trans : const FiffCoordTrans & The coordinate transformation structure to use.
Returns:
- bool — true if succeeded, false otherwise.
writeToStream(p_pStream)
mne_python _write_one_source_space
Parameters:
- p_pStream : *FiffStream ** The stream to write to.
operator=(other)
Copy assignment operator.
Parameters:
- other : const MNEHemisphere &
The
MNEHemisphereto assign from.
Returns:
- MNEHemisphere & — Reference to this object.
Example
- Full source:
src/examples/ex_mne_api/main.cpp - Build target:
ex_mne_api(runs under CTest) - Data: mne-cpp-test-data
Used in examples
ex_mne_api
MNE library: BEM surfaces, surface projection, ICP, source spaces and epochs.
stream->open();
MNESourceSpaces::readFromStream(stream, true, src); // add_geom: normals, triangle data and patches
stream->close();
const auto& lh = dynamic_cast<const MNEHemisphere&>(src[0]);
QList<VectorXi> vertno = src.get_vertno(); // used vertices per hemisphere
// mne.read_source_spaces: lh 155407 vertices, 4098 in use (8192 used triangles), vertno 14, 54, 59; rh 156866 / 4098
ok &= expect(src.size() == 2 && lh.np == 155407 && lh.nuse == 4098 && lh.nuse_tri == 8192 && lh.coord_frame == FIFFV_COORD_MRI && vertno[0].head(3) == Vector3i(14, 54, 59) && src[1].np == 156866 && vertno[1].size() == 4098 && lh.pinfo.size() == 4098,
"MNESourceSpaces/MNEHemisphere: oct-6 source space with patches like mne.read_source_spaces");
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>
- Christof Pieloth <pieloth@labp.htwk-leipzig.de>
- Lorenz Esch <lorenz.esch@tu-ilmenau.de>
- Juan GPC <jgarciaprieto@mgh.harvard.edu>
- Gabriel Motta <gabrielbenmotta@gmail.com>