|
STIR 6.5.0
|
Helpers for spacing analysis and axis inference from coordinate sets. More...
Functions | |
| bool | get_spacing_uniform (std::vector< float > &spacing, const std::set< float > &unsorted_block_poss, double epsilon=1e-4) |
| Compute spacings between sorted unique values and test uniformity. | |
| const std::set< float > & | get_largest_vector (const std::set< float > &x, const std::set< float > &y, const std::set< float > &z) |
| Return the largest of three sets and report inferred axial direction. | |
| void | find_unique_values_1D (std::set< float > &values, const std::vector< float > &input) |
| Collect unique values from a 1D vector. | |
| void | find_unique_values_2D (std::set< float > &values, const std::vector< std::vector< float > > &input) |
| Collect unique values from a 2D vector (matrix). | |
Helpers for spacing analysis and axis inference from coordinate sets.
|
inline |
Compute spacings between sorted unique values and test uniformity.
| spacing | Output vector. Appends |x[i] - x[i-1]| for i=1..N-1, where x is the sorted version of unsorted_block_poss. |
| unsorted_block_poss | Set of unique positions (e.g., angles or translations). |
| epsilon | Tolerance for uniformity check (default 1e-4). |
References get_spacing_uniform().
Referenced by get_spacing_uniform(), and stir::PETSIRDInfo::PETSIRDInfo().
| const std::set< float > & vector_utils::get_largest_vector | ( | const std::set< float > & | x, |
| const std::set< float > & | y, | ||
| const std::set< float > & | z ) |
Return the largest of three sets and report inferred axial direction.
| x | Values along X. |
| y | Values along Y. |
| z | Values along Z. |
Logs the index of the inferred axial direction: 0 (x), 1 (y), or 2 (z).
References get_largest_vector().
Referenced by get_largest_vector(), and stir::PETSIRDInfo::PETSIRDInfo().
| void vector_utils::find_unique_values_1D | ( | std::set< float > & | values, |
| const std::vector< float > & | input ) |
Collect unique values from a 1D vector.
| values | Output set for unique values. |
| input | Input vector. |
References find_unique_values_1D().
Referenced by find_unique_values_1D().
| void vector_utils::find_unique_values_2D | ( | std::set< float > & | values, |
| const std::vector< std::vector< float > > & | input ) |
Collect unique values from a 2D vector (matrix).
| values | Output set for unique values. |
| input | Input 2D vector [rows][cols]. |
References find_unique_values_2D().
Referenced by find_unique_values_2D(), and stir::PETSIRDInfo::PETSIRDInfo().