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

Wraps a CPPxDIC Config and adds a single-camera sub-path scheme. More...

#include <singledic_config.h>

Public Member Functions

 SinglediConfig ()=default
 
 SinglediConfig (const Config &cfg)
 
std::string vid_root () const
 Root directory that holds per-subject video folders (default "<data>/vid").
 
std::string inputTrialDir () const
 Directory for the current trial's input (subject/bloc/trial).
 
std::string inputRefTrialDir () const
 Directory for the reference trial's input (subject/bloc/reftrial).
 
std::string outputTrialDir () const
 Output directory for the current trial (subject/bloc/trial under dic_path).
 
std::string outputBlocDir () const
 Output directory shared per (subject, bloc) — holds ROI/seed reference files.
 
std::string roiFile () const
 ROI mask file, shared per bloc and keyed by reference trial.
 
std::string seedFile () const
 Seed file, shared per bloc, keyed by reference trial and direction.
 
std::string matchingFile (const std::string &ext=".bin") const
 Matching-to-reference cache file. Mirrors Vik: MATCHING2<reftrial>.mat/.bin.
 
std::string ncorrStem () const
 ncorr tracking output stem (no extension). Mirrors Vik: ncorr<ncorr_number>
 
cppxdic::BaseParameters toBaseParameters () const
 Build a BaseParameters view so existing CPPxDIC helpers (ROIManager, ImageProcessor, MatWriter) can be reused unchanged.
 

Public Attributes

Config base
 Underlying engine configuration (owns all DIC/ncorr/viz parameters).
 
std::string subject = "S01"
 Subject folder name (e.g. "S01").
 
std::string bloc = "bloc1"
 Bloc / block folder name.
 
std::string trial = "001"
 Current trial name (video stem).
 
std::string reftrial = "001"
 Reference trial name (shared per bloc).
 
int idx_frame_start = 1
 First frame to analyse (1-based, MATLAB-style).
 
int idx_frame_end = 0
 Last frame (0 = "to end of sequence").
 
int frame_jump = 1
 Frame stride.
 
std::string tracking_dir = "forward"
 Tracking direction: "forward" or "backward" (backward flips the sequence).
 
int ncorr_number = 1
 ncorr_number tag (1/2) used to name outputs, mirroring forward/backward passes.
 
int limit_grayscale_low = 40
 Lower saturation clamp (satur low).
 
int limit_grayscale_high = 140
 Upper saturation clamp (satur high).
 
bool filter_im_mode = false
 Apply bandpass+normalise filtering before DIC.
 
int param_filt_low = 50
 Bandpass low cutoff.
 
int param_filt_high = 200
 Bandpass high cutoff.
 
bool do_matching = false
 If true, run a matching-to-reference-trial pass before tracking (Vik ncorr_matching2ref_single.m); maps the ROI/seed of the reference trial onto the current trial.
 
bool write_mat = true
 Whether to write a MATLAB-compatible .mat sidecar next to outputs.
 
bool write_csv = true
 Whether to write a CSV of the tracked feature trajectories.
 

Detailed Description

Wraps a CPPxDIC Config and adds a single-camera sub-path scheme.

Construction copies the supplied Config (so all engine tunables — step_d radius/spacing/cutoffs, ncorr params, units_per_pixel, etc. — are inherited) and overlays single-camera-specific naming. Inputs and outputs are addressed by (subject, bloc, trial); a single reference trial is shared across trials of the same (subject, bloc), exactly like Vik's process_single_trial_ncorr.m.

Definition at line 47 of file singledic_config.h.

Constructor & Destructor Documentation

◆ SinglediConfig() [1/2]

singledic::SinglediConfig::SinglediConfig ( )
default

◆ SinglediConfig() [2/2]

singledic::SinglediConfig::SinglediConfig ( const Config &  cfg)
inlineexplicit

Definition at line 88 of file singledic_config.h.

Member Function Documentation

◆ inputRefTrialDir()

std::string singledic::SinglediConfig::inputRefTrialDir ( ) const
inline

Directory for the reference trial's input (subject/bloc/reftrial).

Definition at line 108 of file singledic_config.h.

◆ inputTrialDir()

std::string singledic::SinglediConfig::inputTrialDir ( ) const
inline

Directory for the current trial's input (subject/bloc/trial).

Definition at line 103 of file singledic_config.h.

◆ matchingFile()

std::string singledic::SinglediConfig::matchingFile ( const std::string &  ext = ".bin") const
inline

Matching-to-reference cache file. Mirrors Vik: MATCHING2<reftrial>.mat/.bin.

Definition at line 135 of file singledic_config.h.

◆ ncorrStem()

std::string singledic::SinglediConfig::ncorrStem ( ) const
inline

ncorr tracking output stem (no extension). Mirrors Vik: ncorr<ncorr_number>

Definition at line 140 of file singledic_config.h.

◆ outputBlocDir()

std::string singledic::SinglediConfig::outputBlocDir ( ) const
inline

Output directory shared per (subject, bloc) — holds ROI/seed reference files.

Definition at line 119 of file singledic_config.h.

◆ outputTrialDir()

std::string singledic::SinglediConfig::outputTrialDir ( ) const
inline

Output directory for the current trial (subject/bloc/trial under dic_path).

Definition at line 113 of file singledic_config.h.

◆ roiFile()

std::string singledic::SinglediConfig::roiFile ( ) const
inline

ROI mask file, shared per bloc and keyed by reference trial.

Mirrors Vik: REF_MASK_<reftrial>.mat

Definition at line 126 of file singledic_config.h.

◆ seedFile()

std::string singledic::SinglediConfig::seedFile ( ) const
inline

Seed file, shared per bloc, keyed by reference trial and direction.

Mirrors Vik: REF_SEED_<reftrial>_<dir>.mat

Definition at line 130 of file singledic_config.h.

◆ toBaseParameters()

cppxdic::BaseParameters singledic::SinglediConfig::toBaseParameters ( ) const
inline

Build a BaseParameters view so existing CPPxDIC helpers (ROIManager, ImageProcessor, MatWriter) can be reused unchanged.

Maps the single-camera identity onto the stereo struct's fields: material <- bloc, stereopair <- 1, phase <- tracking_dir, cam_1 = cam_2 <- 1 (single camera).

Definition at line 152 of file singledic_config.h.

◆ vid_root()

std::string singledic::SinglediConfig::vid_root ( ) const
inline

Root directory that holds per-subject video folders (default "<data>/vid").

Definition at line 98 of file singledic_config.h.

Member Data Documentation

◆ base

Config singledic::SinglediConfig::base

Underlying engine configuration (owns all DIC/ncorr/viz parameters).

Definition at line 50 of file singledic_config.h.

◆ bloc

std::string singledic::SinglediConfig::bloc = "bloc1"

Bloc / block folder name.

Definition at line 54 of file singledic_config.h.

◆ do_matching

bool singledic::SinglediConfig::do_matching = false

If true, run a matching-to-reference-trial pass before tracking (Vik ncorr_matching2ref_single.m); maps the ROI/seed of the reference trial onto the current trial.

If false, the trial's own ROI/seed is used.

Definition at line 80 of file singledic_config.h.

◆ filter_im_mode

bool singledic::SinglediConfig::filter_im_mode = false

Apply bandpass+normalise filtering before DIC.

Definition at line 72 of file singledic_config.h.

◆ frame_jump

int singledic::SinglediConfig::frame_jump = 1

Frame stride.

Definition at line 61 of file singledic_config.h.

◆ idx_frame_end

int singledic::SinglediConfig::idx_frame_end = 0

Last frame (0 = "to end of sequence").

Definition at line 60 of file singledic_config.h.

◆ idx_frame_start

int singledic::SinglediConfig::idx_frame_start = 1

First frame to analyse (1-based, MATLAB-style).

Definition at line 59 of file singledic_config.h.

◆ limit_grayscale_high

int singledic::SinglediConfig::limit_grayscale_high = 140

Upper saturation clamp (satur high).

Definition at line 69 of file singledic_config.h.

◆ limit_grayscale_low

int singledic::SinglediConfig::limit_grayscale_low = 40

Lower saturation clamp (satur low).

Definition at line 68 of file singledic_config.h.

◆ ncorr_number

int singledic::SinglediConfig::ncorr_number = 1

ncorr_number tag (1/2) used to name outputs, mirroring forward/backward passes.

Definition at line 65 of file singledic_config.h.

◆ param_filt_high

int singledic::SinglediConfig::param_filt_high = 200

Bandpass high cutoff.

Definition at line 74 of file singledic_config.h.

◆ param_filt_low

int singledic::SinglediConfig::param_filt_low = 50

Bandpass low cutoff.

Definition at line 73 of file singledic_config.h.

◆ reftrial

std::string singledic::SinglediConfig::reftrial = "001"

Reference trial name (shared per bloc).

Definition at line 56 of file singledic_config.h.

◆ subject

std::string singledic::SinglediConfig::subject = "S01"

Subject folder name (e.g. "S01").

Definition at line 53 of file singledic_config.h.

◆ tracking_dir

std::string singledic::SinglediConfig::tracking_dir = "forward"

Tracking direction: "forward" or "backward" (backward flips the sequence).

Definition at line 63 of file singledic_config.h.

◆ trial

std::string singledic::SinglediConfig::trial = "001"

Current trial name (video stem).

Definition at line 55 of file singledic_config.h.

◆ write_csv

bool singledic::SinglediConfig::write_csv = true

Whether to write a CSV of the tracked feature trajectories.

Definition at line 85 of file singledic_config.h.

◆ write_mat

bool singledic::SinglediConfig::write_mat = true

Whether to write a MATLAB-compatible .mat sidecar next to outputs.

Definition at line 83 of file singledic_config.h.


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