1 #ifndef __stir_numerics_fftshift_H__ 2 #define __stir_numerics_fftshift_H__ 37 for (
int i = 0; i < size / 2; ++i)
38 std::swap(a[i], a[size / 2 + i]);
47 for (
int i = 0; i < size; ++i)
48 for (
int j = 0; j < size / 2; ++j)
49 std::swap(a[i][j], a[i][size / 2 + j]);
52 for (
int i = 0; i < size; ++i)
53 for (
int j = 0; j < size / 2; ++j)
54 std::swap(a[j][i], a[size / 2 + j][i]);
defines the stir::Array class for multi-dimensional (numeric) arrays
void fftshift(Array< 2, std::complex< T >> &a, int size)
In-place 2D fftshift: quadrant swap (left-right, then top-bottom). Accepts complex arrays...
Definition: fftshift.h:44