CPPxDIC
C++ Digital Image Correlation library for fingertip 3D reconstruction
Loading...
Searching...
No Matches
DicAnalysis Class Reference

DIC Analysis class for CPPXDIC Main analysis functionality equivalent to Matlab dic_analysis.m. More...

#include <dic_analysis.h>

Public Member Functions

 DicAnalysis (const Config &config)
 
bool run ()
 Run complete DIC analysis pipeline Executes preprocessing, Step D, Step E, and Step F in sequence.
 
bool run (const std::vector< int > &trial_target)
 Run the complete DIC analysis pipeline for an explicit list of trials.
 
bool run (const std::vector< int > &trial_target, const StagePlan &plan)
 Run a selected subset of pipeline stages for an explicit list of trials.
 
bool runStepE (const std::vector< int > &trial_target)
 Run 3D Reconstruction (Step E) only — for integration testing Requires Step D outputs (.cache/*.bin) and calibration files to exist.
 
bool runStepF (const std::vector< int > &trial_target)
 Run Deformation Analysis (Step F) only — for integration testing Requires DIC3Dcombined_*.bin from Step E to exist.
 
std::vector< int > searchTrialTarget (const std::string &subject)
 Search the protocol .mat for the list of trial IDs of a given subject.
 

Detailed Description

DIC Analysis class for CPPXDIC Main analysis functionality equivalent to Matlab dic_analysis.m.

This class orchestrates the three main DIC analysis steps:

  • Step D: 2D DIC Analysis (DIC2DWorkflow)
  • Step E: 3D Reconstruction (Reconstruction3DWorkflow)
  • Step F: Deformation Analysis (DeformationWorkflow)

Each step is implemented as a separate workflow class with clear inputs, outputs, and testable milestone functions.

Definition at line 23 of file dic_analysis.h.

Constructor & Destructor Documentation

◆ DicAnalysis()

DicAnalysis::DicAnalysis ( const Config &  config)
explicit

Definition at line 34 of file dic_analysis.cpp.

Member Function Documentation

◆ run() [1/3]

bool DicAnalysis::run ( )

Run complete DIC analysis pipeline Executes preprocessing, Step D, Step E, and Step F in sequence.

Returns
true if all steps complete successfully

Definition at line 1332 of file dic_analysis.cpp.

◆ run() [2/3]

bool DicAnalysis::run ( const std::vector< int > &  trial_target)

Run the complete DIC analysis pipeline for an explicit list of trials.

Identical to run() but uses the provided trial list instead of the hard-coded/searched default. Enables trial-level experiment drivers (single trial, SLURM arrays) to parameterise a run without touching the default behaviour of run().

Parameters
trial_targetNon-empty list of 1-based trial IDs to process.
Returns
true if all steps complete successfully

Definition at line 1339 of file dic_analysis.cpp.

◆ run() [3/3]

bool DicAnalysis::run ( const std::vector< int > &  trial_target,
const StagePlan &  plan 
)

Run a selected subset of pipeline stages for an explicit list of trials.

Identical to run(trial_target) but only the sub-steps enabled in plan are executed; the rest are expected to be satisfied by existing on-disk checkpoints. This is what lets the pipeline be split across independent processes / SLURM array tasks (matching, tracking, E+F).

Parameters
trial_targetNon-empty list of 1-based trial IDs to process.
planWhich sub-steps to run (+ optional pair/camera narrowing).
Returns
true if all requested steps complete successfully

Definition at line 1344 of file dic_analysis.cpp.

◆ runStepE()

bool DicAnalysis::runStepE ( const std::vector< int > &  trial_target)
inline

Run 3D Reconstruction (Step E) only — for integration testing Requires Step D outputs (.cache/*.bin) and calibration files to exist.

Definition at line 66 of file dic_analysis.h.

◆ runStepF()

bool DicAnalysis::runStepF ( const std::vector< int > &  trial_target)
inline

Run Deformation Analysis (Step F) only — for integration testing Requires DIC3Dcombined_*.bin from Step E to exist.

Definition at line 72 of file dic_analysis.h.

◆ searchTrialTarget()

std::vector< int > DicAnalysis::searchTrialTarget ( const std::string &  subject)

Search the protocol .mat for the list of trial IDs of a given subject.

This is the per-subject lookup used by run(). It is exposed publicly so tooling (e.g. the gen_subject_trial generator) can enumerate the trials of arbitrary subjects without constructing a full pipeline run.

The lookup reuses the calling instance's Config for everything except the subject identity: a copy of config_ is taken, its subject is overridden to subject, derived variables are refreshed, and the protocol .mat for that subject is parsed. config_ itself is left untouched.

Parameters
subjectSubject identifier (e.g. "S09").
Returns
The list of 1-based trial indices for that subject. On failure the function falls back to {ref_trial_id, ref_trial_id + 1}.

Definition at line 1487 of file dic_analysis.cpp.


The documentation for this class was generated from the following files: