Common Pipeline Library Reference Manual 6.0a1
Typedefs | Enumerations | Functions

FFTW wrappers

Typedefs

typedef enum _cpl_fft_mode_ cpl_fft_mode
 The CPL fft mode.

Enumerations

enum  _cpl_fft_mode_ {
  CPL_FFT_FORWARD,
  CPL_FFT_BACKWARD
}
 

The supported values of the CPL fft mode.

More...

Functions

cpl_error_code cpl_fft_image (cpl_image *out, const cpl_image *in, cpl_fft_mode mode)
 Perform a FFT operation on an image.
cpl_error_code cpl_fft_imagelist (cpl_imagelist *out, const cpl_imagelist *in, cpl_fft_mode mode)
 Perform a FFT operation on the images of an imagelist.

Detailed Description

This module provides FFTW wrappers

Synopsis:
   #include "cpl_fft.h"

Typedef Documentation

The CPL fft mode.


Enumeration Type Documentation

The supported values of the CPL fft mode.

Enumerator:
CPL_FFT_FORWARD 

The forward transform

CPL_FFT_BACKWARD 

The backward transform


Function Documentation

cpl_error_code cpl_fft_image ( cpl_image *  out,
const cpl_image *  in,
cpl_fft_mode  mode 
)

Perform a FFT operation on an image.

Parameters:
outPre-allocated output image
inInput image
modeAt present, either CPL_FFT_FORWARD or CPL_FFT_BACKWARD
Returns:
CPL_ERROR_NONE or the corresponding _cpl_error_code_

This function performs a FFT operation on an image, using the FFTW library. If the CPL has not been configured with this library, this function will return CPL_ERROR_UNSUPPORTED_MODE.

When performing a forward FFT, the input image must be of a real type and the output image of a complex type, and viceversa when performing an inverse FFT.

Both image types must match in precision level. Integer images are not supported.

Currently the images must be square.

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if any of the images is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the image types (real or complex) are not what it is expected for the type of operation (forward or inverse)
  • CPL_ERROR_INCOMPATIBLE_INPUT if the image sizes do not match
  • CPL_ERROR_TYPE_MISMATCH if the images are of different precision
  • CPL_ERROR_UNSUPPORTED_MODE if FFTW has not been installed
cpl_error_code cpl_fft_imagelist ( cpl_imagelist *  out,
const cpl_imagelist *  in,
cpl_fft_mode  mode 
)

Perform a FFT operation on the images of an imagelist.

Parameters:
outPre-allocated output imagelist
inInput imagelist
modeAt present, either CPL_FFT_FORWARD or CPL_FFT_BACKWARD
Returns:
CPL_ERROR_NONE or the corresponding _cpl_error_code_
See also:
cpl_fft_image()