OCTOPUS.fieldmap subpackage¶
OCTOPUS.fieldmap.simulate module¶
Methods to simulate different types of field maps
Author: Marina Manso Jimeno
Last modified: 07/16/2020
-
OCTOPUS.fieldmap.simulate.fieldmap_bin(field_map, bin)¶ Bins a given field map given a binning value
Parameters: - field_map (numpy.ndarray) – Field map matrix in Hz
- bin (int) – Binning value in Hz
Returns: binned_field_map – Binned field map matrix
Return type: numpy.ndarray
-
OCTOPUS.fieldmap.simulate.hyperbolic(N, fmax, bin_opt=True, bin_val=5)¶ Creates a hyperbolic field map
Parameters: - N (int) – Field map dimensions (NxN)
- fmax (float) – Frequency range in Hz
- bin_opt (bool) – Binning option. Default is True
- bin_val (int) – Binning value, default is 5 Hz
Returns: field map – Field map matrix with dimensions [NxN] and scaled from -fmax to +fmax Hz
Return type: numpy.ndarray
-
OCTOPUS.fieldmap.simulate.parabola_formula(N)¶ Parabola values to fit an image of N rows/columns
Parameters: N (int) – Matrix size Returns: yaxis – y axis values of the parabola Return type: numpy.ndarray
-
OCTOPUS.fieldmap.simulate.parabolic(N, fmax, bin_opt=True, bin_val=5)¶ Creates a parabolic field map
Parameters: - N (int) – Field map dimensions (NxN)
- fmax (float) – Frequency range in Hz
- bin_opt (bool) – Binning option. Default is True
- bin_val (int) – Binning value. Default is 5 Hz
Returns: field map – Field map matrix with dimensions [NxN] and scaled from -fmax to +fmax Hz
Return type: numpy.ndarray
-
OCTOPUS.fieldmap.simulate.realistic(im, mask, fmax, bin_opt=True, bin_val=5)¶ Creates a realistic field map based on the input image
Parameters: - im (numpy.ndarray) – Input image
- fmax (float) – Frequency range in Hz
- bin_opt (bool) – Binning option. Default is True
- bin_val (int) – Binning value, default is 5 Hz
Returns: field_map – Field map matrix with dimensions same as im and scaled from -fmax to +fmax Hz
Return type: numpy.ndarray
-
OCTOPUS.fieldmap.simulate.spherical_order4(N, fmax, bin_opt=True, bin_val=5)¶ Creates a field map simulating spherical harmonics of 4th order
Parameters: - N (int) – Field map dimensions (NxN)
- fmax (float) – Frequency range in Hz
- bin_opt (bool) – Binning option. Default is True
- bin_val (int) – Binning value, default is 5 Hz
Returns: field_map – Field map matrix with dimensions NxN and scaled from -fmax to +fmax Hz
Return type: numpy.ndarray
OCTOPUS.fieldmap.unwrap module¶
Prepares field map data (from a Siemens scanner) for phase unwrapping with FSL
Author: Marina Manso Jimeno
Last updated: 07/08/2020
-
OCTOPUS.fieldmap.unwrap.fsl_prep(data_path_raw, data_path_dicom, dst_folder, dTE)¶ Prepares a Siemens fieldmap for phase unwrapping using FSL. Saves a phase difference image and a magnitude image with the ROI extracted in niftii format to use as inputs for FSL.
Parameters: - data_path_raw (str) – Path to the MATLAB/npy file containing the field map raw data with dimensions [lines, columns, echoes, channels]
- data_path_dicom (str) – Path to the DICOM file containing the phase difference image (.IMA)
- dst_folder (str) – Path to the destination folder where the niftii files are saved
- dTE (float) – Difference in TE between the two echoes in seconds