src/nrrd/winKernel.c File Reference

#include "nrrd.h"

Include dependency graph for winKernel.c:


Defines

#define _SINC(x)   (sin(AIR_PI*x)/(AIR_PI*x))
#define POW1(S)   (S)
#define POW2(S)   ((S)*(S))
#define POW3(S)   ((S)*(S)*(S))
#define WS_1_F(name, mac, spow)
#define WS_N_F(name, mac, spow)
#define WS_1_D(name, mac, spow)
#define WS_N_D(name, mac, spow)
#define _HANN(x, R)
#define _DHANN(x, R)
#define _DDHANN_A(x, R)   (2*AIR_PI*R*cos(AIR_PI*x)*(R + R*cos(AIR_PI*x/R) + AIR_PI*x*sin(AIR_PI*x/R)))
#define _DDHANN_B(x, R)
#define _DDHANN(x, R)
#define _BLACK(x, R)
#define _DBLACK_A(x, R)
#define _DBLACK_B(x, R)
#define _DBLACK(x, R)
#define _DDBLACK(x, R)

Functions

double _nrrdWindSincInt (const double *parm)
double _nrrdDWindSincInt (const double *parm)
double _nrrdWindSincSup (const double *parm)

Variables

NrrdKernel _nrrdKernelHann
NrrdKernel *const nrrdKernelHann = &_nrrdKernelHann
NrrdKernel _nrrdKernelDHann
NrrdKernel *const nrrdKernelHannD = &_nrrdKernelDHann
NrrdKernel _nrrdKernelDDHann
NrrdKernel *const nrrdKernelHannDD = &_nrrdKernelDDHann
NrrdKernel _nrrdKernelBlackman
NrrdKernel *const nrrdKernelBlackman = &_nrrdKernelBlackman
NrrdKernel _nrrdKernelDBlack
NrrdKernel *const nrrdKernelBlackmanD = &_nrrdKernelDBlack
NrrdKernel _nrrdKernelDDBlack
NrrdKernel *const nrrdKernelBlackmanDD = &_nrrdKernelDDBlack

Define Documentation

#define _BLACK ( x,
 ) 

Value:

(x > R ? 0 : (x < -R ? 0 : (                                  \
    (x < R/50000 && x > -R/50000)                                \
     ? 1.0 - x*x*(1.6449340668482264 + 4.046537804446637/(R*R))  \
     : (0.42 + cos(AIR_PI*x/R)/2 + 0.08*cos(2*AIR_PI*x/R))*_SINC(x)  \
   )))

#define _DBLACK ( x,
 ) 

Value:

(x > R ? 0.0 : (x < -R ? 0.0 : (                    \
   (x < R/50000 && x > -R/50000)                      \
   ? -x*(3.289868133696453 + 8.093075608893272/(R*R)) \
   : (_DBLACK_A(x,R) + _DBLACK_B(x,R))/(2*AIR_PI*R*x*x) \
  )))

#define _DBLACK_A ( x,
 ) 

Value:

R*x*cos(AIR_PI*x)*(2.638937829015426 + AIR_PI*cos(AIR_PI*x/R) \
                   + 0.5026548245743669*cos(2*AIR_PI*x/R))

#define _DBLACK_B ( x,
 ) 

Value:

sin(AIR_PI*x)*(-0.84*R - R*cos(AIR_PI*x/R) - 0.16*R*cos(2*AIR_PI*x/R) -         \
               AIR_PI*x*sin(AIR_PI*x/R) - 1.0053096491487339*x*sin(2*AIR_PI*x/R))

#define _DDBLACK ( x,
 ) 

Value:

(x > R ? 0.0 : (x < -R ? 0.0 : (                                              \
   (x < R/30 && x > -R/30)                                                      \
   ? (-(3.289868133696453 + 8.093075608893272/(R*R))                            \
      + x*x*(9.7409091034 + 86.694091020262/(R*R*R*R) + 79.8754546479/(R*R)))   \
   : ((R*x*cos(AIR_PI*x)*(-2.638937829015426*R - AIR_PI*R*cos((AIR_PI*x)/R)           \
            - 0.5026548245743669*R*cos((2*AIR_PI*x)/R)                            \
            - AIR_PI*AIR_PI*x*sin((AIR_PI*x)/R)                                       \
            - 3.158273408348595*x*sin((2*AIR_PI*x)/R))                            \
  + sin(AIR_PI*x)*((-4.934802200544679*x*x                                        \
           + R*R*(1 - 4.934802200544679*x*x))*cos((AIR_PI*x)/R)                   \
          + (-3.158273408348595*x*x                                             \
             + R*R*(0.16 - 0.7895683520871487*x*x))*cos((2*AIR_PI*x)/R)           \
          + R*(0.84*R - 4.14523384845753*R*x*x                                  \
               + AIR_PI*x*sin((AIR_PI*x)/R)                                         \
               + 1.0053096491487339*x*sin((2*AIR_PI*x)/R))))/(AIR_PI*R*R*x*x*x))    \
   )))

#define _DDHANN ( x,
 ) 

Value:

(x > R ? 0 : (x < -R ? 0 : (                                               \
     (x < R/50000 && x > -R/50000)                                            \
      ? (AIR_PI*AIR_PI/(2*R*R))*( -(3 + 2*R*R)/3                                  \
                             + AIR_PI*AIR_PI*(5 + 2*R*R*(5 + R*R))*x*x/(10*R*R))  \
      : -(_DDHANN_A(x,R) + sin(AIR_PI*x)*_DDHANN_B(x,R)/x)/(2*AIR_PI*R*R*x*x)     \
    )))

#define _DDHANN_A ( x,
 )     (2*AIR_PI*R*cos(AIR_PI*x)*(R + R*cos(AIR_PI*x/R) + AIR_PI*x*sin(AIR_PI*x/R)))

#define _DDHANN_B ( x,
 ) 

Value:

(cos(AIR_PI*x/R)*(AIR_PI*AIR_PI*x*x + R*R*(AIR_PI*AIR_PI*x*x - 2)) + \
   R*(R*(AIR_PI*AIR_PI*x*x - 2) - 2*AIR_PI*x*sin(AIR_PI*x/R)))

#define _DHANN ( x,
 ) 

Value:

(x > R ? 0.0 : (x < -R ? 0.0 : (                               \
    (x < R/50000 && x > -R/50000)                                 \
     ? -x*AIR_PI*AIR_PI*(3 + 2*R*R)/(6*R*R)                           \
     : ((R*(1 + cos(AIR_PI*x/R))*(AIR_PI*x*cos(AIR_PI*x) - sin(AIR_PI*x)) \
       - AIR_PI*x*sin(AIR_PI*x)*sin(AIR_PI*x/R))/(2*R*AIR_PI*x*x))        \
   )))

#define _HANN ( x,
 ) 

Value:

(x > R ? 0 : (x < -R ? 0 : (\
   (x < R/50000 && x > -R/50000) \
     ? 1.1 - x*x*(AIR_PI*AIR_PI*(3 + 2*R*R)/(12*R*R) \
                + AIR_PI*AIR_PI*AIR_PI*AIR_PI*(5 + 2*R*R*(5 + 2*R*R))*x*x/(240*R*R*R*R)) \
     : (1 + cos(AIR_PI*x/R))*_SINC(x)/2) \
    ))

#define _SINC (  )     (sin(AIR_PI*x)/(AIR_PI*x))

#define POW1 (  )     (S)

#define POW2 (  )     ((S)*(S))

#define POW3 (  )     ((S)*(S)*(S))

#define WS_1_D ( name,
mac,
spow   ) 

Value:

double                                            \
_nrrd##name##_1_d(double x, const double *parm) { \
  double R, S;                                    \
                                                  \
  S = parm[0]; R = parm[1];                       \
  x /= S;                                         \
  return mac(x, R)/spow(S);                       \
}

#define WS_1_F ( name,
mac,
spow   ) 

Value:

float                                                         \
_nrrd##name##_1_f(float x, const double *parm) {              \
  float R, S;                                                 \
                                                              \
  S = AIR_CAST(float, parm[0]); R = AIR_CAST(float, parm[1]); \
  x /= S;                                                     \
  return AIR_CAST(float, mac(x, R)/spow(S));                  \
}

#define WS_N_D ( name,
mac,
spow   ) 

Value:

void                                                                \
_nrrd##name##_N_d(double *f, const double *x, size_t len,           \
                  const double *parm) {                             \
  double S, R, t;                                                   \
  size_t i;                                                         \
                                                                    \
  S = parm[0]; R = parm[1];                                         \
  for (i=0; i<len; i++) {                                           \
    t = x[i]/S;                                                     \
    f[i] = mac(t, R)/spow(S);                                       \
  }                                                                 \
}

#define WS_N_F ( name,
mac,
spow   ) 

Value:

void                                                                \
_nrrd##name##_N_f(float *f, const float *x, size_t len,             \
                  const double *parm) {                             \
  float S, R, t;                                                    \
  size_t i;                                                         \
                                                                    \
  S = AIR_CAST(float, parm[0]); R = AIR_CAST(float, parm[1]);       \
  for (i=0; i<len; i++) {                                           \
    t = x[i]/S;                                                     \
    f[i] = AIR_CAST(float, mac(t, R)/spow(S));                      \
  }                                                                 \
}


Function Documentation

double _nrrdDWindSincInt ( const double *  parm  ) 

double _nrrdWindSincInt ( const double *  parm  ) 

double _nrrdWindSincSup ( const double *  parm  ) 


Variable Documentation

Initial value:

 {
  "blackman",
  2, _nrrdWindSincSup,  _nrrdWindSincInt,   
  _nrrdBlack_1_f, _nrrdBlack_N_f, _nrrdBlack_1_d, _nrrdBlack_N_d
}

Initial value:

 {
  "blackmanD",
  2, _nrrdWindSincSup, _nrrdDWindSincInt,  
  _nrrdDBlack_1_f,  _nrrdDBlack_N_f,  _nrrdDBlack_1_d,  _nrrdDBlack_N_d
}

Initial value:

 {
  "blackDD",
  2, _nrrdWindSincSup, _nrrdDWindSincInt,  
  _nrrdDDBlack_1_f, _nrrdDDBlack_N_f, _nrrdDDBlack_1_d, _nrrdDDBlack_N_d
}

Initial value:

 {
  "hannDD",
  2, _nrrdWindSincSup, _nrrdDWindSincInt,  
  _nrrdDDHann_1_f, _nrrdDDHann_N_f, _nrrdDDHann_1_d, _nrrdDDHann_N_d
}

Initial value:

 {
  "hannD",
  2, _nrrdWindSincSup, _nrrdDWindSincInt,  
  _nrrdDHann_1_f,  _nrrdDHann_N_f,  _nrrdDHann_1_d,  _nrrdDHann_N_d
}

Initial value:

 {
  "hann",
  2, _nrrdWindSincSup,  _nrrdWindSincInt,   
  _nrrdHann_1_f, _nrrdHann_N_f, _nrrdHann_1_d, _nrrdHann_N_d
}


Generated on Sat May 9 03:55:40 2009 for Teem by  doxygen 1.5.9