uvisbox.Modules.UncertaintyTube.uncertainty_tubes_mesh
Module Contents
- uvisbox.Modules.UncertaintyTube.uncertainty_tubes_mesh.compute_alignment_scores(reference, target, shifts)[source]
Compute alignment scores for all possible shifts of target relative to reference.
- Parameters:
reference (np.ndarray) – Reference point set (shape: n_points × num_dims)
target (np.ndarray) – Target point set to align (shape: n_points × num_dims)
shifts (np.ndarray) – Array of shift values to try
- Returns:
Scores for each shift (lower is better)
- Return type:
np.ndarray
- uvisbox.Modules.UncertaintyTube.uncertainty_tubes_mesh.apply_circular_alignment(points, best_shift, best_is_reversed)[source]
Apply circular alignment transformation to a set of points based on the calculated shift and orientation.
- Parameters:
(np.ndarray) (points) – Points to transform (shape: n_points × num_dims)
(int) (best_shift) – Number of positions to shift
(bool) (best_is_reversed) – Whether to reverse point order
- Returns:
aligned (np.ndarray) – Transformed points
point_correspondence_map (np.ndarray) – Index mapping from original to transformed points
- uvisbox.Modules.UncertaintyTube.uncertainty_tubes_mesh.circular_align_min_twist(points_ref, points_target, stride=1)[source]
Aligns two sets of points forming closed loops with minimal twist.
- Parameters:
(np.ndarray) (points_target) – Reference point set (shape: n_points × num_dims)
(np.ndarray) – Target point set to align (shape: n_points × num_dims)
(int) (stride) – Stride for sampling subset of points (for efficiency)
- Returns:
aligned_points (np.ndarray) – Aligned target points
correspondence_map (np.ndarray) – Index mapping from original to aligned points
- uvisbox.Modules.UncertaintyTube.uncertainty_tubes_mesh.calculate_mesh_dimensions(n_steps, n_seeds, resolution)[source]
Calculate dimensions needed for mesh arrays.
- uvisbox.Modules.UncertaintyTube.uncertainty_tubes_mesh.align_cross_sections(ellipsoids, seed_idx, n_steps, resolution)[source]
Align cross-sections to minimize twisting for a given seed.
- uvisbox.Modules.UncertaintyTube.uncertainty_tubes_mesh.uncertainty_tubes_mesh(summary_statistics, resolution=20, e_proj=1, sym=False, n_jobs=1)[source]
Generate the 3D mesh for uncertainty tubes.
- Parameters:
(dict) (summary_statistics) – Dictionary containing “mean_trajectory”, “eigen_values”, and “eigen_vectors”.
(int (n_jobs) – Number of points to sample on each cross-section boundary. Defaults to 20.
optional) – Number of points to sample on each cross-section boundary. Defaults to 20.
(float (e_proj) – Exponent controlling the superellipse shape. e_proj=1 creates a standard ellipse. Defaults to 1.
optional) – Exponent controlling the superellipse shape. e_proj=1 creates a standard ellipse. Defaults to 1.
(bool (sym) – If True, forces the superellipse to be symmetric. Defaults to False.
optional) – If True, forces the superellipse to be symmetric. Defaults to False.
(int – Number of parallel jobs to use. If n_jobs=1, uses sequential processing. Defaults to 1.
optional) – Number of parallel jobs to use. If n_jobs=1, uses sequential processing. Defaults to 1.
- Returns:
“vertices” (np.ndarray): Tube mesh vertices.
”faces” (np.ndarray): Triangle indices.
”uv_coords” (np.ndarray): UV coordinates for texture mapping.
- Return type:
dict