44 const VectorXi& p_vertices,
45 float p_tmin,
float p_tstep)
55 if (
shape.size() == 3)
63 if (!
hasShape() || timeIdx < 0 || timeIdx >=
static_cast<int>(
data.cols()))
66 int nTotal = m_shape[0] * m_shape[1] * m_shape[2];
67 VectorXd vol = VectorXd::Zero(nTotal);
69 for (
int i = 0; i <
vertices.size(); ++i) {
71 if (vIdx >= 0 && vIdx < nTotal)
72 vol[vIdx] =
data(i, timeIdx);
82 if (!
hasShape() || timeIdx < 0 || timeIdx >=
static_cast<int>(
data.cols()))
83 return Vector3d::Zero();
88 double totalWeight = 0.0;
89 Vector3d com = Vector3d::Zero();
91 for (
int i = 0; i <
vertices.size(); ++i) {
92 double w = std::abs(
data(i, timeIdx));
97 int ix = vIdx / (ny * nz);
98 int iy = (vIdx % (ny * nz)) / nz;
101 com += w * Vector3d(ix, iy, iz);
105 if (totalWeight > 1e-15)
Volume (voxel-grid) source estimate that augments InvSourceEstimate with 3-D grid shape information.
Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).
Source-space inverse-solution container with dense grid plus optional focal-dipole,...
InvSourceSpaceType sourceSpaceType
void setShape(const QVector< int > &shape)
Eigen::VectorXd toVolume(int timeIdx) const
const QVector< int > & shape() const
Eigen::Vector3d centreOfMass(int timeIdx) const
InvVolumeSourceEstimate()