Developer documentation
Version 3.0.3-105-gd3941f44
MR::Math::SH Namespace Reference

Classes

class  aPSF
 a class to hold the coefficients for an apodised point-spread function. More...
 
class  PrecomputedAL
 Precomputed Associated Legrendre Polynomials - used to speed up SH calculation. More...
 
class  PrecomputedFraction
 used to speed up SH calculation More...
 
class  Transform
 

Functions

size_t NforL (int lmax)
 the number of (even-degree) coefficients for the given value of lmax More...
 
size_t index (int l, int m)
 compute the index for coefficient (l,m) More...
 
size_t NforL_mpos (int lmax)
 same as NforL(), but consider only non-negative orders m More...
 
size_t index_mpos (int l, int m)
 same as index(), but consider only non-negative orders m More...
 
size_t LforN (int N)
 returns the largest lmax given N parameters More...
 
template<class MatrixType >
Eigen::Matrix< typename MatrixType::Scalar, Eigen::Dynamic, Eigen::Dynamic > init_transform (const MatrixType &dirs, const int lmax)
 form the SH->amplitudes matrix More...
 
template<class MatrixType >
Eigen::Matrix< typename MatrixType::Scalar, Eigen::Dynamic, Eigen::Dynamic > init_transform_cart (const MatrixType &dirs, const int lmax)
 form the SH->amplitudes matrix More...
 
template<class MatrixType , class VectorType >
void scale_degrees_forward (MatrixType &SH2amp_mapping, const VectorType &coefs)
 scale the coefficients of each SH degree by the corresponding value in coefs More...
 
template<typename MatrixType , class VectorType >
void scale_degrees_inverse (MatrixType &amp2SH_mapping, const VectorType &coefs)
 scale the coefficients of each SH degree by the corresponding value in coefs More...
 
template<typename VectorType >
Eigen::Matrix< typename VectorType::Scalar, Eigen::Dynamic, 1 > invert (const VectorType &coefs)
 invert any non-zero coefficients in coefs More...
 
template<class VectorType >
VectorType::Scalar value (const VectorType &coefs, typename VectorType::Scalar cos_elevation, typename VectorType::Scalar cos_azimuth, typename VectorType::Scalar sin_azimuth, int lmax)
 
template<class VectorType >
VectorType::Scalar value (const VectorType &coefs, typename VectorType::Scalar cos_elevation, typename VectorType::Scalar azimuth, int lmax)
 
template<class VectorType1 , class VectorType2 >
VectorType1::Scalar value (const VectorType1 &coefs, const VectorType2 &unit_dir, int lmax)
 
template<class VectorType1 , class VectorType2 >
VectorType1 & delta (VectorType1 &delta_vec, const VectorType2 &unit_dir, int lmax)
 
template<class VectorType1 , class VectorType2 >
VectorType1 & SH2RH (VectorType1 &RH, const VectorType2 &sh)
 
template<class VectorType >
Eigen::Matrix< typename VectorType::Scalar, Eigen::Dynamic, 1 > SH2RH (const VectorType &sh)
 
template<class VectorType1 , class VectorType2 >
VectorType1 & sconv (VectorType1 &sh, const VectorType2 &RH)
 perform spherical convolution, in place More...
 
template<class VectorType1 , class VectorType2 , class VectorType3 >
VectorType1 & sconv (VectorType1 &C, const VectorType2 &RH, const VectorType3 &sh)
 perform spherical convolution More...
 
template<class MatrixType1 , class VectorType2 >
MatrixType1 & sconv_mat (MatrixType1 &sh, const VectorType2 &RH)
 perform spherical convolution, in place More...
 
template<class VectorType , class UnitVectorType , class ValueType = float>
VectorType::Scalar get_peak (const VectorType &sh, int lmax, UnitVectorType &unit_init_dir, PrecomputedAL< typename VectorType::Scalar > *precomputer=nullptr)
 estimate direction & amplitude of SH peak More...
 
template<class VectorType >
void derivatives (const VectorType &sh, const int lmax, const typename VectorType::Scalar elevation, const typename VectorType::Scalar azimuth, typename VectorType::Scalar &amplitude, typename VectorType::Scalar &dSH_del, typename VectorType::Scalar &dSH_daz, typename VectorType::Scalar &d2SH_del2, typename VectorType::Scalar &d2SH_deldaz, typename VectorType::Scalar &d2SH_daz2, PrecomputedAL< typename VectorType::Scalar > *precomputer)
 computes first and second order derivatives of SH series More...
 
template<class ImageType >
void check (const ImageType &H)
 convenience function to check if an input image can contain SH coefficients More...
 

Variables

const char * encoding_description
 a string containing a description of the SH storage convention More...