|
int | apply_epi_phase_ge (COMPLEX *k, int xres, int yres, int ncoils, DATA_OBJ *refdat, int expidir) |
|
int | apply_vrgf_ge (COMPLEX *k, int nz, int *sz, char *fname, COMPLEX **ko) |
|
int | correct_epi_phase_ge (COMPLEX *k, int xres, int yres, int ncoils, char *fname, int expidir) |
|
void | correct_fcard (SCAN_INFO hdr, COMPLEX *kspace_data) |
|
int | read_data_from_Pfile (SCAN_INFO *hdr, DATA_OBJ *rawframe, DATA_OBJ *vrgf, FILE *fid, char *buf, char *buf2, int slice, int vol, int nbaselines) |
|
short | read_data_ge (char **Pnames, int z, SCAN_INFO hdr, KCOORD *kline, KCOORD *kline_o, KCOORD *kline_e, COMPLEX *kspace_data) |
|
short | read_hdr_ge (char *Pname, SCAN_INFO *hdr_ptr) |
|
int | read_vrgf_ge (char *fname, int Nx, char endian, DATA_OBJ *H) |
|
Functions specific to GE MR scanners, mostly for reading files generated by GE scanners.
int apply_epi_phase_ge |
( |
COMPLEX * |
k, |
|
|
int |
xres, |
|
|
int |
yres, |
|
|
int |
ncoils, |
|
|
DATA_OBJ * |
refdat, |
|
|
int |
expidir |
|
) |
| |
Applies EPI phase correction to the k-space data. The input data is assumed to be sized [ky kx c], where c can be coils, slices, etc. A linear and constant phase correction term should be provided in the 'refdat' object.
- Parameters
-
k | input data to correct, of size [yres xres ncoils] |
xres | number of points along readout |
yres | number of points along phase-encode direction |
ncoils | number of frames/coils |
refdat | a data object derived from the ref.dat file |
expidir | the direction of the applied shift. Choices are limited to +1 or -1. |
int apply_vrgf_ge |
( |
COMPLEX * |
k, |
|
|
int |
nz, |
|
|
int * |
sz, |
|
|
char * |
fname, |
|
|
COMPLEX ** |
ko |
|
) |
| |
Applies the VRGF correction matrix to EPI k-space data, to compensate for ramp-sampling during acquisition.
The VRGF data matrix is applied only to the first two dimensions of the input k-space data, i.e. the same matrix is applied to all coils and/or time frames.
DEPRECIATED: this function is to be replaced by read_vrgf_ge and correct_rampsamp
- Parameters
-
k | input data to correct (output over-writes the input) |
nz | number of dimension to the data |
sz | an array holding the size of each data dimension. Holds the size of the output data matrix when the function successfully returns. |
fname | the filename holding the VRGF correction data (default: "vrgf.dat") |
ko | output data |
int correct_epi_phase_ge |
( |
COMPLEX * |
k, |
|
|
int |
xres, |
|
|
int |
yres, |
|
|
int |
ncoils, |
|
|
char * |
fname, |
|
|
int |
expidir |
|
) |
| |
Applies EPI phase correction to the k-space data. The input data is assumed to be sized [ky kx c], where c can be coils, slices, etc. A linear and constant phase correction term is read from the supplied ref.dat file, and applied to both odd and even lines to align them.
- Parameters
-
k | input data to correct (output over-writes the input) |
xres | number of points along readout |
yres | number of points along phase-encode direction |
ncoils | number of frames/coils |
fname | the filename holding the EPI phase correction data (default: "ref.dat") |
expidir | the direction of the applied shift. Choices are limited to +1 or -1. |
void correct_fcard |
( |
SCAN_INFO |
hdr, |
|
|
COMPLEX * |
kspace_data |
|
) |
| |
Fastcard sequences skip the first view of each segment, for the first cardiac phase. The reason has to do with the time it takes to detect an R wave, and that it would alread by too late to acquire the first view of the seg- ment. Fill-in the missing data using closest-neighbours.
- Parameters
-
hdr | Structure with scan info. |
kspace_data | Input k-space data. |
int read_data_from_Pfile |
( |
SCAN_INFO * |
hdr, |
|
|
DATA_OBJ * |
rawframe, |
|
|
DATA_OBJ * |
vrgf, |
|
|
FILE * |
fid, |
|
|
char * |
buf, |
|
|
char * |
buf2, |
|
|
int |
slice, |
|
|
int |
vol, |
|
|
int |
nbaselines |
|
) |
| |
A function to read raw data from a GE P-file. Will return data corresponding to a specific slice or volume, if requested.
- Parameters
-
hdr | the scan information associated with the data |
rawframe | the output data buffer to fill |
vrgf | the rampsamp correction data. set to NULL if not available or needed |
fid | FILE handle to read from |
buf | a pre-allocated scratch buffer of size: 2 * hdr.Nsl * hdr.ncoils * hdr.frame_size * (hdr.Ny+nbaselines) * sizeof(short) |
buf2 | a pre-allocated (COMPLEX *) scratch buffer of size: hdr.Nsl * hdr.ncoils * hdr.frame_size * hdr.Ny * sizeof(DATATYPE) DATATYPE is declared by the 'type' field of rawframe. It can be "fltc" or "dblc" (the default) |
slice | the slice number to read. set to -1 to read all slices. |
vol | the volume number (time point) to read |
short read_data_ge |
( |
char ** |
Pnames, |
|
|
int |
z, |
|
|
SCAN_INFO |
hdr, |
|
|
KCOORD * |
kline, |
|
|
KCOORD * |
kline_o, |
|
|
KCOORD * |
kline_e, |
|
|
COMPLEX * |
kspace_data |
|
) |
| |
Read the input k-space data from GE P-files, for cardiac applications with temporal encoding
- Parameters
-
Pnames | an array of filename |
hdr | Structure with scan info. |
kspace_data | the returned k-space data |
short read_hdr_ge |
( |
char * |
Pname, |
|
|
SCAN_INFO * |
hdr_ptr |
|
) |
| |
Read the image scan header from a GE P file to find relevant imaging information.
- Parameters
-
Pname | Name of the P file containing the header to be read. |
hdr_ptr | Pointer to the structure where the info is to be stored. |
int read_vrgf_ge |
( |
char * |
fname, |
|
|
int |
Nx, |
|
|
char |
endian, |
|
|
DATA_OBJ * |
H |
|
) |
| |
read in the GE ramp-sampling correction file. Use correct_rampsamp to apply to the measured data.
- Parameters
-
fname | the filename holding the VRGF correction data (default: "vrgf.dat" if passed a NULL) |
Nx | length of readout data |
endian | endian-ness of the vrgf.dat file {'l','b'} [ little-endian by default ] |
H | the data object for the ramp-sampling correction operator. Memory will be allocated if the H.data memory is NULL. |