|
CPPxDIC
C++ Digital Image Correlation library for fingertip 3D reconstruction
|
MatReader class Provides utilities for reading MAT files. More...
#include <mat_reader.h>
Classes | |
| struct | MatFileDeleter |
| struct | MatVarDeleter |
Public Types | |
| using | MatFilePtr = std::unique_ptr< mat_t, MatFileDeleter > |
| using | MatVarPtr = std::unique_ptr< matvar_t, MatVarDeleter > |
Static Public Member Functions | |
| static MatFilePtr | openMat (const std::string &path) |
| static MatVarPtr | readVar (mat_t *matfp, const std::string &name) |
| static MatVarPtr | readFirstVar (mat_t *matfp) |
| static bool | loadDLTCalibration (const std::string &mat_path, DLTCalibrationData &calib) |
| static bool | loadProtocol (const std::string &protocol_path, ProtocolFileData &protocol) |
| static std::vector< std::string > | readCellStrings (matvar_t *cell_var) |
| static matvar_t * | readStructField (mat_t *matfp, const std::string &struct_name, const std::string &field_name) |
| Read a specific field from a struct variable. | |
| static matvar_t * | readNestedField (mat_t *matfp, const std::string &path) |
| Read a nested struct field (e.g., "data_dic_save.dispinfo.radius") | |
| static std::vector< double > | readDoubleArray (matvar_t *var) |
| Read double array from matvar. | |
| static std::vector< double > | readDouble2DArray (matvar_t *var, size_t &rows, size_t &cols) |
| Read 2D double array from matvar. | |
| static cv::Mat | readImage (matvar_t *var) |
| Read image from matvar. | |
| static double | readScalar (matvar_t *var) |
| Read scalar from matvar. | |
| static std::string | readString (matvar_t *var) |
| Read string from matvar. | |
| static size_t | getCellArraySize (matvar_t *var) |
| Get cell array size. | |
| static matvar_t * | getCellElement (matvar_t *var, size_t index) |
| Get cell from cell array. | |
| static std::map< std::string, double > | readDispInfo (mat_t *matfp) |
| Read dispinfo parameters from MAT file. | |
| static bool | variableExists (mat_t *matfp, const std::string &var_name) |
| Check if variable exists in MAT file. | |
| static cv::Mat | readROIMask (const std::string &mat_path, const std::string &var_name="refmask") |
| Read ROI mask from MAT file. | |
| static bool | readDIC3Dcombined (const std::string &mat_path, struct DIC3Dcombined &combined) |
| Read DIC3Dcombined structure from MAT file. | |
| static bool | readDIC2DPairResults (const std::string &mat_path, struct DIC2DPairResults &result) |
| Read DIC2DPairResults structure from MAT file Loads myDIC2DpairResults_C_X_C_Y.mat files. | |
| static std::vector< int > | readIntArray (matvar_t *var) |
| Read int array from matvar. | |
MatReader class Provides utilities for reading MAT files.
Definition at line 52 of file mat_reader.h.
| using cppxdic::MatReader::MatFilePtr = std::unique_ptr<mat_t, MatFileDeleter> |
Definition at line 62 of file mat_reader.h.
| using cppxdic::MatReader::MatVarPtr = std::unique_ptr<matvar_t, MatVarDeleter> |
Definition at line 63 of file mat_reader.h.
|
static |
Get cell array size.
| var | MAT variable |
Definition at line 492 of file mat_reader.cpp.
|
static |
Get cell from cell array.
| var | MAT variable |
| index | Index of cell to get |
Definition at line 500 of file mat_reader.cpp.
|
static |
Definition at line 105 of file mat_reader.cpp.
|
static |
Definition at line 198 of file mat_reader.cpp.
|
static |
Definition at line 22 of file mat_reader.cpp.
|
static |
Definition at line 299 of file mat_reader.cpp.
|
static |
Read DIC2DPairResults structure from MAT file Loads myDIC2DpairResults_C_X_C_Y.mat files.
| mat_path | Path to MAT file containing DIC2DpairResults |
| result | Output: DIC2DPairResults structure |
Definition at line 1071 of file mat_reader.cpp.
|
static |
Read DIC3Dcombined structure from MAT file.
| mat_path | Path to MAT file |
| combined | Output structure |
Definition at line 557 of file mat_reader.cpp.
|
static |
Read dispinfo parameters from MAT file.
| matfp | MAT file pointer |
Definition at line 513 of file mat_reader.cpp.
|
static |
Read 2D double array from matvar.
| var | MAT variable |
| rows | Output: number of rows |
| cols | Output: number of columns |
Definition at line 385 of file mat_reader.cpp.
|
static |
Read double array from matvar.
| var | MAT variable |
Definition at line 368 of file mat_reader.cpp.
|
static |
Definition at line 31 of file mat_reader.cpp.
|
static |
Read image from matvar.
| var | MAT variable |
Definition at line 413 of file mat_reader.cpp.
|
static |
Read int array from matvar.
| var | MAT variable |
Definition at line 889 of file mat_reader.cpp.
|
static |
Read a nested struct field (e.g., "data_dic_save.dispinfo.radius")
| matfp | MAT file pointer |
| path | Dot-separated path to field |
Definition at line 338 of file mat_reader.cpp.
|
static |
Read ROI mask from MAT file.
| mat_path | Path to MAT file |
| var_name | Variable name (default: "refmask") |
Definition at line 541 of file mat_reader.cpp.
|
static |
Read scalar from matvar.
| var | MAT variable |
Definition at line 453 of file mat_reader.cpp.
|
static |
Read string from matvar.
| var | MAT variable |
Definition at line 470 of file mat_reader.cpp.
|
static |
Read a specific field from a struct variable.
| matfp | MAT file pointer |
| struct_name | Name of the struct variable |
| field_name | Name of the field to read |
Definition at line 323 of file mat_reader.cpp.
|
static |
Definition at line 26 of file mat_reader.cpp.
|
static |
Check if variable exists in MAT file.
| matfp | MAT file pointer |
| var_name | Variable name |
Definition at line 535 of file mat_reader.cpp.