Generic 2D image resampler class. An image is resampled from one sample grid to another using interpolation to obtain the values on the new coordinate grid. Flux is conserved by evaluating the Jacobian at each new grid point.
It is assumed that the new pixels are of the same order or smaller than the original pixels, i.e. we are essentially interpolating, not rebinning onto larger pixels.
The template parameters are the interpolator kernel to use while resampling and the transform from one coordinate system to the new one. Both forward and backward transforms are possible.
Apart from resampling the whole image, there are the possibilities of resampling only one of the coordinates.
We assume that the relevant coordinate pairs are x,y (CCD pixel coordinates) and w,f (wavelength and f-coordinate; The f-co0rdinate is constant along fibers).
Resampler< Interpolator, Transform >::Resampler | ( | const Interpolator & | interp, | |
const Transform & | T | |||
) | [inline] |
void Resampler< Interpolator, Transform >::resample | ( | const MArray< float, 2 > & | In, | |
MArray< float, 2 > & | Out | |||
) | [inline] |
References a, Resampler< Interpolator, Transform >::interp_, and Resampler< Interpolator, Transform >::transform_.
Referenced by resample_bicubic(), resample_lanczos(), and resample_sinc().
void Resampler< Interpolator, Transform >::resample_wf | ( | const MArray< float, 2 > & | In, | |
MArray< float, 2 > & | Out, | |||
const float | w1, | |||
const float | w2, | |||
const float | f1, | |||
const float | f2 | |||
) | [inline] |
void Resampler< Interpolator, Transform >::resample_xy | ( | const MArray< float, 2 > & | In, | |
MArray< float, 2 > & | Out, | |||
const float | w1, | |||
const float | w2, | |||
const float | f1, | |||
const float | f2 | |||
) | [inline] |
void Resampler< Interpolator, Transform >::resample_xy_xf | ( | const MArray< float, 2 > & | In, | |
MArray< float, 2 > & | Out, | |||
const float | f1, | |||
const float | f2 | |||
) | [inline] |
void Resampler< Interpolator, Transform >::resample_xf_xy | ( | const MArray< float, 2 > & | In, | |
MArray< float, 2 > & | Out, | |||
const float | f1, | |||
const float | f2 | |||
) | [inline] |
Referenced by FiberModel::flat_from_data().
const Transform& Resampler< Interpolator, Transform >::transform_ [protected] |