CPPxDIC
C++ Digital Image Correlation library for fingertip 3D reconstruction
Loading...
Searching...
No Matches
data_serializer.cpp
Go to the documentation of this file.
1
5#include "data_serializer.h"
6#include "mat_writer.h"
7#include "mat_reader.h"
8#include "logging.h"
9#include <filesystem>
10#include <fstream>
11#include <iostream>
12#include <stdexcept>
13#include <nlohmann/json.hpp>
14
15namespace cppxdic {
16
17// ============================================================================
18// DataSerializer base
19// ============================================================================
20
21bool DataSerializer::fileExists(const std::string& basePath) const {
22 return std::filesystem::exists(basePath + extension());
23}
24
25std::unique_ptr<DataSerializer> DataSerializer::create(const std::string& format) {
26 if (format == "mat") {
27 return std::make_unique<MatSerializer>();
28 } else if (format == "bin") {
29 return std::make_unique<BinarySerializer>();
30 } else if (format == "json") {
31 return std::make_unique<JsonSerializer>();
32 } else {
33 throw std::invalid_argument("Unknown data format: '" + format +
34 "'. Supported formats: mat, bin, json");
35 }
36}
37
38// ============================================================================
39// MatSerializer — delegates to MatWriter / MatReader
40// ============================================================================
41
42bool MatSerializer::saveDIC3Dcombined(const std::string& path, const DIC3Dcombined& data) {
43 return MatWriter::write3DCombinedResults(path, data);
44}
45
46bool MatSerializer::loadDIC3Dcombined(const std::string& path, DIC3Dcombined& data) {
47 return MatReader::readDIC3Dcombined(path, data);
48}
49
50bool MatSerializer::saveDIC3DPPresults(const std::string& path, const DIC3DPPresults& data) {
51 return MatWriter::write3DPPresults(path, data);
52}
53
54bool MatSerializer::saveDIC2DPairResults(const std::string& path, const DIC2DPairResults& data) {
55 return MatWriter::writeDIC2DPairResults(path, data);
56}
57
58bool MatSerializer::loadDIC2DPairResults(const std::string& path, DIC2DPairResults& data) {
59 return MatReader::readDIC2DPairResults(path, data);
60}
61
62// ============================================================================
63// BinarySerializer — delegates to saveBinary / loadBinary
64// ============================================================================
65
66bool BinarySerializer::saveDIC3Dcombined(const std::string& path, const DIC3Dcombined& data) {
67 try {
68 data.saveBinary(path);
69 return true;
70 } catch (const std::exception& e) {
71 LOG_ERROR << "BinarySerializer: Failed to save DIC3Dcombined: " << e.what();
72 return false;
73 }
74}
75
76bool BinarySerializer::loadDIC3Dcombined(const std::string& path, DIC3Dcombined& data) {
77 try {
78 data = DIC3Dcombined::loadBinary(path);
79 return true;
80 } catch (const std::exception& e) {
81 LOG_ERROR << "BinarySerializer: Failed to load DIC3Dcombined: " << e.what();
82 return false;
83 }
84}
85
86bool BinarySerializer::saveDIC3DPPresults(const std::string& path, const DIC3DPPresults& data) {
87 try {
88 data.saveBinary(path);
89 return true;
90 } catch (const std::exception& e) {
91 LOG_ERROR << "BinarySerializer: Failed to save DIC3DPPresults: " << e.what();
92 return false;
93 }
94}
95
96bool BinarySerializer::saveDIC2DPairResults(const std::string& path, const DIC2DPairResults& data) {
97 // Binary format for DIC2DPairResults - write key fields
98 try {
99 std::ofstream ofs(path, std::ios::binary);
100 if (!ofs.is_open()) return false;
101
102 // Magic + version
103 uint32_t magic = 0x44324450; // "D2DP"
104 uint32_t version = 2;
105 ofs.write(reinterpret_cast<const char*>(&magic), sizeof(magic));
106 ofs.write(reinterpret_cast<const char*>(&version), sizeof(version));
107
108 // Core fields
109 ofs.write(reinterpret_cast<const char*>(&data.nCamRef), sizeof(data.nCamRef));
110 ofs.write(reinterpret_cast<const char*>(&data.nCamDef), sizeof(data.nCamDef));
111 ofs.write(reinterpret_cast<const char*>(&data.nImages), sizeof(data.nImages));
112 size_t npo = data.pairOrder.size();
113 ofs.write(reinterpret_cast<const char*>(&npo), sizeof(npo));
114 if (npo > 0) {
115 ofs.write(reinterpret_cast<const char*>(data.pairOrder.data()),
116 static_cast<std::streamsize>(npo * sizeof(int)));
117 }
118 uint8_t pair_forced = data.pairForced ? 1 : 0;
119 ofs.write(reinterpret_cast<const char*>(&pair_forced), sizeof(pair_forced));
120
121 // Faces
122 size_t nf = data.Faces.size();
123 ofs.write(reinterpret_cast<const char*>(&nf), sizeof(nf));
124 if (nf > 0) ofs.write(reinterpret_cast<const char*>(data.Faces.data()),
125 static_cast<std::streamsize>(nf * sizeof(int)));
126
127 // FaceColors
128 size_t nc = data.FaceColors.size();
129 ofs.write(reinterpret_cast<const char*>(&nc), sizeof(nc));
130 if (nc > 0) ofs.write(reinterpret_cast<const char*>(data.FaceColors.data()),
131 static_cast<std::streamsize>(nc * sizeof(double)));
132
133 // Points (per frame)
134 size_t np = data.Points.size();
135 ofs.write(reinterpret_cast<const char*>(&np), sizeof(np));
136 for (const auto& pts : data.Points) {
137 size_t sz = pts.x.size();
138 ofs.write(reinterpret_cast<const char*>(&sz), sizeof(sz));
139 if (sz > 0) {
140 ofs.write(reinterpret_cast<const char*>(pts.x.data()), static_cast<std::streamsize>(sz * sizeof(double)));
141 ofs.write(reinterpret_cast<const char*>(pts.y.data()), static_cast<std::streamsize>(sz * sizeof(double)));
142 }
143 }
144
145 // CorCoeffVec (per frame)
146 size_t ncc = data.CorCoeffVec.size();
147 ofs.write(reinterpret_cast<const char*>(&ncc), sizeof(ncc));
148 for (const auto& cc : data.CorCoeffVec) {
149 size_t sz = cc.size();
150 ofs.write(reinterpret_cast<const char*>(&sz), sizeof(sz));
151 if (sz > 0) ofs.write(reinterpret_cast<const char*>(cc.data()), static_cast<std::streamsize>(sz * sizeof(double)));
152 }
153
154 return ofs.good();
155 } catch (const std::exception& e) {
156 LOG_ERROR << "BinarySerializer: Failed to save DIC2DPairResults: " << e.what();
157 return false;
158 }
159}
160
161bool BinarySerializer::loadDIC2DPairResults(const std::string& path, DIC2DPairResults& data) {
162 try {
163 std::ifstream ifs(path, std::ios::binary);
164 if (!ifs.is_open()) return false;
165
166 uint32_t magic, version;
167 ifs.read(reinterpret_cast<char*>(&magic), sizeof(magic));
168 ifs.read(reinterpret_cast<char*>(&version), sizeof(version));
169 if (magic != 0x44324450 || (version != 1 && version != 2)) return false;
170
171 ifs.read(reinterpret_cast<char*>(&data.nCamRef), sizeof(data.nCamRef));
172 ifs.read(reinterpret_cast<char*>(&data.nCamDef), sizeof(data.nCamDef));
173 ifs.read(reinterpret_cast<char*>(&data.nImages), sizeof(data.nImages));
174 data.pairOrder.clear();
175 data.pairForced = false;
176 if (version >= 2) {
177 size_t npo = 0;
178 ifs.read(reinterpret_cast<char*>(&npo), sizeof(npo));
179 data.pairOrder.resize(npo);
180 if (npo > 0) {
181 ifs.read(reinterpret_cast<char*>(data.pairOrder.data()),
182 static_cast<std::streamsize>(npo * sizeof(int)));
183 }
184 uint8_t pair_forced = 0;
185 ifs.read(reinterpret_cast<char*>(&pair_forced), sizeof(pair_forced));
186 data.pairForced = (pair_forced != 0);
187 }
188
189 size_t nf;
190 ifs.read(reinterpret_cast<char*>(&nf), sizeof(nf));
191 data.Faces.resize(nf);
192 if (nf > 0) ifs.read(reinterpret_cast<char*>(data.Faces.data()), static_cast<std::streamsize>(nf * sizeof(int)));
193
194 size_t nc;
195 ifs.read(reinterpret_cast<char*>(&nc), sizeof(nc));
196 data.FaceColors.resize(nc);
197 if (nc > 0) ifs.read(reinterpret_cast<char*>(data.FaceColors.data()), static_cast<std::streamsize>(nc * sizeof(double)));
198
199 size_t np;
200 ifs.read(reinterpret_cast<char*>(&np), sizeof(np));
201 data.Points.resize(np);
202 for (auto& pts : data.Points) {
203 size_t sz;
204 ifs.read(reinterpret_cast<char*>(&sz), sizeof(sz));
205 pts.x.resize(sz);
206 pts.y.resize(sz);
207 if (sz > 0) {
208 ifs.read(reinterpret_cast<char*>(pts.x.data()), static_cast<std::streamsize>(sz * sizeof(double)));
209 ifs.read(reinterpret_cast<char*>(pts.y.data()), static_cast<std::streamsize>(sz * sizeof(double)));
210 }
211 }
212
213 size_t ncc;
214 ifs.read(reinterpret_cast<char*>(&ncc), sizeof(ncc));
215 data.CorCoeffVec.resize(ncc);
216 for (auto& cc : data.CorCoeffVec) {
217 size_t sz;
218 ifs.read(reinterpret_cast<char*>(&sz), sizeof(sz));
219 cc.resize(sz);
220 if (sz > 0) ifs.read(reinterpret_cast<char*>(cc.data()), static_cast<std::streamsize>(sz * sizeof(double)));
221 }
222
223 return ifs.good();
224 } catch (const std::exception& e) {
225 LOG_ERROR << "BinarySerializer: Failed to load DIC2DPairResults: " << e.what();
226 return false;
227 }
228}
229
230// ============================================================================
231// JsonSerializer — uses nlohmann/json following MATLAB structure
232// ============================================================================
233
234// Helper: serialize Points3D to JSON array
235static nlohmann::json points3dToJson(const Point3DFrame& pts) {
236 nlohmann::json j;
237 j["x"] = pts.x;
238 j["y"] = pts.y;
239 j["z"] = pts.z;
240 return j;
241}
242
243// Helper: deserialize Points3D from JSON
244static Point3DFrame points3dFromJson(const nlohmann::json& j) {
245 Point3DFrame pts;
246 pts.x = j["x"].get<std::vector<double>>();
247 pts.y = j["y"].get<std::vector<double>>();
248 pts.z = j["z"].get<std::vector<double>>();
249 return pts;
250}
251
252bool JsonSerializer::saveDIC3Dcombined(const std::string& path, const DIC3Dcombined& data) {
253 try {
254 nlohmann::json j;
255 j["format"] = "DIC3Dcombined";
256 j["version"] = 1;
257
258 j["pairIndices"] = data.pairIndices;
259 j["Faces"] = data.Faces;
260 j["FaceColors"] = data.FaceColors;
261 j["FacePairInds"] = data.FacePairInds;
262 j["PointPairInds"] = data.PointPairInds;
263
264 // Points3D per frame
265 nlohmann::json pts_array = nlohmann::json::array();
266 for (const auto& pts : data.Points3D) {
267 pts_array.push_back(points3dToJson(pts));
268 }
269 j["Points3D"] = pts_array;
270
271 // Correlation
272 j["corrComb"] = data.corrComb;
273 j["FaceCorrComb"] = data.FaceCorrComb;
274 j["FaceCentroids"] = data.FaceCentroids;
275
276 // Displacement
277 j["Disp"]["DispVec"] = data.Disp.DispVec;
278 j["Disp"]["DispMgn"] = data.Disp.DispMgn;
279
280 // Calibration
281 j["calibration"]["DLT_paths"] = data.calibration.DLT_paths;
282 j["calibration"]["DLT_params"] = data.calibration.DLT_params;
283
284 // Distortion
285 j["distortion"]["distortion_models"] = data.distortion.distortion_models;
286 j["distortion"]["distortion_paths"] = data.distortion.distortion_paths;
287
288 std::ofstream ofs(path);
289 if (!ofs.is_open()) return false;
290 ofs << j.dump(2) << std::endl;
291 return ofs.good();
292 } catch (const std::exception& e) {
293 LOG_ERROR << "JsonSerializer: Failed to save DIC3Dcombined: " << e.what();
294 return false;
295 }
296}
297
298bool JsonSerializer::loadDIC3Dcombined(const std::string& path, DIC3Dcombined& data) {
299 try {
300 std::ifstream ifs(path);
301 if (!ifs.is_open()) return false;
302
303 nlohmann::json j = nlohmann::json::parse(ifs);
304
305 data.pairIndices = j.value("pairIndices", std::vector<int>{});
306 data.Faces = j.value("Faces", std::vector<int>{});
307 data.FaceColors = j.value("FaceColors", std::vector<double>{});
308 data.FacePairInds = j.value("FacePairInds", std::vector<int>{});
309 data.PointPairInds = j.value("PointPairInds", std::vector<int>{});
310
311 // Points3D
312 data.Points3D.clear();
313 if (j.contains("Points3D")) {
314 for (const auto& pt_j : j["Points3D"]) {
315 data.Points3D.push_back(points3dFromJson(pt_j));
316 }
317 }
318
319 // Correlation
320 data.corrComb = j.value("corrComb", std::vector<std::vector<double>>{});
321 data.FaceCorrComb = j.value("FaceCorrComb", std::vector<std::vector<double>>{});
322 data.FaceCentroids = j.value("FaceCentroids", std::vector<std::vector<double>>{});
323
324 // Displacement
325 if (j.contains("Disp")) {
326 data.Disp.DispVec = j["Disp"].value("DispVec", std::vector<std::vector<double>>{});
327 data.Disp.DispMgn = j["Disp"].value("DispMgn", std::vector<std::vector<double>>{});
328 }
329
330 // Calibration
331 if (j.contains("calibration")) {
332 data.calibration.DLT_paths = j["calibration"].value("DLT_paths", std::vector<std::vector<std::string>>{});
333 data.calibration.DLT_params = j["calibration"].value("DLT_params", std::vector<std::vector<std::vector<double>>>{});
334 }
335
336 // Distortion
337 if (j.contains("distortion")) {
338 data.distortion.distortion_models = j["distortion"].value("distortion_models", std::vector<std::vector<std::string>>{});
339 data.distortion.distortion_paths = j["distortion"].value("distortion_paths", std::vector<std::vector<std::string>>{});
340 }
341
342 return true;
343 } catch (const std::exception& e) {
344 LOG_ERROR << "JsonSerializer: Failed to load DIC3Dcombined: " << e.what();
345 return false;
346 }
347}
348
349// Helper: serialize DeformGradient to JSON
350static nlohmann::json deformGradientToJson(const DeformGradient& F) {
351 nlohmann::json j;
352 j["F11"] = F.F11; j["F12"] = F.F12; j["F13"] = F.F13;
353 j["F21"] = F.F21; j["F22"] = F.F22; j["F23"] = F.F23;
354 j["F31"] = F.F31; j["F32"] = F.F32; j["F33"] = F.F33;
355 return j;
356}
357
358// Helper: serialize StrainTensor to JSON
359static nlohmann::json strainTensorToJson(const StrainTensor& E) {
360 nlohmann::json j;
361 j["E11"] = E.E11; j["E12"] = E.E12; j["E13"] = E.E13;
362 j["E21"] = E.E21; j["E22"] = E.E22; j["E23"] = E.E23;
363 j["E31"] = E.E31; j["E32"] = E.E32; j["E33"] = E.E33;
364 return j;
365}
366
367// Helper: serialize DeformData to JSON
368static nlohmann::json deformDataToJson(const DeformData& deform) {
369 nlohmann::json j;
370 nlohmann::json f_arr = nlohmann::json::array();
371 for (const auto& f : deform.F) f_arr.push_back(deformGradientToJson(f));
372 j["F"] = f_arr;
373
374 nlohmann::json s_arr = nlohmann::json::array();
375 for (const auto& s : deform.strain) s_arr.push_back(strainTensorToJson(s));
376 j["strain"] = s_arr;
377
378 j["princStrain"] = deform.princStrain;
379 j["maxShearStrain"] = deform.maxShearStrain;
380 return j;
381}
382
383bool JsonSerializer::saveDIC3DPPresults(const std::string& path, const DIC3DPPresults& data) {
384 try {
385 nlohmann::json j;
386 j["format"] = "DIC3DPPresults";
387 j["version"] = 1;
388 j["deftype"] = data.deftype;
389 j["n_frames"] = data.n_frames;
390
391 // Inherited DIC3Dcombined fields
392 j["pairIndices"] = data.pairIndices;
393 j["Faces"] = data.Faces;
394 j["FaceColors"] = data.FaceColors;
395 j["FacePairInds"] = data.FacePairInds;
396 j["PointPairInds"] = data.PointPairInds;
397
398 nlohmann::json pts_array = nlohmann::json::array();
399 for (const auto& pts : data.Points3D) {
400 pts_array.push_back(points3dToJson(pts));
401 }
402 j["Points3D"] = pts_array;
403
404 j["corrComb"] = data.corrComb;
405 j["FaceCorrComb"] = data.FaceCorrComb;
406 j["FaceCentroids"] = data.FaceCentroids;
407 j["FaceIsoInd"] = data.FaceIsoInd;
408
409 j["Disp"]["DispVec"] = data.Disp.DispVec;
410 j["Disp"]["DispMgn"] = data.Disp.DispMgn;
411
412 // Deformation data
413 j["Deform"] = deformDataToJson(data.Deform);
414 j["Deform_ARBM"] = deformDataToJson(data.Deform_ARBM);
415
416 // RBM
417 j["RBM"]["RotMat"] = data.RBM.RotMat;
418 j["RBM"]["TransVec"] = data.RBM.TransVec;
419
420 // Points3D ARBM
421 j["Points3D_ARBM_x"] = data.Points3D_ARBM_x;
422 j["Points3D_ARBM_y"] = data.Points3D_ARBM_y;
423 j["Points3D_ARBM_z"] = data.Points3D_ARBM_z;
424
425 // Calibration & distortion
426 j["calibration"]["DLT_paths"] = data.calibration.DLT_paths;
427 j["calibration"]["DLT_params"] = data.calibration.DLT_params;
428 j["distortion"]["distortion_models"] = data.distortion.distortion_models;
429 j["distortion"]["distortion_paths"] = data.distortion.distortion_paths;
430
431 std::ofstream ofs(path);
432 if (!ofs.is_open()) return false;
433 ofs << j.dump(2) << std::endl;
434 return ofs.good();
435 } catch (const std::exception& e) {
436 LOG_ERROR << "JsonSerializer: Failed to save DIC3DPPresults: " << e.what();
437 return false;
438 }
439}
440
441bool JsonSerializer::saveDIC2DPairResults(const std::string& path, const DIC2DPairResults& data) {
442 try {
443 nlohmann::json j;
444 j["format"] = "DIC2DPairResults";
445 j["version"] = 2;
446 j["nCamRef"] = data.nCamRef;
447 j["nCamDef"] = data.nCamDef;
448 j["nImages"] = data.nImages;
449 j["pairOrder"] = data.pairOrder;
450 j["pairForced"] = data.pairForced;
451 j["Faces"] = data.Faces;
452 j["FaceColors"] = data.FaceColors;
453
454 nlohmann::json pts_array = nlohmann::json::array();
455 for (const auto& pts : data.Points) {
456 nlohmann::json pj;
457 pj["x"] = pts.x;
458 pj["y"] = pts.y;
459 pts_array.push_back(pj);
460 }
461 j["Points"] = pts_array;
462
463 j["CorCoeffVec"] = data.CorCoeffVec;
464
465 std::ofstream ofs(path);
466 if (!ofs.is_open()) return false;
467 ofs << j.dump(2) << std::endl;
468 return ofs.good();
469 } catch (const std::exception& e) {
470 LOG_ERROR << "JsonSerializer: Failed to save DIC2DPairResults: " << e.what();
471 return false;
472 }
473}
474
475bool JsonSerializer::loadDIC2DPairResults(const std::string& path, DIC2DPairResults& data) {
476 try {
477 std::ifstream ifs(path);
478 if (!ifs.is_open()) return false;
479
480 nlohmann::json j = nlohmann::json::parse(ifs);
481
482 data.nCamRef = j.value("nCamRef", 0);
483 data.nCamDef = j.value("nCamDef", 0);
484 data.nImages = j.value("nImages", 0);
485 data.pairOrder = j.value("pairOrder", std::vector<int>{});
486 data.pairForced = j.value("pairForced", false);
487 data.Faces = j.value("Faces", std::vector<int>{});
488 data.FaceColors = j.value("FaceColors", std::vector<double>{});
489
490 data.Points.clear();
491 if (j.contains("Points")) {
492 for (const auto& pj : j["Points"]) {
493 Points2D pts;
494 pts.x = pj.value("x", std::vector<double>{});
495 pts.y = pj.value("y", std::vector<double>{});
496 data.Points.push_back(pts);
497 }
498 }
499
500 data.CorCoeffVec = j.value("CorCoeffVec", std::vector<std::vector<double>>{});
501
502 return true;
503 } catch (const std::exception& e) {
504 LOG_ERROR << "JsonSerializer: Failed to load DIC2DPairResults: " << e.what();
505 return false;
506 }
507}
508
509} // namespace cppxdic
bool saveDIC2DPairResults(const std::string &path, const DIC2DPairResults &data) override
bool loadDIC3Dcombined(const std::string &path, DIC3Dcombined &data) override
bool saveDIC3Dcombined(const std::string &path, const DIC3Dcombined &data) override
bool saveDIC3DPPresults(const std::string &path, const DIC3DPPresults &data) override
bool loadDIC2DPairResults(const std::string &path, DIC2DPairResults &data) override
static std::unique_ptr< DataSerializer > create(const std::string &format)
Create a serializer for the given format string.
virtual std::string extension() const =0
File extension for this format (e.g., ".mat", ".bin", ".json")
bool fileExists(const std::string &basePath) const
bool loadDIC2DPairResults(const std::string &path, DIC2DPairResults &data) override
bool saveDIC2DPairResults(const std::string &path, const DIC2DPairResults &data) override
bool loadDIC3Dcombined(const std::string &path, DIC3Dcombined &data) override
bool saveDIC3DPPresults(const std::string &path, const DIC3DPPresults &data) override
bool saveDIC3Dcombined(const std::string &path, const DIC3Dcombined &data) override
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 bool readDIC3Dcombined(const std::string &mat_path, struct DIC3Dcombined &combined)
Read DIC3Dcombined structure from MAT file.
bool loadDIC3Dcombined(const std::string &path, DIC3Dcombined &data) override
bool saveDIC2DPairResults(const std::string &path, const DIC2DPairResults &data) override
bool loadDIC2DPairResults(const std::string &path, DIC2DPairResults &data) override
bool saveDIC3Dcombined(const std::string &path, const DIC3Dcombined &data) override
bool saveDIC3DPPresults(const std::string &path, const DIC3DPPresults &data) override
static bool writeDIC2DPairResults(const std::string &filename, const DIC2DPairResults &results)
Write myDIC2DpairResults_C_X_C_Y.mat file Contains processed 2D DIC results with triangulation.
static bool write3DCombinedResults(const std::string &filename, const DIC3Dcombined &combined, const std::string &struct_name="DIC3Dcombined")
Write DIC3Dcombined_XPairs_stitched.mat file Contains 3D reconstruction results.
static bool write3DPPresults(const std::string &filename, const DIC3DPPresults &ppresults)
Write DIC3DPPresults_XPairs_Y_v1.mat file Contains deformation and strain analysis results.
Lightweight, dependency-free logging facility for CPPxDIC.
#define LOG_ERROR
Definition logging.h:172
DataSerializer - Abstract base class for format-agnostic DIC data I/O.
static nlohmann::json points3dToJson(const Point3DFrame &pts)
static nlohmann::json deformDataToJson(const DeformData &deform)
static Point3DFrame points3dFromJson(const nlohmann::json &j)
static nlohmann::json strainTensorToJson(const StrainTensor &E)
static nlohmann::json deformGradientToJson(const DeformGradient &F)
std::vector< std::vector< std::string > > DLT_paths
std::vector< std::vector< std::vector< double > > > DLT_params
DIC 2D Pair Results Equivalent to MATLAB's DIC2DpairResults.
std::vector< int > pairOrder
std::vector< Points2D > Points
std::vector< std::vector< double > > CorCoeffVec
std::vector< double > FaceColors
std::vector< int > Faces
DIC 3D Post-Processing Results Equivalent to MATLAB's DIC3DPPresults.
std::vector< std::vector< double > > FaceIsoInd
std::vector< std::vector< double > > Points3D_ARBM_y
std::vector< std::vector< double > > Points3D_ARBM_x
std::vector< std::vector< double > > Points3D_ARBM_z
DIC 3D Combined Results Equivalent to MATLAB's DIC3Dcombined This represents stitched results from mu...
std::vector< int > FacePairInds
DistortionData distortion
std::vector< int > PointPairInds
std::vector< Point3DFrame > Points3D
std::vector< int > pairIndices
std::vector< double > FaceColors
std::vector< std::vector< double > > FaceCorrComb
static DIC3Dcombined loadBinary(const std::string &filepath)
std::vector< std::vector< double > > corrComb
void saveBinary(const std::string &filepath) const
CalibrationData calibration
std::vector< int > Faces
std::vector< std::vector< double > > FaceCentroids
Deformation data.
std::vector< DeformGradient > F
std::vector< StrainTensor > strain
std::vector< std::vector< double > > princStrain
std::vector< std::vector< double > > maxShearStrain
Deformation gradient tensor.
std::vector< double > F13
std::vector< double > F23
std::vector< double > F12
std::vector< double > F22
std::vector< double > F21
std::vector< double > F32
std::vector< double > F31
std::vector< double > F33
std::vector< double > F11
std::vector< std::vector< double > > DispVec
std::vector< std::vector< double > > DispMgn
std::vector< std::vector< std::string > > distortion_models
std::vector< std::vector< std::string > > distortion_paths
3D Points per frame
std::vector< double > z
std::vector< double > x
std::vector< double > y
2D Points per frame
std::vector< double > x
std::vector< double > y
std::vector< std::vector< double > > TransVec
std::vector< std::vector< double > > RotMat
std::vector< double > E11
std::vector< double > E12
std::vector< double > E13
std::vector< double > E21
std::vector< double > E31
std::vector< double > E32
std::vector< double > E23
std::vector< double > E22
std::vector< double > E33