|
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
|
A class that takes a text file as input and produces a unique set of points to test when initializing a subset. The text file gets filtered down to a certain resolution and then duplicate points are removed. This class is useful when the path of a particular subset is pre-defined, for example in a mechanism. This class also provides some basic methods for testing solution values and finding the nearest point on the path. More...
#include <DICe_Initializer.h>
Public Member Functions | |
| Path_Initializer (Schema *schema, Teuchos::RCP< Subset > subset, const char *file_name, const size_t num_neighbors=6) | |
| virtual | ~Path_Initializer () |
| virtual destructor | |
| const std::set< def_triad > * | triads () const |
| accessor for triad values | |
| size_t | num_triads () const |
| returns the number of triads in the set | |
| size_t | num_neighbors () const |
| return the number of neighbors for each triad | |
| size_t | neighbor (const size_t triad_id, const size_t neighbor_index) const |
| void | closest_triad (const scalar_t &u, const scalar_t &v, const scalar_t &t, size_t &id, scalar_t &distance_sqr) const |
| virtual void | pre_execution_tasks () |
| see base class description | |
| virtual Status_Flag | initial_guess (const int_t subset_gid, Teuchos::RCP< Local_Shape_Function > shape_function) |
| see base class description | |
| scalar_t | initial_guess (Teuchos::RCP< Image > def_image, Teuchos::RCP< Local_Shape_Function > shape_function, const scalar_t &u, const scalar_t &v, const scalar_t &t) |
| scalar_t | initial_guess (Teuchos::RCP< Image > def_image, Teuchos::RCP< Local_Shape_Function > shape_function) |
| void | write_to_text_file (const std::string &file_name) const |
| write the filtered set of points out to an output file | |
Public Member Functions inherited from DICe::Initializer | |
| Initializer (Schema *schema) | |
| base class constructor | |
| virtual | ~Initializer () |
| virtual destructor | |
Private Attributes | |
| Teuchos::RCP< Subset > | subset_ |
| pointer to the subset being initialized | |
| std::set< def_triad > | triads_ |
| unique triads of deformation params: u, v, and t | |
| size_t | num_triads_ |
| number of unique triads | |
| size_t | num_neighbors_ |
| k-closest neighbors for each point in the set of triads | |
| std::vector< size_t > | neighbors_ |
| a strided array of neighbor ids | |
| Teuchos::RCP< kd_tree_3d_t > | kd_tree_ |
| pointer to the kd-tree used for searching | |
| Teuchos::RCP< Point_Cloud_3D< scalar_t > > | point_cloud_ |
| pointer to the point cloud used for the neighbor searching | |
Additional Inherited Members | |
Protected Attributes inherited from DICe::Initializer | |
| Schema * | schema_ |
| pointer to the schema that created this initializer, used for field access | |
A class that takes a text file as input and produces a unique set of points to test when initializing a subset. The text file gets filtered down to a certain resolution and then duplicate points are removed. This class is useful when the path of a particular subset is pre-defined, for example in a mechanism. This class also provides some basic methods for testing solution values and finding the nearest point on the path.
| DICe::Path_Initializer::Path_Initializer | ( | Schema * | schema, |
| Teuchos::RCP< Subset > | subset, | ||
| const char * | file_name, | ||
| const size_t | num_neighbors = 6 |
||
| ) |
constructor
| schema | pointer to the parent schema (with all the field info) |
| subset | pointer to a specific subset |
| file_name | the name of the file to use for input. The input should be in the following format: ascii text file with values separated by spaces in three columns. The first column is the x displacement, the second column is y displacement and the third is rotation. If one of these columns is not needed, a column of zeros should still be provided. Also, there should not be any blank lines at the end of the file. TODO create a more robust file reader. No header should be included in the text file. |
| num_neighbors | the k value for the k-closest neighbors to store for each point |
| void DICe::Path_Initializer::closest_triad | ( | const scalar_t & | u, |
| const scalar_t & | v, | ||
| const scalar_t & | t, | ||
| size_t & | id, | ||
| scalar_t & | distance_sqr | ||
| ) | const |
return the id of the path triad closest to the given point
| u | displacement in x |
| v | displacement in y |
| t | rotation |
| id | [out] the return id of the closest triad |
| distance_sqr | [out] the euclidean distance to this point |
| scalar_t DICe::Path_Initializer::initial_guess | ( | Teuchos::RCP< Image > | def_image, |
| Teuchos::RCP< Local_Shape_Function > | shape_function | ||
| ) |
Initializer where the entire set of path triads will be searched for the best solution
| def_image | pointer to the deformed image |
| shape_function | [out] the shape function to initialize |
| scalar_t DICe::Path_Initializer::initial_guess | ( | Teuchos::RCP< Image > | def_image, |
| Teuchos::RCP< Local_Shape_Function > | shape_function, | ||
| const scalar_t & | u, | ||
| const scalar_t & | v, | ||
| const scalar_t & | t | ||
| ) |
Initialize the subset in the vicinity of the previous guess
| def_image | the deformed image |
| shape_function | [out] the shape function to initialize |
| u | previous displacemcent x |
| v | previous displacement y |
| t | previous theta in this case only the closest k-neighbors will be searched for the best solution |
|
inline |
return the id of the neighbor
| triad_id | the id of the triad to gather a neighbor for |
| neighbor_index | the index of the neighbor |
1.8.16