Tomographer
v1.0a
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 | 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<int MatTypeId> for MAT_T_DOUBLE. More... | |
struct | MatType< MAT_T_INT16 > |
Specialization of MatType<int MatTypeId> for MAT_T_INT16. More... | |
struct | MatType< MAT_T_INT32 > |
Specialization of MatType<int MatTypeId> for MAT_T_INT32. More... | |
struct | MatType< MAT_T_INT64 > |
Specialization of MatType<int MatTypeId> for MAT_T_INT64. More... | |
struct | MatType< MAT_T_INT8 > |
Specialization of MatType<int MatTypeId> for MAT_T_INT8. More... | |
struct | MatType< MAT_T_SINGLE > |
Specialization of MatType<int MatTypeId> for MAT_T_DOUBLE. More... | |
struct | MatType< MAT_T_UINT16 > |
Specialization of MatType<int MatTypeId> for MAT_T_UINT16. More... | |
struct | MatType< MAT_T_UINT32 > |
Specialization of MatType<int MatTypeId> for MAT_T_UINT32. More... | |
struct | MatType< MAT_T_UINT64 > |
Specialization of MatType<int MatTypeId> for MAT_T_UINT64. More... | |
struct | MatType< MAT_T_UINT8 > |
Specialization of MatType<int MatTypeId> 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... | |
struct | VarValueDecoder |
Specializable template which takes care of decoding values. More... | |
struct | VarValueDecoder< Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > > |
Decoder for Eigen::Matrix types. More... | |
struct | VarValueDecoder< GetStdVector< T, IsRowMajor > > |
Specialization of VarValueDecoder<T> to obtain an std::vector<> with the matrix data. See GetStdVector. More... | |
struct | VarValueDecoder< std::vector< Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols >, Alloc > > |
Decoder for a std::vector of elements of type Eigen::Matrix. More... | |
struct | VarValueDecoder< T, typename std::enable_if<(std::numeric_limits< T >::is_specialized||Tools::is_complex< T >::value)>::type > |
Interface to read out a single value. More... | |
Functions | |
template<typename It , typename ValueType = typename std::iterator_traits<It>::value_type> | |
ValueType | get_numel (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<bool IsRowMajor> . | |
template<bool IsRowMajor, typename IntType > | |
std::ostream & | operator<< (std::ostream &str, const IndexListIterator< IsRowMajor, IntType > &indexlistit) |
C++ output stream operator for IndexListIterator<bool IsRowMajor, typename IntType> . | |
template<typename T > | |
VarValueDecoder< T >::RetType | value (const Var &var) |
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) |
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<T> template for your C++ type.
ValueType Tomographer::MAT::get_numel | ( | It | begin, |
It | end | ||
) |