Builds four-panel SVD alignment visualisations for every specimen in
raw_data and writes a standalone interactive HTML file to out_path.
The page contains a drop-down menu to switch between specimens.
Arguments
- raw_data
A data frame with columns
Start_X/Y/Z,End_X/Y/Zand the ID column named byid_col.- out_path
Character. File path for the output HTML (e.g.
"output/scar_alignment_svd.html").- id_col
Name of the specimen ID column. Default
"ID".- outlines
Optional named list of core outlines (named by ID), as returned by
read_outline_iges(), or planes fitted withfit_intersection_plane(). Each outline is drawn with its centre and moved through the same alignment steps as the scars of its core.
Details
The exported HTML is fully self-contained (Plotly loaded from CDN) and requires no R session to view. All specimen panels are serialised to JSON at export time; switching specimens in the browser is instant.
Alignment is for viewing and for spharm_from_directions(); the
scar-pattern indices of spi_ei_batch(), cpi_pra_batch() and
spharm_rarefied() do not change when a core is rotated or moved,
and do not need it.
For the Lin 2024 morphology-based equivalent, see
export_alignment_html_lin2024().
Examples
if (FALSE) { # \dontrun{
export_alignment_html_svd(raw_data, "output/alignment_svd.html")
# With the outlines of the peripherally exploited cores
export_alignment_html_svd(raw_data, "output/alignment_svd.html",
outlines = read_outline_iges(files))
} # }
