Digital Image Correlation Engine  Version 1.0
A modular, high-performance, image correlation tool used to compute full-field displacements and strains from digital images
Public Member Functions | Private Attributes | List of all members
DICe::Image_Deformer Class Reference

base class that deformes an input image according to an analytical function More...

#include <DICe_ImageUtils.h>

Inheritance diagram for DICe::Image_Deformer:
DICe::ConstantValue_Image_Deformer DICe::DICChallenge14_Image_Deformer DICe::SinCos_Image_Deformer

Public Member Functions

 Image_Deformer (const scalar_t &rel_factor_disp, const scalar_t &rel_factor_strain)
 constructor
 
virtual void compute_deformation (const scalar_t &coord_x, const scalar_t &coord_y, scalar_t &bx, scalar_t &by)
 
virtual void compute_deriv_deformation (const scalar_t &coord_x, const scalar_t &coord_y, scalar_t &bxx, scalar_t &bxy, scalar_t &byx, scalar_t &byy)
 
Teuchos::RCP< Imagedeform_image (Teuchos::RCP< Image > ref_image)
 
void compute_displacement_error (const scalar_t &coord_x, const scalar_t &coord_y, const scalar_t &sol_x, const scalar_t &sol_y, scalar_t &error_x, scalar_t &error_y, const bool use_mag=false, const bool relative=true)
 
void compute_lagrange_strain_error (const scalar_t &coord_x, const scalar_t &coord_y, const scalar_t &sol_xx, const scalar_t &sol_xy, const scalar_t &sol_yy, scalar_t &error_xx, scalar_t &error_xy, scalar_t &error_yy, const bool use_mag=false, const bool relative=true)
 
void compute_lagrange_strain (const scalar_t &coord_x, const scalar_t &coord_y, scalar_t &strain_xx, scalar_t &strain_xy, scalar_t &strain_yy)
 

Private Attributes

scalar_t rel_factor_disp_
 factor to use when computing the relative values of disp error
 
scalar_t rel_factor_strain_
 factor to use when computing the relative values of strain error
 

Detailed Description

base class that deformes an input image according to an analytical function

Member Function Documentation

◆ compute_deformation()

virtual void DICe::Image_Deformer::compute_deformation ( const scalar_t coord_x,
const scalar_t coord_y,
scalar_t bx,
scalar_t by 
)
inlinevirtual

compute the analytical displacement at the given coordinates

Parameters
coord_xthe x-coordinate for the evaluation location
coord_ythe y-coordinate
bx[out] the x displacement
by[out] the y displacement

Reimplemented in DICe::ConstantValue_Image_Deformer, DICe::DICChallenge14_Image_Deformer, and DICe::SinCos_Image_Deformer.

◆ compute_deriv_deformation()

virtual void DICe::Image_Deformer::compute_deriv_deformation ( const scalar_t coord_x,
const scalar_t coord_y,
scalar_t bxx,
scalar_t bxy,
scalar_t byx,
scalar_t byy 
)
inlinevirtual

compute the analytical derivatives at the given coordinates

Parameters
coord_xthe x-coordinate for the evaluation location
coord_ythe y-coordinate
bxx[out] the xx deriv
bxy[out] the xy deriv
byx[out] the yx deriv
byy[out] the yy deriv

Reimplemented in DICe::ConstantValue_Image_Deformer, DICe::DICChallenge14_Image_Deformer, and DICe::SinCos_Image_Deformer.

◆ compute_displacement_error()

void DICe::Image_Deformer::compute_displacement_error ( const scalar_t coord_x,
const scalar_t coord_y,
const scalar_t sol_x,
const scalar_t sol_y,
scalar_t error_x,
scalar_t error_y,
const bool  use_mag = false,
const bool  relative = true 
)

compute the error of a given solution at the given coords

Parameters
coord_xthe x coordinate
coord_ythe y coordinate
sol_xthe solution value in x
sol_ythe solution value in y
error_x[out] the x error at the given coords
error_y[out] the y error at the given coords
use_magsquare the difference if true
relativedivide by the magnitude of the solution at that point (%)

◆ compute_lagrange_strain()

void DICe::Image_Deformer::compute_lagrange_strain ( const scalar_t coord_x,
const scalar_t coord_y,
scalar_t strain_xx,
scalar_t strain_xy,
scalar_t strain_yy 
)

compute the lagrange strain given solution at the given coords

Parameters
coord_xthe x coordinate
coord_ythe y coordinate
strain_xx[out] the xx strain at the given coords
strain_xy[out] the xy strain at the given coords
strain_yy[out] the yy strain at the given coords

◆ compute_lagrange_strain_error()

void DICe::Image_Deformer::compute_lagrange_strain_error ( const scalar_t coord_x,
const scalar_t coord_y,
const scalar_t sol_xx,
const scalar_t sol_xy,
const scalar_t sol_yy,
scalar_t error_xx,
scalar_t error_xy,
scalar_t error_yy,
const bool  use_mag = false,
const bool  relative = true 
)

compute the error of the derivative of a given solution at the given coords

Parameters
coord_xthe x coordinate
coord_ythe y coordinate
sol_xxthe solution value in xx
sol_xythe solution value in xy
sol_yythe solution value in yy
error_xx[out] the xx error at the given coords
error_xy[out] the xy error at the given coords
error_yy[out] the yy error at the given coords
use_magsquare the difference if true
relativedivide by the magnitude of the solution at that point (%)

◆ deform_image()

Teuchos::RCP<Image> DICe::Image_Deformer::deform_image ( Teuchos::RCP< Image ref_image)

perform deformation on the image returns a pointer to the deformed image

Parameters
ref_imagethe reference image