MNE-CPP
0.1.9
A Framework for Electrophysiology
|
Coordinate transformation description. More...
#include <fiff_coord_trans.h>
Public Types | |
typedef QSharedPointer< FiffCoordTrans > | SPtr |
typedef QSharedPointer< const FiffCoordTrans > | ConstSPtr |
Public Member Functions | |
FiffCoordTrans () | |
FiffCoordTrans (QIODevice &p_IODevice) | |
FiffCoordTrans (const FiffCoordTrans &p_FiffCoordTrans) | |
~FiffCoordTrans () | |
void | clear () |
bool | invert_transform () |
bool | isEmpty () const |
Eigen::MatrixX3f | apply_trans (const Eigen::MatrixX3f &rr, bool do_move=true) const |
Eigen::MatrixX3f | apply_inverse_trans (const Eigen::MatrixX3f &rr, bool do_move=true) const |
void | print () const |
void | write (QIODevice &p_IODevice) |
Writes the transformation to file. More... | |
void | writeToStream (FiffStream *p_pStream) |
Writes the transformation to stream. More... | |
float | angleTo (Eigen::MatrixX4f mTransDest) |
float | translationTo (Eigen::MatrixX4f mTransDest) |
FiffCoordTransOld | toOld () |
Static Public Member Functions | |
static bool | read (QIODevice &p_IODevice, FiffCoordTrans &p_Trans) |
static QString | frame_name (int frame) |
static FiffCoordTrans | make (int from, int to, const Eigen::Matrix3f &rot, const Eigen::VectorXf &move) |
static FiffCoordTrans | make (int from, int to, const Eigen::Matrix4f &matTrans, bool bStandard=false) |
static bool | addInverse (FiffCoordTrans &t) |
static qint32 | storageSize () |
Public Attributes | |
fiff_int_t | from |
fiff_int_t | to |
Eigen::Matrix< float, 4, 4, Eigen::DontAlign > | trans |
Eigen::Matrix< float, 4, 4, Eigen::DontAlign > | invtrans |
Friends | |
bool | operator== (const FiffCoordTrans &a, const FiffCoordTrans &b) |
Coordinate transformation description.
Coordinate transformation description which replaces fiffCoordTransRec which had a size of 104
Definition at line 74 of file fiff_coord_trans.h.
typedef QSharedPointer<const FiffCoordTrans> FIFFLIB::FiffCoordTrans::ConstSPtr |
Const shared pointer type for FiffCoordTrans.
Definition at line 78 of file fiff_coord_trans.h.
typedef QSharedPointer<FiffCoordTrans> FIFFLIB::FiffCoordTrans::SPtr |
Shared pointer type for FiffCoordTrans.
Definition at line 77 of file fiff_coord_trans.h.
FiffCoordTrans::FiffCoordTrans | ( | ) |
Constructs the coordinate transformation descriptor.
Definition at line 69 of file fiff_coord_trans.cpp.
FiffCoordTrans::FiffCoordTrans | ( | QIODevice & | p_IODevice | ) |
Constructs a coordinate transformation, by reading from a IO device.
[in] | p_IODevice | IO device to read from the coordinate transform. |
Definition at line 79 of file fiff_coord_trans.cpp.
FiffCoordTrans::FiffCoordTrans | ( | const FiffCoordTrans & | p_FiffCoordTrans | ) |
Copy constructor.
[in] | p_FiffCoordTrans | Coordinate transformation description which should be copied. |
Definition at line 94 of file fiff_coord_trans.cpp.
FiffCoordTrans::~FiffCoordTrans | ( | ) |
Destroys the coordinate transformation descriptor.
Definition at line 104 of file fiff_coord_trans.cpp.
|
static |
[in] | t | Fiff coordinate transform to which the inverse should be added. |
Definition at line 265 of file fiff_coord_trans.cpp.
float FiffCoordTrans::angleTo | ( | Eigen::MatrixX4f | mTransDest | ) |
Calculate rotation as angle between two rotation matrices
[in] | mTransDest | The destination transformation matrix. |
Definition at line 285 of file fiff_coord_trans.cpp.
MatrixX3f FiffCoordTrans::apply_inverse_trans | ( | const Eigen::MatrixX3f & | rr, |
bool | do_move = true |
||
) | const |
Applies the inverse coordinate transform to given coordinates and returns the transformed coordinates
[in] | rr | The coordinates. |
[in] | do_move | Perform translation next to rotation yes/no. |
Definition at line 193 of file fiff_coord_trans.cpp.
MatrixX3f FiffCoordTrans::apply_trans | ( | const Eigen::MatrixX3f & | rr, |
bool | do_move = true |
||
) | const |
TODO: dest - The id of the destination coordinate system (FIFFV_COORD_...)
Applies the coordinate transform to given coordinates and returns the transformed coordinates
[in] | rr | The coordinates. |
[in] | do_move | Perform translation next to rotation yes/no. |
Definition at line 184 of file fiff_coord_trans.cpp.
void FiffCoordTrans::clear | ( | ) |
Initializes the coordinate transformation descriptor.
Definition at line 110 of file fiff_coord_trans.cpp.
|
static |
Map coordinate frame integers to human-readable names
[in] | frame | The coordinate frame integer. |
Definition at line 202 of file fiff_coord_trans.cpp.
bool FiffCoordTrans::invert_transform | ( | ) |
Invert a coordinate transformation (actual obsolete - cause trans and inverse are both stored)
Definition at line 120 of file fiff_coord_trans.cpp.
|
inline |
Returns true if coordinate transform contains no data.
Definition at line 131 of file fiff_coord_trans.h.
|
static |
Compose the coordinate transformation structure from a known forward transform
[in] | from | Source coordinate system. |
[in] | to | Destination coordinate system. |
[in] | rot | The forward transform (rotation part). |
[in] | move | The forward transform (translation part). |
|
static |
Compose the coordinate transformation structure from a known forward transform
[in] | from | Source coordinate system. |
[in] | to | Destination coordinate system. |
[in] | matTrans | The forward transform. |
[in] | bStandard | Standard transformation (no perspective projections, last row not zero) yes/no. Defaults to false. |
void FiffCoordTrans::print | ( | ) | const |
Prints the coordinate transform. TODO: overload stream operator Refactored: mne_print_coord_transform, mne_print_coord_transform_label (fiff_id.c)
Definition at line 273 of file fiff_coord_trans.cpp.
|
static |
Reads a coordinate transform from a fif file
[in] | p_IODevice | A fiff IO device like a fiff QFile or QTCPSocket. |
[out] | p_Trans | A coordinate transform from a fif file. |
Definition at line 133 of file fiff_coord_trans.cpp.
|
inlinestatic |
Size of the old struct (fiffCoordTransRec) 26*int = 26*4 = 104
Definition at line 318 of file fiff_coord_trans.h.
FiffCoordTransOld FiffCoordTrans::toOld | ( | ) |
Transform FiffCoordTrans to FiffCoordTransOld
Definition at line 319 of file fiff_coord_trans.cpp.
float FiffCoordTrans::translationTo | ( | Eigen::MatrixX4f | mTransDest | ) |
Calculate translation between two rotation matrices in meter
[in] | mTransTarget | The destination transformation matrix. |
Definition at line 308 of file fiff_coord_trans.cpp.
void FiffCoordTrans::write | ( | QIODevice & | p_IODevice | ) |
Writes the transformation to file.
[in] | p_IODevice. |
Definition at line 165 of file fiff_coord_trans.cpp.
void FiffCoordTrans::writeToStream | ( | FiffStream * | p_pStream | ) |
Writes the transformation to stream.
[in] | p_pStream. |
Definition at line 177 of file fiff_coord_trans.cpp.
|
friend |
Overloaded == operator to compare an object to this instance.
[in] | object | The object which should be compared to. |
Definition at line 325 of file fiff_coord_trans.h.
fiff_int_t FIFFLIB::FiffCoordTrans::from |
Source coordinate system.
Definition at line 295 of file fiff_coord_trans.h.
Eigen::Matrix<float, 4,4, Eigen::DontAlign> FIFFLIB::FiffCoordTrans::invtrans |
The inverse transform.
Definition at line 298 of file fiff_coord_trans.h.
fiff_int_t FIFFLIB::FiffCoordTrans::to |
Destination coordinate system.
Definition at line 296 of file fiff_coord_trans.h.
Eigen::Matrix<float, 4,4, Eigen::DontAlign> FIFFLIB::FiffCoordTrans::trans |
The forward transform.
Definition at line 297 of file fiff_coord_trans.h.