v2.0.0
Loading...
Searching...
No Matches
INVLIB::InvVolumeSourceEstimate Class Reference

Volume source estimate: scalar values at voxel locations. More...

#include <inv_volume_source_estimate.h>

Public Types

typedef QSharedPointer< InvVolumeSourceEstimateSPtr
typedef QSharedPointer< const InvVolumeSourceEstimateConstSPtr
Public Types inherited from INVLIB::InvSourceEstimate
typedef QSharedPointer< InvSourceEstimateSPtr
typedef QSharedPointer< const InvSourceEstimateConstSPtr

Public Member Functions

 InvVolumeSourceEstimate ()
 InvVolumeSourceEstimate (const Eigen::MatrixXd &p_sol, const Eigen::VectorXi &p_vertices, float p_tmin, float p_tstep)
void setShape (const QVector< int > &shape)
const QVector< int > & shape () const
bool hasShape () const
Eigen::VectorXd toVolume (int timeIdx) const
Eigen::Vector3d centreOfMass (int timeIdx) const
Public Member Functions inherited from INVLIB::InvSourceEstimate
 InvSourceEstimate ()
 InvSourceEstimate (const Eigen::MatrixXd &p_sol, const Eigen::VectorXi &p_vertices, float p_tmin, float p_tstep)
 InvSourceEstimate (const InvSourceEstimate &p_SourceEstimate)
 InvSourceEstimate (QIODevice &p_IODevice)
void clear ()
InvSourceEstimate reduce (qint32 start, qint32 n)
bool write (QIODevice &p_IODevice)
void write_w (const QString &path) const
bool isEmpty () const
InvSourceEstimateoperator= (const InvSourceEstimate &rhs)
int samples () const
Eigen::VectorXi getIndicesByLabel (const QList< FSLIB::FsLabel > &lPickedLabels, bool bIsClustered) const
bool hasGridData () const
bool hasCouplings () const
bool hasFocalDipoles () const
bool hasPositions () const
bool hasConnectivity () const

Additional Inherited Members

Static Public Member Functions inherited from INVLIB::InvSourceEstimate
static bool read (QIODevice &p_IODevice, InvSourceEstimate &p_stc)
static InvSourceEstimate read_w (const QString &path)
Public Attributes inherited from INVLIB::InvSourceEstimate
Eigen::MatrixXd data
Eigen::VectorXi vertices
Eigen::RowVectorXf times
float tmin
float tstep
InvEstimateMethod method
InvSourceSpaceType sourceSpaceType
InvOrientationType orientationType
Eigen::MatrixX3f positions
std::vector< InvSourceCouplingcouplings
std::vector< InvFocalDipolefocalDipoles
std::vector< InvConnectivityconnectivity

Detailed Description

Volume source estimate: scalar values at voxel locations.

Extends InvSourceEstimate with grid shape information to allow reshaping the flat data into a 3D volume.

Definition at line 51 of file inv_volume_source_estimate.h.

Inheritance diagram for INVLIB::InvVolumeSourceEstimate:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

◆ SPtr

Constructor & Destructor Documentation

◆ InvVolumeSourceEstimate() [1/2]

InvVolumeSourceEstimate::InvVolumeSourceEstimate ( )

Definition at line 35 of file inv_volume_source_estimate.cpp.

◆ InvVolumeSourceEstimate() [2/2]

INVLIB::InvVolumeSourceEstimate::InvVolumeSourceEstimate ( const Eigen::MatrixXd & p_sol,
const Eigen::VectorXi & p_vertices,
float p_tmin,
float p_tstep )

Construct from data and vertices.

Parameters
[in]p_solData (n_voxels x n_times).
[in]p_verticesVoxel indices.
[in]p_tminStart time.
[in]p_tstepTime step.

Member Function Documentation

◆ centreOfMass()

Vector3d InvVolumeSourceEstimate::centreOfMass ( int timeIdx) const

Compute the centre of mass of the activity at a given time point.

Parameters
[in]timeIdxTime sample index.
Returns
3D position (x, y, z) in voxel coordinates, or (0,0,0) if no activity.

Definition at line 80 of file inv_volume_source_estimate.cpp.

◆ hasShape()

bool INVLIB::InvVolumeSourceEstimate::hasShape ( ) const
inline

Check whether the grid shape has been set.

Definition at line 91 of file inv_volume_source_estimate.h.

◆ setShape()

void InvVolumeSourceEstimate::setShape ( const QVector< int > & shape)

Set the 3D grid shape (nx, ny, nz) for volume reshaping.

Parameters
[in]shapeGrid dimensions {nx, ny, nz}.

Definition at line 53 of file inv_volume_source_estimate.cpp.

◆ shape()

const QVector< int > & INVLIB::InvVolumeSourceEstimate::shape ( ) const
inline

Get the 3D grid shape.

Definition at line 85 of file inv_volume_source_estimate.h.

◆ toVolume()

VectorXd InvVolumeSourceEstimate::toVolume ( int timeIdx) const

Extract a 3D volume for a given time point, filling the grid with zeros where no source is active.

Parameters
[in]timeIdxTime sample index.
Returns
Flattened volume (nx*ny*nz) with values at active voxels.

Definition at line 61 of file inv_volume_source_estimate.cpp.


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