casa
5.7.0-16
|
FFT an image. More...
#include <ImageFFT.h>
Public Types | |
using | ComplexType = std::complex< typename casacore::NumericTraits< T >::BaseType > |
using | RealType = typename casacore::NumericTraits< T >::BaseType |
Public Member Functions | |
ImageFFT () | |
ImageFFT (const ImageFFT &other) | |
ImageFFT & | operator= (const ImageFFT &other) |
Assignment (reference semantics) More... | |
~ImageFFT () | |
void | fftsky (const casacore::ImageInterface< T > &in) |
Do the FFT of the sky plane to the uv plane Masked pixels are set to zero before the FT. More... | |
void | fft (const casacore::ImageInterface< T > &in, const casacore::Vector< casacore::Bool > &axes) |
Do the FFT of the specified pixel axes (true to FT). More... | |
void | getComplex (casacore::ImageInterface< ComplexType > &out) const |
Return the FFT (from the last call to fftsky or fft) in the desired form. More... | |
void | getReal (casacore::ImageInterface< RealType > &out) const |
void | getImaginary (casacore::ImageInterface< RealType > &out) const |
void | getAmplitude (casacore::ImageInterface< RealType > &out) const |
void | getPhase (casacore::ImageInterface< RealType > &out) const |
Private Member Functions | |
void | checkAxes (const casacore::CoordinateSystem &cSys, casacore::uInt ndim, const casacore::Vector< casacore::Bool > &axes) |
Check axes for multi-dim FFT. More... | |
template<class U > | |
void | _copyMiscellaneous (casacore::ImageInterface< U > &out) const |
Copy MiscInfo, casacore::ImageInfo, casacore::Unit, logSInk to output. More... | |
template<class U > | |
void | _copyMost (casacore::ImageInterface< U > &out) const |
common image copy stuff More... | |
void | _setCoordinates (casacore::ImageInterface< ComplexType > &out, const casacore::CoordinateSystem &cSys, const casacore::Vector< casacore::Bool > &axes, const casacore::IPosition &shape) |
Overwrite the coordinate system with Fourier coordinates for all designated axes. More... | |
Static Private Member Functions | |
template<class U > | |
static void | _copyMask (casacore::ImageInterface< U > &out, const casacore::ImageInterface< T > &in) |
Copy the mask to the output. More... | |
template<class U > | |
static void | _fftsky (casacore::ImageInterface< U > &out, const casacore::ImageInterface< T > &in, const casacore::Vector< casacore::Int > &pixelAxes) |
U must be a complex type (Complex, DComplex) More... | |
template<class U > | |
static void | _fft (casacore::ImageInterface< U > &out, const casacore::ImageInterface< T > &in, const casacore::Vector< casacore::Bool > &axes) |
U must be a complex type (Complex, DComplex) More... | |
static casacore::Bool | _findSky (casacore::Int &dC, casacore::Vector< casacore::Int > &pixelAxes, casacore::Vector< casacore::Int > &worldAxes, const casacore::CoordinateSystem &cSys, casacore::Bool throwIt) |
Find the sky axes in this CoordinateSystem. More... | |
static void | _setSkyCoordinates (casacore::ImageInterface< ComplexType > &out, const casacore::CoordinateSystem &csys, const casacore::IPosition &shape, casacore::uInt dC) |
Overwrite the coordinate system with Fourier coordinates for sky axes only. More... | |
Private Attributes | |
SPIICT | _tempImagePtr |
SPIIT | _image |
casacore::Bool | _done |
FFT an image.
Public interface
Take the fast Fourier Transform of an image.
This class takes the FFT of an image. It can take the FFT of just the sky plane(s) of an image or the specified axes.
When you specify axes, if any of them are a sky axis (casacore::DirectionCoordinate) you must give both sky axes.
Masked pixels are given the value 0.0 before the FFT is taken and the mask is copied to the output. Note that it is the callers responsibility to give the output a mask if the input is masked. Otherwise the mask will not be copied to the output
This class holds the FourierTransform internally in a TempImage object. This is in memory or on disk depending upon its size and the amount of memory in your computer. The algorithm used is that in TempLattice.
In generating the Fourier Coordinates, it is currently assumed that there is no coordinate rotation. This needs to be dealt with.
Taking the Fourier Transform of an image is a basic part of image analysis
Definition at line 134 of file ImageFFT.h.
using casa::ImageFFT< T >::ComplexType = std::complex<typename casacore::NumericTraits<T>::BaseType> |
Definition at line 138 of file ImageFFT.h.
using casa::ImageFFT< T >::RealType = typename casacore::NumericTraits<T>::BaseType |
Definition at line 140 of file ImageFFT.h.
casa::ImageFFT< T >::ImageFFT | ( | ) |
casa::ImageFFT< T >::ImageFFT | ( | const ImageFFT< T > & | other | ) |
casa::ImageFFT< T >::~ImageFFT | ( | ) |
|
staticprivate |
Copy the mask to the output.
|
private |
Copy MiscInfo, casacore::ImageInfo, casacore::Unit, logSInk to output.
|
private |
common image copy stuff
|
staticprivate |
U must be a complex type (Complex, DComplex)
|
staticprivate |
U must be a complex type (Complex, DComplex)
|
staticprivate |
Find the sky axes in this CoordinateSystem.
|
private |
Overwrite the coordinate system with Fourier coordinates for all designated axes.
|
staticprivate |
Overwrite the coordinate system with Fourier coordinates for sky axes only.
|
private |
Check axes for multi-dim FFT.
void casa::ImageFFT< T >::fft | ( | const casacore::ImageInterface< T > & | in, |
const casacore::Vector< casacore::Bool > & | axes | ||
) |
Do the FFT of the specified pixel axes (true to FT).
The rest are iterated over. Masked pixels are set to zero before the FT
void casa::ImageFFT< T >::fftsky | ( | const casacore::ImageInterface< T > & | in | ) |
Do the FFT of the sky plane to the uv plane Masked pixels are set to zero before the FT.
void casa::ImageFFT< T >::getAmplitude | ( | casacore::ImageInterface< RealType > & | out | ) | const |
void casa::ImageFFT< T >::getComplex | ( | casacore::ImageInterface< ComplexType > & | out | ) | const |
Return the FFT (from the last call to fftsky or fft) in the desired form.
The casacore::CoordinateSystem, MiscInfo, casacore::ImageInfo,
history and units are copied/updated in the output image from the image that was FFTd. If the input image is masked, and the output image has a writable mask, the mask will be transferred. Any output mask should be initialized to true before calling these functions.
void casa::ImageFFT< T >::getImaginary | ( | casacore::ImageInterface< RealType > & | out | ) | const |
void casa::ImageFFT< T >::getPhase | ( | casacore::ImageInterface< RealType > & | out | ) | const |
void casa::ImageFFT< T >::getReal | ( | casacore::ImageInterface< RealType > & | out | ) | const |
ImageFFT& casa::ImageFFT< T >::operator= | ( | const ImageFFT< T > & | other | ) |
Assignment (reference semantics)
|
private |
Definition at line 185 of file ImageFFT.h.
|
private |
Definition at line 184 of file ImageFFT.h.
|
private |
Definition at line 183 of file ImageFFT.h.