spectralbrain.spectral.anisotropic#
Anisotropic spectral descriptors.
These descriptors replace the isotropic Laplace–Beltrami operator with directional (anisotropic) variants, enabling sensitivity to geometry along specific directions (e.g. principal curvature axes, sulcal ridges, cortical lamination gradients).
Implemented#
Anisotropic HKS / WKS — HKS/WKS computed from an anisotropic Laplacian that weights diffusion by principal curvature direction.
ASMWD — Anisotropic Spectral Manifold Wavelet Descriptor (Li et al. CGF 2021).
The Finsler-LBO (Jadhav & Cremers, CVPR 2024) is provided as a Laplacian constructor that feeds into existing HKS/WKS/SGW pipelines.
Note
Anisotropic descriptors require mesh topology (faces) to estimate principal curvature directions. Point cloud support is experimental via local PCA axes.
Functions
|
Build an anisotropic Laplacian weighted by curvature direction. |
|
HKS computed from an anisotropic Laplacian. |
|
WKS computed from an anisotropic Laplacian. |
|
Anisotropic Spectral Manifold Wavelet Descriptor (ASMWD). |
- spectralbrain.spectral.anisotropic.anisotropic_laplacian(vertices, faces, *, anisotropy=1.0, direction='max_curvature', custom_directions=None)[source]#
Build an anisotropic Laplacian weighted by curvature direction.
Modifies the cotangent Laplacian by scaling diffusion along the principal curvature directions. When
anisotropy=0, recovers the standard isotropic Laplacian. Whenanisotropy=1, diffusion is maximally biased along the chosen direction.This is a simplified implementation inspired by Andreux, Rodolà, Aubry & Cremers (NORDIA 2014) and the Finsler-LBO of Jadhav & Cremers (CVPR 2024).
- Parameters:
vertices (ndarray, shape (N, 3))
faces (ndarray, shape (F, 3))
anisotropy (float) – Anisotropy strength in [0, 1]. 0 = isotropic, 1 = fully directional.
direction (str) –
"max_curvature"— bias along maximum curvature direction."min_curvature"— bias along minimum curvature direction."custom"— use custom_directions.custom_directions (ndarray, shape (N, 3), optional) – Per-vertex preferred directions (unit vectors).
- Returns:
L (SparseMatrix, shape (N, N))
M (MassMatrix, shape (N, N))
- Return type:
- spectralbrain.spectral.anisotropic.compute_anisotropic_hks(vertices, faces, *, k=50, n_times=50, anisotropy=0.5, direction='max_curvature')[source]#
HKS computed from an anisotropic Laplacian.
- spectralbrain.spectral.anisotropic.compute_anisotropic_wks(vertices, faces, *, k=50, n_energies=50, anisotropy=0.5, direction='max_curvature')[source]#
WKS computed from an anisotropic Laplacian.
- spectralbrain.spectral.anisotropic.compute_asmwd(vertices, faces, *, k=50, n_scales=5, n_directions=4, anisotropy=0.5, kernel=None)[source]#
Anisotropic Spectral Manifold Wavelet Descriptor (ASMWD).
Computes wavelet descriptors along multiple anisotropic directions, concatenating the results.
- Parameters:
- Returns:
ndarray, shape (N, n_directions × n_scales)
- Return type:
References
Li Q et al. Anisotropic spectral manifold wavelet descriptor. Computer Graphics Forum 40(7):261–272, 2021.