Tomographer
v5.4
Tomographer C++ Framework Documentation
|
Utilities and helpers for reading MATLAB .mat
files.
More...
Classes | |
class | DimList |
An array of ints which specifies a list of dimensions. More... | |
class | EigenPosSemidefMatrixWithSqrt |
Read a positive semidefinite matrix along with its matrix square root. More... | |
class | Exception |
Base Exception class for errors within our MAT routines. More... | |
class | File |
A MATLAB file open for reading data. More... | |
class | FileOpenError |
Error while opening a MATLAB file. More... | |
struct | GetStdVector |
Ask for this type in Var::value<typename T>() to get an std::vector of the data. More... | |
class | IndexList |
A list of indices with an API for linear or subindices access. More... | |
class | IndexListIterator |
Utility to iterate over a multidim array by increasing linear index. More... | |
class | InvalidIndexError |
Invalid index or index list provided to a routine. More... | |
struct | MatType |
Map matio's constants to C/C++ types. More... | |
struct | MatType< MAT_T_DOUBLE > |
Specialization of MatType for MAT_T_DOUBLE. More... | |
struct | MatType< MAT_T_INT16 > |
Specialization of MatType for MAT_T_INT16. More... | |
struct | MatType< MAT_T_INT32 > |
Specialization of MatType for MAT_T_INT32. More... | |
struct | MatType< MAT_T_INT64 > |
Specialization of MatType for MAT_T_INT64. More... | |
struct | MatType< MAT_T_INT8 > |
Specialization of MatType for MAT_T_INT8. More... | |
struct | MatType< MAT_T_SINGLE > |
Specialization of MatType for MAT_T_DOUBLE. More... | |
struct | MatType< MAT_T_UINT16 > |
Specialization of MatType for MAT_T_UINT16. More... | |
struct | MatType< MAT_T_UINT32 > |
Specialization of MatType for MAT_T_UINT32. More... | |
struct | MatType< MAT_T_UINT64 > |
Specialization of MatType for MAT_T_UINT64. More... | |
struct | MatType< MAT_T_UINT8 > |
Specialization of MatType for MAT_T_UINT8. More... | |
class | Var |
A MATLAB variable in the MAT file. More... | |
class | VarError |
Exception relating to a MATLAB variable in the data file. More... | |
class | VarMatTypeError |
Unknown type of a variable present in the data file. More... | |
class | VarReadError |
Error while reading a variable from the MATLAB data file. More... | |
struct | VarShape |
Describe shape of variable and whether it is complex. More... | |
class | VarTypeError |
Type mismatch (wrong type requested) in a variable read from the MATLAB data file. More... | |
class | VarValueDecoder |
Specializable template which takes care of decoding values. More... | |
class | VarValueDecoder< Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > > |
Decoder for Eigen::Matrix types. More... | |
class | VarValueDecoder< EigenPosSemidefMatrixWithSqrt< EigenType_ > > |
Specialization of VarValueDecoder for extracting a positive semidefinite matrix along with sqrt. More... | |
class | VarValueDecoder< GetStdVector< T, IsRowMajor > > |
Specialization of VarValueDecoder to obtain an std::vector with the matrix data. See GetStdVector. More... | |
class | VarValueDecoder< std::vector< Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols >, Alloc > > |
Decoder for a std::vector of elements of type Eigen::Matrix. More... | |
class | VarValueDecoder< T, _IS_NUMERIC_TYPE > |
Interface to read out a single numeric value. More... | |
Functions | |
template<typename It , typename ValueType = typename std::iterator_traits<It>::value_type> | |
ValueType | getNumEl (It begin, It end) |
Calculate the product of all dimensions. More... | |
std::ostream & | operator<< (std::ostream &out, const DimList &dlist) |
C++ output stream operators for a DimList. | |
template<bool IsRowMajor> | |
std::ostream & | operator<< (std::ostream &str, const IndexList< IsRowMajor > &indexlist) |
C++ output stream operator for IndexList. | |
template<bool IsRowMajor, typename IntType > | |
std::ostream & | operator<< (std::ostream &str, const IndexListIterator< IsRowMajor, IntType > &indexlistit) |
C++ output stream operator for IndexListIterator. | |
template<typename T > | |
VarValueDecoder< T >::RetType | value (const Var &var) |
Access the value of the given variable, as a C++ type. More... | |
template<typename T , ENABLED_IF( tomo_internal::has_params_member< VarValueDecoder< T > >::value) > | |
VarValueDecoder< T >::RetType | value (const Var &var, const typename VarValueDecoder< T >::Params ¶ms) |
Access the value of the given variable, as a C++ type. More... | |
std::ostream & | operator<< (std::ostream &str, const VarShape &varshape) |
C++ output stream operator for VarShape . | |
Utilities and helpers for reading MATLAB .mat
files.
The class File represents an open MATLAB file from which you can extract data. Variables inside the file are represented with Var objects.
The actual data can be extracted to some native C++ representation using Var::value<T>() for some selected C++ types. Example:
You can extend this mechanism easily to essentially any C++ type. Just specialize the VarValueDecoder template for your C++ type.
|
inline |
|
inline |
Access the value of the given variable, as a C++ type.
This is an alternative syntax for var.value<T>(). See documentation for Var::value().
|
inline |
Access the value of the given variable, as a C++ type.
This is an alternative syntax for var.value<T>(). See documentation for Var::value().
This overload allows to decode the value of the variable with some parameters specifying what exactly is requested. See documentation for VarValueDecoder.