omni2 opwd2_init(int nw /* filter order */, int nx, int ny /* data size */, float *p1, float *p2 /* dip [ny][nx] */) /*< Initialize >*/ { omni2 ap; ap = (omni2) sf_alloc(1,sizeof(*ap)); ap->nw = nw; ap->nx = nx; ap->ny = ny; ap->p1 = p1; ap->p2 = p2; ap->flt = sf_floatalloc(2*nw+1); ap->t1 = sf_floatalloc2(nx,ny); ap->t2 = sf_floatalloc2(nx,ny); apfilt_init(nw); return ap; }
allpass allpass_init(int nw /* filter size */, int nj /* filter step */, int nx, int ny, int nz /* data size */, float *pp /* dip [nz*ny*nx] */) /*< Initialize >*/ { allpass ap; ap = (allpass) sf_alloc(1,sizeof(*ap)); ap->nw = nw; ap->nj = nj; ap->nx = nx; ap->ny = ny; ap->nz = nz; ap->pp = pp; ap->flt = sf_floatalloc(2*nw+1); apfilt_init(nw); return ap; }