MNE-CPP  0.1.9
A Framework for Electrophysiology
Functions | Variables
icp.h File Reference

ICP declarations. More...

#include "rtprocessing_global.h"
#include <QSharedPointer>
#include <Eigen/Core>
Include dependency graph for icp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

RTPROCESINGSHARED_EXPORT bool RTPROCESSINGLIB::performIcp (const QSharedPointer< MNELIB::MNEProjectToSurface > mneSurfacePoints, const Eigen::MatrixXf &matPointCloud, FIFFLIB::FiffCoordTrans &transFromTo, float &fRMSE, bool bScale=false, int iMaxIter=20, float fTol=0.001, const Eigen::VectorXf &vecWeitgths=vecDefaultWeigths)
 
RTPROCESINGSHARED_EXPORT bool RTPROCESSINGLIB::fitMatchedPoints (const Eigen::MatrixXf &matSrcPoint, const Eigen::MatrixXf &matDstPoint, Eigen::Matrix4f &matTrans, float fScale=1.0, bool bScale=false, const Eigen::VectorXf &vecWeitgths=vecDefaultWeigths)
 
RTPROCESINGSHARED_EXPORT bool RTPROCESSINGLIB::discard3DPointOutliers (const QSharedPointer< MNELIB::MNEProjectToSurface > mneSurfacePoints, const Eigen::MatrixXf &matPointCloud, const FIFFLIB::FiffCoordTrans &transFromTo, Eigen::VectorXi &vecTake, Eigen::MatrixXf &matTakePoint, float fMaxDist=0.0)
 

Variables

const Eigen::VectorXf RTPROCESSINGLIB::vecDefaultWeigths
 

Detailed Description

ICP declarations.

Author
Ruben Dörfel doerf.nosp@m.elru.nosp@m.ben@a.nosp@m.ol.c.nosp@m.om
Since
0.1.5
Date
July, 2020

LICENSE

Copyright (C) 2020, Ruben Dörfel. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file icp.h.

Function Documentation

◆ discard3DPointOutliers()

RTPROCESINGSHARED_EXPORT bool RTPROCESSINGLIB::discard3DPointOutliers ( const QSharedPointer< MNELIB::MNEProjectToSurface mneSurfacePoints,
const Eigen::MatrixXf &  matPointCloud,
const FIFFLIB::FiffCoordTrans transFromTo,
Eigen::VectorXi &  vecTake,
Eigen::MatrixXf &  matTakePoint,
float  fMaxDist = 0.0 
)

Discard outliers compared to a given 3D surface

Parameters
[in]mneSurfacePointsThe MNEProjectToSurface object that contains the surface triangles etc. (To).
[in]matPointCloudThe destination point set to be registrated (From).
[in,out]transFromToThe forward transformation matrix.
[in]vecTakeThe index of taken digitizers.
[in]matTakePointThe the digitizer points to take.
[in]fMaxDistThe maximum distance to the surface in mm, defaults to 0 mm.
Returns
Wether the discarding was succesfull.

◆ fitMatchedPoints()

RTPROCESINGSHARED_EXPORT bool RTPROCESSINGLIB::fitMatchedPoints ( const Eigen::MatrixXf &  matSrcPoint,
const Eigen::MatrixXf &  matDstPoint,
Eigen::Matrix4f &  matTrans,
float  fScale = 1.0,
bool  bScale = false,
const Eigen::VectorXf &  vecWeitgths = vecDefaultWeigths 
)

Corresponding point set registration using quaternions.

Parameters
[in]matSrcPointThe source point set.
[in]matDstPointThe destination point set.
[in,out]matTransThe forward transformation matrix.
[in,out]fScaleThe scaling parameter, defaults to 1.0.
[in]bScaleWether to apply scaling or not. Should be false for matching data sets, defaults to false.
[in]vecWeitgthsThe weitghts to apply , defaults to zeros.
Returns
Wether the matching was succesfull.

◆ performIcp()

RTPROCESINGSHARED_EXPORT bool RTPROCESSINGLIB::performIcp ( const QSharedPointer< MNELIB::MNEProjectToSurface mneSurfacePoints,
const Eigen::MatrixXf &  matPointCloud,
FIFFLIB::FiffCoordTrans transFromTo,
float &  fRMSE,
bool  bScale = false,
int  iMaxIter = 20,
float  fTol = 0.001,
const Eigen::VectorXf &  vecWeitgths = vecDefaultWeigths 
)

The ICP algorithm to register a point cloud with a surface.

Parameters
[in]mneSurfacePointsThe MNEProjectToSurface object that contains the surface triangles etc. (To).
[in]matPointCloudThe point cloud to be registrated (From).
[in,out]transFromToThe forward transformation matrix. It can contain an initial transformatin (e.g. from fiducial alignment).
[in,out]fRMSEThe resulting Root-Mean-Square-Error in m.
[in]bScaleWether to apply scaling or not. Should be false for matching data sets, defaults to false.
[in]iMaxIterThe maximum number of iterations for the icp algorithms, defaults to 20.
[in]fTolThe destination point set to be reistrated, defaults to 0.001.
[in]vecWeitgthsThe weitghts to apply, defaults to zeros.
Returns
Wether the registration was succesfull.