MRI_FFT.ThreeD module

For use when a 3D output array is required.

It includes two classes:

  • “Direct3d”, for when all of the k-space data is available immediately, and

  • “TwoDDecomp”, or two-dimensional decomposition, for when two dimensional k-space data can be processed during the scan.

class MRI_FFT.ThreeD.Direct3d(shape)[source]

Bases: object

Calculates the inverse Fourier’s transform of a 3D numpy array directly

This class should be used when all of the data is available immediately.

Parameters:shape (1D array) – The shape of the 3D array that contains the k-space data to be transformed

Note

Memory errors can occur with large array sizes.

ifft3D(array3D)[source]

Calculates the 3D inverse Fourier’s Transform of array3D

Parameters:array3D (A complex or real 3D numpy array) – An array of k-space data
Returns:The transformed array
Return type:A complex64 3D numpy array
class MRI_FFT.ThreeD.TwoDDecomp(shape, inputAxis)[source]

Bases: object

Calculates the inverse Fourier’s transform of a 3D numpy array using 2D decomposition

This class should be used when 2D data becomes available during the 3D scan.

Parameters:
  • shape (2D array) – The shape of the 3D array that contains the k-space data to be transformed
  • inputAxis (Integer: 0, 1, or 2) – The direction in which to append the 2D arrays. For example, for inputAxis == 0, the arrays will be entered as follows [0, :, :], [1, :, :], etc

Note

Memory errors can occur with large array sizes.

append2D(array2D)[source]

Calculates the 2D iFFT, then appends it to the 3D array.

When the last 2D array is entered, the 3D iFFT is calculated and returned.

Parameters:array2D (A complex or real 2D numpy array) – An array of k-space data
Returns:The transformed complete array
Return type:A complex64 3D numpy array

Note

2D arrays must be entered in order