27#ifndef math_fit_array2FitGaussian1D_hpp 
   28#define math_fit_array2FitGaussian1D_hpp 
   30#include "../../mxError.hpp" 
   43template <
typename realT>
 
   63    int m_maxNparams{ 4 };
 
   68    void setFixed( 
bool G0, 
bool G, 
bool x0, 
bool sigma );
 
   72    void G0( realT *p, realT 
nG0 );
 
   76    void G( realT *p, realT 
nG );
 
   80    void x0( realT *p, realT 
nx0 );
 
   82    realT sigma( realT *p );
 
   84    void sigma( realT *p, realT 
nsigma_x );
 
 
   89template <
typename realT>
 
  117template <
typename realT>
 
  130template <
typename realT>
 
  131void array2FitGaussian1D<realT>::G0( realT *p, realT 
nG0 )
 
  143template <
typename realT>
 
  144realT array2FitGaussian1D<realT>::G( realT *p )
 
  156template <
typename realT>
 
  157void array2FitGaussian1D<realT>::G( realT *p, realT 
nG )
 
  169template <
typename realT>
 
  170realT array2FitGaussian1D<realT>::x0( realT *p )
 
  182template <
typename realT>
 
  183void array2FitGaussian1D<realT>::x0( realT *p, realT 
nx0 )
 
  195template <
typename realT>
 
  196realT array2FitGaussian1D<realT>::sigma( realT *p )
 
  198    if( m_sigma_idx < 0 )
 
  204        return p[m_sigma_idx];
 
  208template <
typename realT>
 
  209void array2FitGaussian1D<realT>::sigma( realT *p, realT 
nsigma )
 
  211    if( m_sigma_idx < 0 )
 
  221template <
typename realT>
 
  222int array2FitGaussian1D<realT>::nparams()
 
constexpr floatT six_fifths()
Return 6/5 in the specified precision.
Wrapper for a native array to pass to levmarInterface, with !D Gaussian details.
size_t m_nx
X dimension of the array.
realT * m_mask
Pointer to the (optional) mask array. Any 0 pixels are excluded from the fit.
realT * m_coords
Pointer to the array of x values (optional)
realT * m_data
///< Pointer to the array of y values
void setFixed(bool G0, bool G, bool x0, bool sigma)
Set whether each parameter is fixed.