v2.0.0
Loading...
Searching...
No Matches
IEEGLIB::IeegImplantation Class Reference

Contacts of an sEEG / ECoG implantation and the leads they belong to. More...

#include <ieeg_implantation.h>

Public Member Functions

 IeegImplantation ()=default
 IeegImplantation (const QVector< IeegContact > &contacts, const QString &coordinateSystem=QString())
const QVector< IeegContact > & contacts () const
const QVector< IeegLead > & leads () const
QString coordinateSystem () const
bool isEmpty () const
bool setLeadType (const QString &lead, IeegLeadType type, int rows=0, int cols=0)
int indexOf (const QString &name) const
Eigen::MatrixX3f positions () const
bool isScannerRas () const
IeegImplantation transformed (const Eigen::Matrix4f &trans, const QString &frame) const

Static Public Member Functions

static IeegImplantation readBids (const QString &electrodesTsv, QString *error=nullptr)

Static Public Attributes

static constexpr float kMaxDepthSpacing = 0.006f

Detailed Description

Contacts of an sEEG / ECoG implantation and the leads they belong to.

Definition at line 92 of file ieeg_implantation.h.

Constructor & Destructor Documentation

◆ IeegImplantation() [1/2]

IEEGLIB::IeegImplantation::IeegImplantation ( )
default

◆ IeegImplantation() [2/2]

IeegImplantation::IeegImplantation ( const QVector< IeegContact > & contacts,
const QString & coordinateSystem = QString() )
explicit

Group contacts into leads.

A contact without a lead name belongs to the lead named like the contact without its trailing number (LA1, LA10 -> LA; A'1 stays apart from A1, the prime marking the other hemisphere). Within a lead, contacts are ordered by that number. A lead whose closest neighbouring contacts are less than kMaxDepthSpacing apart is a depth lead, others are strips.

Parameters
[in]contactsContacts, positions in metres.
[in]coordinateSystemName of the frame of the positions, e.g. "ACPC".

Definition at line 66 of file ieeg_implantation.cpp.

Member Function Documentation

◆ contacts()

const QVector< IeegContact > & IEEGLIB::IeegImplantation::contacts ( ) const
inline
Returns
All contacts.

Definition at line 132 of file ieeg_implantation.h.

◆ coordinateSystem()

QString IEEGLIB::IeegImplantation::coordinateSystem ( ) const
inline
Returns
Name of the frame of the positions, e.g. "ACPC"; empty when unknown.

Definition at line 144 of file ieeg_implantation.h.

◆ indexOf()

int IeegImplantation::indexOf ( const QString & name) const
Parameters
[in]nameContact name.
Returns
Index of the contact, or -1.

Definition at line 204 of file ieeg_implantation.cpp.

◆ isEmpty()

bool IEEGLIB::IeegImplantation::isEmpty ( ) const
inline
Returns
True without contacts.

Definition at line 150 of file ieeg_implantation.h.

◆ isScannerRas()

bool IeegImplantation::isScannerRas ( ) const
Returns
True when the positions are scanner RAS of the subject's T1, which MNE-BIDS reads the BIDS iEEG systems "ACPC" and "ScanRAS" as. Such positions must be moved into the surface (tkr) RAS of the FreeSurfer surfaces before they are drawn on them.

Definition at line 215 of file ieeg_implantation.cpp.

◆ leads()

const QVector< IeegLead > & IEEGLIB::IeegImplantation::leads ( ) const
inline
Returns
All leads, in order of their first contact.

Definition at line 138 of file ieeg_implantation.h.

◆ positions()

Eigen::MatrixX3f IeegImplantation::positions ( ) const
Returns
Contact positions, one row per contact, in metres.

Definition at line 233 of file ieeg_implantation.cpp.

◆ readBids()

IeegImplantation IeegImplantation::readBids ( const QString & electrodesTsv,
QString * error = nullptr )
static

Read a BIDS iEEG *_electrodes.tsv.

Units and the coordinate system come from the *_coordsystem.json in the same folder that shares the longest name prefix; without one the file is refused, since the units are then unknown. Contacts without coordinates are skipped. The group column assigns leads and the dimension column ("[4x8]") the grid shape; a type naming depth, strip or grid sets the lead type. Otherwise names and spacing decide, as in the constructor.

Parameters
[in]electrodesTsvPath to the *_electrodes.tsv file.
[out]errorOptional: why the file was refused.
Returns
The implantation; empty when the file was refused or has no placed contacts.

Definition at line 102 of file ieeg_implantation.cpp.

◆ setLeadType()

bool IeegImplantation::setLeadType ( const QString & lead,
IeegLeadType type,
int rows = 0,
int cols = 0 )

Set a lead's type when it is declared rather than inferred.

Parameters
[in]leadLead name.
[in]typeLead type.
[in]rowsGrid rows, or 0 when unknown.
[in]colsGrid columns, or 0 when unknown.
Returns
False when there is no such lead. A shape that does not match the contact count is dropped.

Definition at line 188 of file ieeg_implantation.cpp.

◆ transformed()

IeegImplantation IeegImplantation::transformed ( const Eigen::Matrix4f & trans,
const QString & frame ) const
Parameters
[in]transAffine, in metres, from the current frame to the new one.
[in]frameName of the new frame.
Returns
A copy with every position transformed; leads are unchanged.

Definition at line 222 of file ieeg_implantation.cpp.

Member Data Documentation

◆ kMaxDepthSpacing

float IEEGLIB::IeegImplantation::kMaxDepthSpacing = 0.006f
staticconstexpr

Leads whose closest neighbouring contacts are nearer than this are depth leads.

Definition at line 96 of file ieeg_implantation.h.


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